Commit Graph

2841 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
4704482bbc meta: Update copyright headers to 2021. 2021-01-14 16:07:49 +01:00
Hans-Kristian Arntzen
820179bf46
Merge pull request #1590 from KhronosGroup/fix-1584
Update ray-tracing support to include SPV_KHR_ray_tracing
2021-01-09 22:28:19 +01:00
Hans-Kristian Arntzen
2097c30985 GLSL: Support both SPV_KHR_ray_tracing and NV_ray_tracing.
Fairly minor differences, so can keep them side by side without too much
effort. NV support is effectively deprecated now however.

- Add OpConvertUToAccelerationStructureKHR
- Ignore/Terminate ray is now a terminator in KHR, but a call in NV.
- Fix some bugs with reportIntersection.
2021-01-08 14:59:04 +01:00
Hans-Kristian Arntzen
702c903f98
Merge pull request #1589 from KhronosGroup/roll-deps
Roll dependencies.
2021-01-08 14:58:44 +01:00
Hans-Kristian Arntzen
ce18d1b8a5 CLI: Fix silly regression with handling of -V. 2021-01-08 10:51:49 +01:00
Hans-Kristian Arntzen
5d82d32e0f Roll dependencies. 2021-01-08 10:41:51 +01:00
Hans-Kristian Arntzen
0e5078dc0c
Merge pull request #1588 from KhronosGroup/fix-1582
MSL: Fix some edge cases in input attachment handling.
2021-01-08 10:37:19 +01:00
Hans-Kristian Arntzen
893a011299 MSL: Fix various bugs with framebuffer fetch on macOS and argument buffers.
Introduce a helper to make it clearer if a resource can be
considered for argument buffers or not.
2021-01-08 10:19:18 +01:00
Hans-Kristian Arntzen
3136e34215 MSL: Always use input_attachment_index for framebuffer fetch binding.
--msl-decoration-binding would end up overriding the input attachment
index to binding which is very unexpected and broken.
2021-01-08 10:17:42 +01:00
Hans-Kristian Arntzen
134a520034
Merge pull request #1587 from KhronosGroup/refactor-active-variable-consideration
Refactor active variable consideration
2021-01-08 10:16:22 +01:00
Hans-Kristian Arntzen
03ee71e86c Add test for pure initializer gl_FragDepth.
Tests that the builtin is considered active.
2021-01-07 15:32:15 +01:00
Hans-Kristian Arntzen
3776d8978c GLSL: Force block declaration if clip/cull is used in tesc. 2021-01-07 15:32:15 +01:00
Hans-Kristian Arntzen
014b3bc5ea MSL: Make sure initialized output builtins are considered active. 2021-01-07 15:32:13 +01:00
Hans-Kristian Arntzen
a4a9b53b5b MSL: Always enable Outputs in vertex stages.
Subsequent stages can legally attempt to read from these variables,
which causes compilation failure.

Always make sure we emit user outputs in vertex shaders if they are
active in the entry point.
2021-01-07 11:24:47 +01:00
Hans-Kristian Arntzen
fa76d01203 MSL: Only consider builtin variables if they are part of IO interface. 2021-01-07 10:50:29 +01:00
Hans-Kristian Arntzen
c8837d7d80 MSL: Very slight refactor. 2021-01-07 10:27:14 +01:00
Hans-Kristian Arntzen
234c65c0f3
Merge pull request #1585 from KhronosGroup/fix-1569
GLSL: Update SPIR-V headers for modified ray tracing opcodes.
2021-01-07 09:51:37 +01:00
Hans-Kristian Arntzen
72e9f619a9
Merge pull request #1583 from KhronosGroup/fix-1567
CLI: Add stdin support.
2021-01-07 09:51:22 +01:00
Hans-Kristian Arntzen
42ec132357
Merge pull request #1581 from KhronosGroup/fix-1554
GLSL/MSL: Handle more complicated tessellation Output initializers
2021-01-07 09:51:09 +01:00
Hans-Kristian Arntzen
c033a93951 GLSL: Fix -Wshadow error. 2021-01-06 12:59:57 +01:00
Hans-Kristian Arntzen
1a28a04333 GLSL: Update SPIR-V headers for modified ray tracing opcodes. 2021-01-06 11:38:27 +01:00
Hans-Kristian Arntzen
02b7f9cbe9 CLI: Add stdin support. 2021-01-06 11:06:41 +01:00
Hans-Kristian Arntzen
efed4c9738 MSL: Fix initializer for tess level outputs.
It's an array, not vector.
2021-01-06 10:39:39 +01:00
Hans-Kristian Arntzen
ab9200ffdf MSL: Don't flatten builtin arrays unless they're part of IO interface. 2021-01-06 10:33:17 +01:00
Hans-Kristian Arntzen
df4f8ef8fe MSL: Emit correct initializer for tessellation control points. 2021-01-05 15:16:49 +01:00
Hans-Kristian Arntzen
ad3e1584f9 MSL: Handle initializers for tess levels. 2021-01-05 13:25:50 +01:00
Hans-Kristian Arntzen
39fee93906 GLSL: Refactor out Output variable initialization. 2021-01-05 12:50:36 +01:00
Hans-Kristian Arntzen
6a3ea0385e GLSL: Add test for initializing tess level output. 2021-01-05 12:12:26 +01:00
Hans-Kristian Arntzen
175381fe08 GLSL: Handle some extreme edge cases in Output variable initialization.
Deal with patch blocks, arrays of patch blocks, arrays of blocks, etc.
2021-01-05 12:06:36 +01:00
Hans-Kristian Arntzen
7b7a21c405
Merge pull request #1578 from KhronosGroup/fix-1568
Improve handling of complex variable initialization
2021-01-05 10:12:40 +01:00
Hans-Kristian Arntzen
1a38fec382 Minor redundant nit. 2021-01-04 19:12:46 +01:00
Hans-Kristian Arntzen
a1c784f002 More robust handling of initialized output builtin variables. 2021-01-04 19:12:43 +01:00
Hans-Kristian Arntzen
9a304fe931 Handle output IO block initializers more robustly. 2021-01-04 19:04:10 +01:00
Hans-Kristian Arntzen
49ab12919c
Merge pull request #1577 from KhronosGroup/fix-1574
CMake: Disable compiler extensions explicitly.
2021-01-04 16:37:49 +01:00
Hans-Kristian Arntzen
3514c9ff33
Merge pull request #1576 from KhronosGroup/fix-1571
MSL: Fix broken reserved identifier handling for entry points
2021-01-04 15:05:06 +01:00
Hans-Kristian Arntzen
3a85d1c80c CMake: Disable compiler extensions explicitly.
Compiles fine with just -std=c++11.
2021-01-04 10:17:59 +01:00
Hans-Kristian Arntzen
ddb3c65648 Handle reserved identifiers for functions.
gl_ identifiers are already handled by fixups, so remove redundant code.
2021-01-04 10:00:12 +01:00
Hans-Kristian Arntzen
c4ff129fe3 MSL: Handle reserved identifiers for entry point.
We only considered invalid names, and overwrote the alias for the
function. The correct fix is to replace illegal names early, do the
reserved fixup, then copy back alias to entry point name.
2021-01-04 09:40:11 +01:00
Hans-Kristian Arntzen
e50f7d1ce8
Merge pull request #1566 from KhronosGroup/subgroup-table-fix
GLSL: Fix KHR subgroup extension table for subgroups.
2020-12-11 14:38:13 +01:00
Hans-Kristian Arntzen
c8765a75f2 GLSL: Fix KHR subgroup extension table for subgroups. 2020-12-11 12:26:43 +01:00
Hans-Kristian Arntzen
762c3082ae
Merge pull request #1564 from KhronosGroup/fix-1558
GLSL: Emit nonuniformEXT in correct place for late-combined samplers.
2020-12-07 14:07:38 +01:00
Hans-Kristian Arntzen
1eb42eb18c
Merge pull request #1563 from KhronosGroup/fix-1559
GLSL/HLSL: Disallow VariablePointers capability outright.
2020-12-07 13:13:52 +01:00
Hans-Kristian Arntzen
a11c4780d0 GLSL: Emit nonuniformEXT in correct place for late-combined samplers.
Need to emit nonuniformEXT(sampler2D()) since constructor expressions in
Vulkan GLSL do not propgate the nonuniform qualifier.
2020-12-07 13:00:15 +01:00
Hans-Kristian Arntzen
dc940846d7 GLSL/HLSL: Disallow VariablePointers capability outright.
Cannot be supported, error out early.
2020-12-07 12:16:02 +01:00
Hans-Kristian Arntzen
6d10da0224
Merge pull request #1553 from comex/no-subgroups-in-vertex-shaders
msl: Don't try to use [[thread_index_in_simdgroup]] in vertex shaders.
2020-12-02 19:29:19 +01:00
Hans-Kristian Arntzen
f41b59b36e
Merge pull request #1557 from KhronosGroup/mit-dual-license-api
Add MIT dual license for the SPIRV-Cross API and CLI.
2020-12-01 16:50:11 +01:00
Hans-Kristian Arntzen
cf1e9e0643 Add MIT dual license for the SPIRV-Cross API. 2020-12-01 16:47:08 +01:00
Hans-Kristian Arntzen
0b79db773f Merge branch 'master' of git://github.com/js6i/SPIRV-Cross 2020-12-01 14:17:35 +01:00
Jan Sikorski
c09a65c12d MSL: Added fmin3 and fmax3 library functions to the illegal name list. 2020-11-27 15:25:34 +01:00
comex
5a85fa9400 msl: Don't try to use [[thread_index_in_simdgroup]] in vertex shaders.
According to the Metal Shading Language Specification, it's not
supported for vertex functions in any Metal version, only fragment and
kernel functions.
2020-11-26 20:19:08 -05:00