Commit Graph

1407 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
778f998cd2 MSL: Throw error on multisampled array textures. 2018-09-03 10:21:59 +02:00
Hans-Kristian Arntzen
6fd66664e8
Merge pull request #672 from cdavis5e/unord-relational-ops
MSL: Support unordered relational operators.
2018-09-01 20:04:37 +02:00
Chip Davis
0829a786d2 Add tests for FUnord comparisons of vectors. 2018-09-01 12:42:07 -05:00
Chip Davis
d3233690cb MSL: Support unordered relational operators.
The SPIR-V spec says that these check if the operands either are
unordered or satisfy the given condition. So that's just what we'll do,
using Metal's `isunordered()` stdlib function. Apple's optimizers ought
to be able to collapse that to a single unordered compare.
2018-08-31 13:54:42 -05:00
Hans-Kristian Arntzen
e14bf77b1a
Merge pull request #668 from cdavis5e/shader-draw-parameters
Support the shader_draw_parameters extension.
2018-08-30 15:15:53 +02:00
Chip Davis
94f33dc566 Fix MSL shader_draw_parameters reference output. 2018-08-29 14:17:11 -05:00
Chip Davis
348aecc59f Remove extra newline.
vim doesn't display the newline terminating a file, because every file
is supposed to have one. Travis does. That threw me off.
2018-08-29 14:04:20 -05:00
Chip Davis
e00e5b3b2c Appease tests that check for exact matches and not equivalent semantics. 2018-08-29 13:53:12 -05:00
Chip Davis
d63751a5a3 Really fix shader_draw_parameters tests (hopefully for good). 2018-08-29 13:42:09 -05:00
Chip Davis
2de572ac53 Add new tests for GLSL 4.50 shaders. 2018-08-29 13:32:01 -05:00
Chip Davis
84eb889d73 Fix reference output of shader_draw_parameters tests. 2018-08-29 13:31:43 -05:00
Chip Davis
2ee8ebbc62 Throw an exception anytime we try to compile DrawIndex to MSL. 2018-08-29 12:05:33 -05:00
Chip Davis
56a9b73685 Add test cases for SPV_KHR_shader_draw_parameters. 2018-08-29 12:04:29 -05:00
Chip Davis
97d01b6450 Punt on DrawIndex in MSL for now.
Metal doesn't properly support this.
2018-08-29 10:21:42 -05:00
Chip Davis
3dc23615dd Fix formatting. 2018-08-29 10:08:33 -05:00
Chip Davis
fcad019e11 Support the shader_draw_parameters extension. 2018-08-29 10:07:21 -05:00
Hans-Kristian Arntzen
f284acae5f MSL: Add test case for gl_FragDepth when used in function. 2018-08-29 09:21:48 +02:00
Chip Davis
1fd8cd9468 [MSL] Give the FragDepth builtin a type of float. 2018-08-28 13:47:50 -05:00
Hans-Kristian Arntzen
d964117cce
Merge pull request #666 from KhronosGroup/fix-665
MSL: Fix naming issue of aliased global variables.
2018-08-27 10:35:38 +02:00
Hans-Kristian Arntzen
87de951105 MSL: Fix naming issue of aliased global variables.
When the name of an alias global variable collides with a global
declaration, MSL would emit inconsistent names, sometimes with the
naming fix, sometimes without, because names were being tracked in two
separate meta blocks. Fix this by always redirecting parameter naming to
the original base variable as necessary.
2018-08-27 09:59:55 +02:00
Hans-Kristian Arntzen
a7697446b1
Merge pull request #663 from KhronosGroup/fix-660
Use GL_NV_gpu_shader5 as a fallback for AMD_gpu_shader_half_float.
2018-08-23 16:22:48 +02:00
Hans-Kristian Arntzen
ae859934ca Use GL_NV_gpu_shader5 as a fallback for AMD_gpu_shader_half_float. 2018-08-23 15:37:09 +02:00
Hans-Kristian Arntzen
6480db7352
Merge pull request #661 from KhronosGroup/fix-645
GLSL: Allow blocks to have their own namespace.
2018-08-21 12:36:43 +02:00
Hans-Kristian Arntzen
20c8e6787c Get fallback name for block if name is empty. 2018-08-21 12:17:40 +02:00
Hans-Kristian Arntzen
f6ec83e5d4 GLSL: Allow blocks to have their own namespace. 2018-08-21 11:29:08 +02:00
Hans-Kristian Arntzen
973e2e6e42
Merge pull request #659 from KhronosGroup/fix-658
MSL: Fix segfault when trying to store to an array inside struct.
2018-08-08 17:08:53 +02:00
Hans-Kristian Arntzen
ffb753ff66 MSL: Fix segfault when trying to store to an array inside struct. 2018-08-08 16:48:22 +02:00
Hans-Kristian Arntzen
b9a33719fe
Merge pull request #657 from KhronosGroup/fix-656
MSL: Fix support for texelFetchOffset.
2018-08-07 17:28:29 +02:00
Hans-Kristian Arntzen
981d7c1d85 Need to make sure the fetch expression is uint. 2018-08-07 16:02:17 +02:00
Hans-Kristian Arntzen
eee290a029 MSL: Fix support for texelFetchOffset.
Just apply the offset directly, MSL has no immediate offset parameter.
2018-08-07 15:28:04 +02:00
Hans-Kristian Arntzen
1d1b5eb865
Merge pull request #655 from KhronosGroup/fix-643
MSL: Properly support passing parameters by value.
2018-08-06 16:02:35 +02:00
Hans-Kristian Arntzen
361fe52c9d MSL: Properly support passing parameters by value.
MSL would force thread const& which would not work if the input argument
came from a different storage class.

Emit proper non-reference arguments for such values.
2018-08-06 15:43:51 +02:00
Hans-Kristian Arntzen
de5195cbb2
Merge pull request #654 from KhronosGroup/fix-651
Deal with continue blocks which only flush phi variables.
2018-08-06 14:29:55 +02:00
Hans-Kristian Arntzen
34a21b96cf Add test case for phi-only continue block. 2018-08-06 14:06:40 +02:00
Hans-Kristian Arntzen
40bb42f9ab If we need to flush Phi, it's not a while loop. 2018-08-06 13:28:01 +02:00
Hans-Kristian Arntzen
3a268796e2 Deal with loop variable initializers for non-for loops. 2018-08-06 12:52:22 +02:00
Hans-Kristian Arntzen
5ba15a5a2f
Merge pull request #652 from yangjian/master
fix typo in CMakeLists.txt
2018-08-04 16:31:20 +02:00
Jian Yang
df6574d764 fix typo in CMakeLists.txt 2018-08-04 14:40:06 +08:00
Bill Hollings
162eee6325
Merge pull request #648 from billhollings/master
CompilerMSL disable rasterization on buffer writes in vertex shader.
2018-07-29 15:22:14 -04:00
Bill Hollings
c3d74e1e14 CompilerMSL disable rasterization on buffer writes in vertex shader. 2018-07-27 16:53:36 -04:00
Hans-Kristian Arntzen
439da40b1f
Merge pull request #646 from billhollings/master
Add CompilerMSL::get_is_rasterization_disabled() to manage rasterization status.
2018-07-27 11:34:56 +02:00
Bill Hollings
0d6202e770 Add CompilerMSL::get_is_rasterization_disabled() to manage rasterization status. 2018-07-26 16:40:32 -04:00
Hans-Kristian Arntzen
5be1d911cc
Merge pull request #644 from billhollings/master
CompilerMSL vertex entry point return void when rasterization disabled.
2018-07-26 16:36:53 +02:00
Bill Hollings
ac238b858b CompilerMSL vertex entry point return void when rasterization disabled.
Add CompilerMSL::Options::disable_rasterization input/output API flag.
Disable rasterization via API flag or when writing to textures.
Disable rasterization when shader declares no output.
Add test shaders for vertex no output and write texture forcing void output.
2018-07-26 00:50:33 -04:00
Hans-Kristian Arntzen
cc7679ee45 Workaround NOMINMAX issues on Windows.
::max() can be overridden if you forget NOMINMAX on Windows.
Hardcode literals instead. UINT32_MAX also requires weird macros in C++.
2018-07-17 00:10:12 +02:00
Hans-Kristian Arntzen
be7425ef70
Merge pull request #639 from KhronosGroup/fix-638
Properly track read dependencies for UAV access chain.
2018-07-09 14:30:16 +02:00
Hans-Kristian Arntzen
18b82caf83 Properly track read dependencies for UAV access chain. 2018-07-09 14:02:50 +02:00
Hans-Kristian Arntzen
9409247666
Merge pull request #637 from KhronosGroup/flattened-composites-fix
Fix a lot of redundant code when loading flattened composites.
2018-07-06 11:19:39 +02:00
Hans-Kristian Arntzen
e1367e609a Fix a lot of redundant code when loading flattened composites. 2018-07-06 10:57:23 +02:00
Hans-Kristian Arntzen
0f59016635
Merge pull request #636 from KhronosGroup/cfg-refactor
Refactor CFG analysis to handle static const LUTs
2018-07-05 16:23:39 +02:00