Commit Graph

1664 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
040204d65c Fix warnings and run format_all.sh. 2018-06-22 09:41:43 +02:00
Hans-Kristian Arntzen
b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross 2018-06-22 09:36:09 +02:00
Sidney Just
f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 2018-06-22 00:28:40 -07:00
Brad Davis
9ad432463c Prefix integer types with underscore 2018-06-21 09:24:22 -07:00
Brad Davis
0ad0f948e1 More PR feedback 2018-06-21 07:43:52 -07:00
Brad Davis
3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 2018-06-20 11:49:58 -07:00
Brad Davis
8d84a541ac Add specialization constant output in reflection 2018-06-20 11:47:31 -07:00
Brad Davis
762040084d More feedback 2018-06-20 10:25:38 -07:00
Brad Davis
d0a67ba6a7 Code consolidation, const correctness, faster regression testing 2018-06-20 09:20:45 -07:00
Brad Davis
3a825349bc More cleanup 2018-06-20 09:20:45 -07:00
Brad Davis
6c88b0048b PR feedback 2018-06-20 09:20:45 -07:00
Brad Davis
ee86000529 Cleanup code 2018-06-20 09:20:45 -07:00
Brad Davis
709d3c60f2 Working on reflection output 2018-06-20 09:20:45 -07:00
Hans-Kristian Arntzen
0039cb86fc
Merge pull request #613 from KhronosGroup/fix-609
Deal with switch case labels which share a block.
2018-06-20 11:24:22 +02:00
Hans-Kristian Arntzen
9d31154917 Deal with switch case labels which share a block. 2018-06-20 10:49:28 +02:00
Hans-Kristian Arntzen
e59cc24495
Merge pull request #607 from billhollings/master
CompilerMSL support matrices & arrays in stage-in & stage-out.
2018-06-13 20:37:20 +02:00
Bill Hollings
ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. 2018-06-12 11:51:56 -04:00
Bill Hollings
ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2018-06-12 11:42:56 -04:00
Bill Hollings
9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out.
Support flattening StorageOutput & StorageInput matrices and arrays.
No longer move matrix & array inputs to separate buffer.
Add separate SPIRFunction::fixup_statements_in & SPIRFunction::fixup_statements_out
instead of just  SPIRFunction::fixup_statements.
Emit SPIRFunction::fixup_statements at beginning of functions.
CompilerMSL track vars_needing_early_declaration.
Pass global output variables as variables to functions that access them.
Sort input structs by location, same as output structs.
Emit struct declarations in order output, input, uniforms.
Regenerate reference shaders to new formats defined by above.
2018-06-12 11:41:35 -04:00
Hans-Kristian Arntzen
285f214071
Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl
Also unpack regular unary/binary operations on MSL.
2018-06-12 10:13:11 +02:00
Hans-Kristian Arntzen
58fab58e5e Do not unpack transposed matrices. 2018-06-12 09:43:47 +02:00
Hans-Kristian Arntzen
192a882df3 Also unpack regular unary/binary operations on MSL.
Apparently MSL gets confused when you have packed_float3 op float3 ...
2018-06-11 16:23:09 +02:00
Hans-Kristian Arntzen
dc565136fb
Merge pull request #604 from KhronosGroup/fix-603
Unpack expressions when used in functions on MSL.
2018-06-11 12:09:58 +02:00
Hans-Kristian Arntzen
b86bd0a265 Unpack expressions when used in functions on MSL.
OSX 10.14 broke (?) how overload resolution works,
so overloading e.g. dot(float3, packed_float3) no longer works.

Fix this by unpacking expressions before various func ops.
This fix might need to be applied elsewhere, but do so later if needed.
2018-06-11 10:56:45 +02:00
Hans-Kristian Arntzen
c5b6ba239c
Merge pull request #599 from KhronosGroup/fix-295
Emit matrix layouts in structs directly.
2018-06-05 10:03:34 +02:00
Hans-Kristian Arntzen
f1e8555801 Emit matrix layouts in structs directly.
Unlike GLSL, child structs do not inherit matrix layouts.
2018-06-05 09:42:07 +02:00
Hans-Kristian Arntzen
b1196f2ace
Merge pull request #598 from KhronosGroup/fix-594
Sanitize underscores in general, not just for members.
2018-06-04 10:33:49 +02:00
Hans-Kristian Arntzen
6bcc890e63 Sanitize underscores in general, not just for members. 2018-06-04 10:13:57 +02:00
Hans-Kristian Arntzen
6fea07f2fd
Merge pull request #597 from KhronosGroup/fix-595-596-592
Various maintenance fixes.
2018-06-03 12:22:25 +02:00
Hans-Kristian Arntzen
3a9b045dc3 Various maintenance fixes.
- Do not emit set = in GLSL, even when non-zero.
- Fix warning on tautological comparison.
- Expose get_buffer_block_flags as mentioned in reflection guide.
2018-06-03 12:00:22 +02:00
Hans-Kristian Arntzen
0a83bacf3e
Merge pull request #593 from KhronosGroup/old-clang-compile
Fix compile on older clang.
2018-05-30 19:58:48 +01:00
Hans-Kristian Arntzen
2a1ab4108b
Fix compile on older clang. 2018-05-30 20:14:26 +02:00
Hans-Kristian Arntzen
6ef1c49ec0
Merge pull request #591 from KhronosGroup/fix-578
Fix image load/store on cube arrays in MSL.
2018-05-25 13:27:29 +01:00
Hans-Kristian Arntzen
04b149feb0 Fix image load/store on cube arrays in MSL. 2018-05-25 12:43:25 +02:00
Hans-Kristian Arntzen
8bac5c09f3
Merge pull request #590 from KhronosGroup/fix-581
Deal with packed expressions in more scenarios.
2018-05-25 10:24:33 +01:00
Hans-Kristian Arntzen
f65120c147 Deal with packed expressions in more scenarios.
Make a new "to_extract_component_expression" helper.
2018-05-25 10:57:02 +02:00
Hans-Kristian Arntzen
db1ed375b0
Merge pull request #589 from KhronosGroup/fix-580
Use const device address space for readonly SSBOs in MSL.
2018-05-25 09:45:52 +01:00
Hans-Kristian Arntzen
280fb93204 Add test for reading SSBO from fragment shader on MSL. 2018-05-25 10:20:17 +02:00
Hans-Kristian Arntzen
a1b3964cbd Run format_all.sh. 2018-05-25 10:14:13 +02:00
Hans-Kristian Arntzen
6b3da831be Declare read-only SSBOs as const device in MSL. 2018-05-25 10:14:05 +02:00
Hans-Kristian Arntzen
08336e7bbb
Merge pull request #588 from KhronosGroup/pr-583
Commit tests for PR #583
2018-05-24 09:53:19 +01:00
Hans-Kristian Arntzen
46bf17c5d3 Add SREM tests for HLSL/MSL. 2018-05-24 10:34:36 +02:00
Hans-Kristian Arntzen
7cba89b4a5 Add reference files for SREM. 2018-05-24 10:26:11 +02:00
Jin Zhou
6b144cc609 handle OpSRem 2018-05-24 10:22:01 +02:00
Jin Zhou
e792cd6160 no expression type for OpSRem
fix issue#582
2018-05-24 10:22:01 +02:00
Hans-Kristian Arntzen
f1eacba244
Merge pull request #587 from zeux/master
Fix textureGrad compilation for legacy targets
2018-05-24 09:14:17 +01:00
Arseny Kapoulkine
91fd41816f Fix textureGrad compilation for legacy targets
textureGrad isn't part of core GL2 or GLES2. In desktop GL, it's
provided by GL_ARB_shader_texture_lod and is called texture2DGradARB; in
ES, it's provided by GL_EXT_shader_texture_lod and is called
texture2DGradEXT.

This change rewrites textureGrad similarly to textureProj as per above.
2018-05-23 14:06:37 -07:00
Hans-Kristian Arntzen
8cc1fdbb30
Merge pull request #586 from KhronosGroup/fix-584
Add support for inheriting bindings for combined image samplers.
2018-05-23 22:01:48 +01:00
Hans-Kristian Arntzen
ba15daee33 Add support for inheriting bindings for combined image samplers. 2018-05-23 20:34:26 +01:00
Hans-Kristian Arntzen
f929c361c5
Merge pull request #577 from KhronosGroup/fix-575
Fix atomic_compare_exchange_weak_explicit.
2018-05-16 11:09:12 +02:00