Commit Graph

1395 Commits

Author SHA1 Message Date
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
Hans-Kristian Arntzen
2bf57d6dff Deal with composite constants in variable initializer. 2018-07-05 15:29:49 +02:00
Hans-Kristian Arntzen
dcddd5326e Add LUT test cases for OpVariable with initializer. 2018-07-05 14:51:07 +02:00
Hans-Kristian Arntzen
af290ede87 Remove some redundant spvArrayCopy declarations. 2018-07-05 14:43:12 +02:00
Hans-Kristian Arntzen
8c314112b4 Run format_all.sh. 2018-07-05 14:18:34 +02:00
Hans-Kristian Arntzen
5582523d9a Add some tests for LUT promotion.
Also, update other tests.
2018-07-05 14:14:18 +02:00
Hans-Kristian Arntzen
5143695080 Don't need to enclose expression for arrays. 2018-07-05 14:09:25 +02:00
Hans-Kristian Arntzen
d29f48ef06 Deduce constant LUTs from read-write variables. 2018-07-05 13:25:57 +02:00
Hans-Kristian Arntzen
b5ed706860 Hoist out variable scope analysis. 2018-07-05 10:42:05 +02:00
Hans-Kristian Arntzen
c26c41b26b Make the CFGs for all active functions available.
Will make writing other CFG-depended stuff easier.
2018-07-04 17:26:53 +02:00
Hans-Kristian Arntzen
6fdadb9218 Track partial writes as well.
We will need this for LUT promotion.
2018-07-04 16:46:25 +02:00
Hans-Kristian Arntzen
7216129377 Hoist out the inline VariableAccessHandler class.
Will need this refactor to make it more widely useful for more advanced
workarounds.
2018-07-04 16:20:38 +02:00
Hans-Kristian Arntzen
f96c9f9fb4
Merge pull request #635 from KhronosGroup/fix-631
Support OpTypeImage with depth == 2 (unknown) properly.
2018-07-04 14:45:01 +02:00