Commit Graph

1544 Commits

Author SHA1 Message Date
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
Hans-Kristian Arntzen
d67e586b2e
Merge pull request #626 from billhollings/master
CompilerMSL support larger texel buffers by using 2D Metal textures.
2018-06-27 18:03:45 +02:00
Bill Hollings
9bf226cb05 Fixes for code review of PR 626. 2018-06-27 10:34:15 -04:00
Bill Hollings
4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures.
Add CompilerMSL::Options::texture_width_max.
Emit and use spvTexelBufferCoord() function to convert 1D
texel buffer coordinates to 2D Metal texture coordinates.
2018-06-26 17:30:21 -04:00
Hans-Kristian Arntzen
314f39a7c4
Merge pull request #621 from billhollings/master
CompilerMSL pass builtin struct members into functions.
2018-06-25 20:29:18 +02:00
Bill Hollings
4beefe756c Fixes from PR 621 code review. 2018-06-25 11:40:20 -04:00
Bill Hollings
f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2018-06-25 10:52:15 -04:00
Hans-Kristian Arntzen
0ea5e0549e
Merge pull request #615 from JustSid/master
Added support for shadowXY() sample instructions in legacy GLSL
2018-06-25 11:52:45 +02:00
Sidney Just
5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions 2018-06-25 02:11:46 -07:00
Sidney Just
ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 2018-06-25 02:06:45 -07:00
Hans-Kristian Arntzen
994f789465
Merge pull request #624 from KhronosGroup/fix-619
Support branch/loop hints in HLSL.
2018-06-25 10:53:52 +02:00
Hans-Kristian Arntzen
33c61d2abe Support branch/loop hints in HLSL. 2018-06-25 10:33:13 +02:00
Hans-Kristian Arntzen
327fb03677
Merge pull request #623 from KhronosGroup/fix-618
Support globallycoherent in HLSL.
2018-06-25 10:31:28 +02:00
Hans-Kristian Arntzen
2077478651
Merge pull request #622 from KhronosGroup/fix-620
Support ternary expressions in OpSpecConstantOp.
2018-06-25 10:31:15 +02:00
Hans-Kristian Arntzen
10dfaf79d5 Support globallycoherent in HLSL. 2018-06-25 10:04:25 +02:00
Hans-Kristian Arntzen
ffa9133d77 Support ternary expressions in OpSpecConstantOp. 2018-06-25 09:49:13 +02:00
Bill Hollings
e091031613 CompilerMSL pass builtin struct members into functions.
Add and use Compiler::get_non_pointer_type() convenience functions.
2018-06-24 15:06:12 -04:00
Hans-Kristian Arntzen
7607eb6923
Merge pull request #617 from KhronosGroup/fix-612
Deal with some builtins being declared with wrong signedness.
2018-06-22 12:21:14 +02:00
Hans-Kristian Arntzen
d94d20f4f3 Deal with some builtins being declared with wrong signedness. 2018-06-22 11:30:56 +02:00
Sidney Just
0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 2018-06-22 01:57:25 -07:00
Sidney Just
447a253ce7 Simplified check for depth texture 2018-06-22 01:57:19 -07:00
Hans-Kristian Arntzen
76c8e3c1c4
Merge pull request #616 from KhronosGroup/fix-614
Add support to remove SPIRV_Cross_BaseInstance uniform.
2018-06-22 10:28:48 +02:00
Hans-Kristian Arntzen
b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 2018-06-22 10:01:38 +02:00
Hans-Kristian Arntzen
809631ce21 Mention JSON backend in README. 2018-06-22 09:48:30 +02:00
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