Commit Graph

1587 Commits

Author SHA1 Message Date
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
Hans-Kristian Arntzen
e044732896 Support OpTypeImage with depth == 2 (unknown) properly.
Track which OpSampledImages are ever used with Dref opcodes.
2018-07-04 14:26:23 +02:00
Hans-Kristian Arntzen
a6814a405a
Merge pull request #630 from KhronosGroup/fix-628
Fail more gracefully with some unsupported opcodes.
2018-07-02 14:03:29 +02:00
Hans-Kristian Arntzen
af2d3abd03 Fail more gracefully with some unsupported opcodes. 2018-07-02 13:22:21 +02:00
Hans-Kristian Arntzen
26107ba200 Fix os.errno issues on Travis. 2018-07-02 13:12:58 +02:00
cedega
ee44f6027b Changed OpTypeImage to only flag depth if the op is 1
Based on the SPIR-V spec, `Depth` is only guaranteed if the op is 1. An op of 2 may or may not be depth, which is what DXC outputs for all texture types.

https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html#OpTypeImage

https://github.com/Microsoft/DirectXShaderCompiler/blob/master/docs/SPIR-V.rst#textures
2018-06-30 04:38:19 -07:00
Hans-Kristian Arntzen
c863f53cac
Merge pull request #627 from KhronosGroup/macro-namespace-fix
Add basic namespace to internal macros
2018-06-28 23:55:58 +02:00
Hans-Kristian Arntzen
9ddbd5aff6 Run format_all.sh. 2018-06-28 23:00:26 +02:00
Hans-Kristian Arntzen
f1752e58e1 Add basic namespace to internal macros.
Some projects build SPIRV-Cross as a single translation unit
and this causes a lot of warnings because the same macro is redeclared
multiple times in the different backends. This make sure that each
backend has its own namespace for internal macros.
2018-06-28 22:57:52 +02:00