Commit Graph

3730 Commits

Author SHA1 Message Date
Laura Hermanns
5d7ee6ad11 Fix declaration of gl_SampleMaskIn[1] in HLSL backend. 2023-10-17 09:11:09 -04:00
Hans-Kristian Arntzen
2de1265fca
Merge pull request #2218 from KhronosGroup/pr-2217
Merge PR 2217
2023-10-16 12:19:24 +02:00
Hans-Kristian Arntzen
a4b8553982 Style fixups. 2023-10-16 11:55:41 +02:00
Hans-Kristian Arntzen
f30d280e7b Fixup stray comments in test_shaders.sh. 2023-10-16 11:52:21 +02:00
Hans-Kristian Arntzen
2d072c6828 Merge branch 'metal-3-1-regression-fix' of https://github.com/billhollings/SPIRV-Cross 2023-10-16 11:52:11 +02:00
Bill Hollings
16fbf8872a MSL: Workaround Metal 3.1 regression bug on recursive input structs.
Metal 3.1 introduced a Metal regression bug which causes an infinite recursion
crash during Metal's analysis of an entry point input structure that itself
contains internal recursion. This patch works around this by replacing the
recursive input declaration with a alternate variable of type void*, and
then casting to the correct type at the top of the entry point function.

- Add CompilerMSL::Options::replace_recursive_inputs to enable
  replacing recursive input.
- Add Compiler::type_contains_recursion() to determine if a struct
  contains internal recursion, and add custom Decorations to mark
  such structs, to short-cut future similar checks.
- Replace recursive input struct declarations with void*,
  and emit a recast to correct type at top of entry function.
- Add unit test.
- Compiler::type_is_top_level_block() remove hardcode reference to spirv_cross
  namespace, as it interferes with configurable namespaces (unrelated).
2023-10-14 14:46:47 -04:00
Hans-Kristian Arntzen
105d5a8a79 Fix stray namespace issue. 2023-10-14 12:36:49 +02:00
Hans-Kristian Arntzen
724433d729
Merge pull request #2216 from KhronosGroup/buffer-reference-2
GLSL: Use buffer_reference2 instead of 1.
2023-10-11 14:20:36 +02:00
Hans-Kristian Arntzen
082b1df25f
Merge pull request #2215 from KhronosGroup/fix-2210
GLSL: Fix and workaround some awkward code patterns
2023-10-11 14:20:11 +02:00
Hans-Kristian Arntzen
255ff2b19c GLSL: Use buffer_reference2 instead of 1.
Supports more syntax.
2023-10-11 14:18:36 +02:00
Hans-Kristian Arntzen
be944258be GLSL: Ignore bogus constant/undefs which use block types.
This is banned in more recent SPIR-V.
We cannot implement this in any reasonable way since block types don't
participate as normal types in GLSL.
2023-10-11 13:48:25 +02:00
Hans-Kristian Arntzen
75620181bc GLSL: Handle empty block declarations.
Similar fix as for structs.
2023-10-11 13:09:55 +02:00
Hans-Kristian Arntzen
73726f37c5 HLSL: Add missing reference output file. 2023-10-11 13:03:08 +02:00
Hans-Kristian Arntzen
09ba765844 MSL: Use powr instead of pow.
powr's additional UB rules match SPIR-V.
2023-10-11 12:55:12 +02:00
Hans-Kristian Arntzen
79401259fd
Merge pull request #2207 from etang-cw/CacheSpirvTools
Improve CI build times
2023-10-10 12:14:39 +02:00
Hans-Kristian Arntzen
1f289d38b2
Merge pull request #2211 from EpicGames/main
Add Natvis file with debug information for VectorView and SmallVector.
2023-10-10 12:03:36 +02:00
Laura Hermanns
5071f6c38e Add Natvis file with debug information for VectorView and SmallVector. 2023-10-09 14:01:53 -04:00
Evan Tang
f9dd8099fb Parallelize Github Actions builds 2023-10-03 15:29:02 -05:00
Evan Tang
5de6ae9d1e Cache externals in GitHub Actions 2023-10-03 15:29:02 -05:00
Hans-Kristian Arntzen
37fee00a71
Merge pull request #2205 from Try/hlsl-ssbo-array-store-fix
Fix unroll, when storing to pointer to array
2023-10-02 12:33:46 +02:00
Try
967ad0bb4d Fix unroll, when storing to pointer to array
#fixed #2196
2023-09-28 23:58:51 +02:00
Hans-Kristian Arntzen
6e1fb9b09e
Merge pull request #2203 from Try/msl-atomics-fix
MSL: fix extraction of global variables, in case of atomics
2023-09-25 10:39:13 +02:00
Hans-Kristian Arntzen
1870ec752c
Merge pull request #2201 from Try/msl-rayquery-mutability-fix
MSL: fix mutability for rayQueryEXT parameters
2023-09-25 10:36:21 +02:00
Try
43a59b7cff fix extraction of global variables, in case of atomics 2023-09-19 21:44:57 +02:00
Try
da9c861ed0 MSL: fix mutability for rayQueryEXT parameters 2023-09-16 19:33:27 +02:00
Hans-Kristian Arntzen
5e963d62fa
Merge pull request #2197 from Try/rich-descriptor-fixup
Fixup check for SPVFuncImplVariableSizedDescriptor
2023-09-12 11:42:26 +02:00
Try
8af391ec5d check for SPVFuncImplVariableSizedDescriptor 2023-09-06 22:32:42 +02:00
Hans-Kristian Arntzen
54997fb4bc
Merge pull request #2193 from KhronosGroup/fix-2192
MSL: Workaround bizarre crash on macOS.
2023-08-28 21:53:24 +02:00
Hans-Kristian Arntzen
b17dd5895a MSL: Workaround bizarre crash on macOS. 2023-08-28 11:54:58 +02:00
Hans-Kristian Arntzen
7ba6f5ce90
Merge pull request #2190 from hiteshbosamiya/SC-2189
[SC-2189] Compiler::get_shader_resources() does not return all uniforms
2023-08-28 11:33:00 +02:00
Hitesh A. Bosamiya
df7fa1b92b [SC-2189] Compiler::get_shader_resources() does not return all uniforms 2023-08-26 11:35:16 +05:30
Hans-Kristian Arntzen
acf51c1b9f
Merge pull request #2191 from KhronosGroup/mesh-clip-cull-fix
GLSL: Fix Clip/Cull in mesh shaders.
2023-08-25 12:55:00 +02:00
Hans-Kristian Arntzen
b76394e66a GLSL: Fix Clip/Cull in mesh shaders. 2023-08-25 11:59:21 +02:00
Hans-Kristian Arntzen
633dc30135
Merge pull request #2187 from KhronosGroup/mesh-invariant-position
GLSL: Emit inline invariant position for mesh shaders.
2023-08-17 13:51:54 +02:00
Hans-Kristian Arntzen
a3f026815a
Merge pull request #2186 from KhronosGroup/64bit-images
GLSL: Implement 64-bit image support.
2023-08-17 13:50:29 +02:00
Hans-Kristian Arntzen
e7e2e8cef0
Merge pull request #2185 from KhronosGroup/perprimitive-fix
GLSL: Require mesh shader when using perprimitiveEXT in frag shader.
2023-08-17 13:50:22 +02:00
Hans-Kristian Arntzen
62664e421b
Merge pull request #2184 from KhronosGroup/msl-runtime-array-to-argument-buffer
Land PR 2179
2023-08-17 13:50:13 +02:00
Hans-Kristian Arntzen
79d63934a6 GLSL: Emit inline invariant position for mesh shaders.
Work around missing feature from GLSL. Normally we can emit a global
invariant gl_Position; and call it a day, but it does not work for mesh
shaders it seems. Declaring invariance inside an explicit IO block works
fine on the other hand ...
2023-08-17 12:45:54 +02:00
Hans-Kristian Arntzen
5e3ea64843 GLSL: Implement 64-bit image support. 2023-08-17 12:17:55 +02:00
Hans-Kristian Arntzen
5ffc813dc4 GLSL: Require mesh shader when using perprimitiveEXT in frag shader. 2023-08-17 12:07:11 +02:00
Hans-Kristian Arntzen
44966e5000 MSL: Fixup nits from review. 2023-08-17 12:01:26 +02:00
Try
844cb59cd6 MSL: runtime array over argument buffers 2023-08-17 11:37:29 +02:00
Hans-Kristian Arntzen
637c211c6f
Merge pull request #2153 from etang-cw/TexFence
[WIP] MSL: Prevent RAW hazards on read_write textures
2023-08-17 11:05:55 +02:00
Evan Tang
894113f55b MSL: Make rw texture fences optional 2023-08-15 11:32:33 -05:00
Evan Tang
4405dd6b28 MSL: Prevent RAW hazards on read_write textures 2023-08-15 11:32:33 -05:00
Hans-Kristian Arntzen
bccaa94db8
Merge pull request #2178 from billhollings/arg-buff-fixes
Fix argument buffer padding when content includes arrays.
2023-07-26 10:52:38 +02:00
Bill Hollings
05524e7f82 Fix argument buffer padding when content includes arrays.
- When determining need for arg buffer padding, use the descriptor count provided
  by the app, rather than the shader, to determine the number of slots consumed,
  as the shader may only be accessing part, or even one element, of the array.
2023-07-14 18:57:34 -04:00
Hans-Kristian Arntzen
b43c1a1e63
Merge pull request #2176 from Try/msl-intersection-params
MSL: ray-query intersection params
2023-07-14 16:02:40 +02:00
Try
6b2ae11830 update rq unit tests 2023-07-03 21:45:34 +02:00
Try
35b23ef48f update rq unit tests 2023-07-03 20:04:23 +02:00