Commit Graph

1047 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
376a308dc7 GLSL: Handle ptr-to-array casts with unexpected array strides. 2024-01-18 14:14:10 +01:00
Hans-Kristian Arntzen
3da5bc7a57 GLSL: Forward declare non-block BDA types as well.
With non-block structs, we can have pointers in those types too.
2024-01-18 12:56:31 +01:00
Hans-Kristian Arntzen
871ac0e5b7 GLSL: Handle BDA to plain non-block struct.
The implementation assumed that BDA to struct would always result in a
Block-like type, but that is not necessarily the case. Treat non-Block
structs as POD types as well.
2024-01-18 12:40:47 +01:00
Wooyoung Kim
1efe04cfce Add supprot for the SPV_QCOM_image_processing extension 2024-01-08 09:58:27 -08:00
Wooyoung Kim
8028f75685
Merge branch 'KhronosGroup:main' into SPV_QCOM_image_processing 2024-01-08 09:36:01 -08:00
Wooyoung Kim
a7b6f3a34a Add supprot for the SPV_QCOM_image_processing extension 2024-01-05 22:38:08 -08:00
Hans-Kristian Arntzen
ec87a03655 MSL: Plumb through member state to image/sampler types. 2024-01-05 16:08:29 +01:00
Hans-Kristian Arntzen
bedc49b859 HLSL: Fix issue with vec4 straddle rules in substructs. 2024-01-05 14:07:05 +01:00
Hans-Kristian Arntzen
833c5936b0 Various nit fixes and improvements from review. 2023-12-07 14:31:36 +01:00
Hans-Kristian Arntzen
e3d1b9afbb Merge branch 'spirtype-refactor' of https://github.com/Hugobros3/SPIRV-Cross into pr-2238 2023-12-07 12:05:48 +01:00
Hans-Kristian Arntzen
ffab994ab0 MSL: Wrap dereferenced ptr-chain expressions. 2023-12-06 17:09:25 +01:00
Hans-Kristian Arntzen
6dbec321d2 MSL: Defererence pointer expressions before traversing access chain.
Exception is struct which does -> for us.
2023-12-06 17:09:25 +01:00
Hans-Kristian Arntzen
0836c81e73 MSL: Only do address-of expression when needed. 2023-12-06 16:18:58 +01:00
Hans-Kristian Arntzen
e2886f0946 MSL: Consider PtrAccessChain on array types. 2023-12-06 16:18:58 +01:00
Chip Davis
c0760eb91f MSL: Fix patch vertex count with raw buffer tese input.
We can no longer rely on the `patch_control_point<>` array being
present, so the best we can do is use the value given us at compile
time.

This was an oversight on my part when I initially implemented the
raw-buffer tessellation evaluation input mode. The lack of tests for the
`PatchVertices` built-in almost certainly contributed, so I fixed that
in this patch.

Fixes the test
`dEQP-VK.tessellation.shader_input_output.patch_vertices_in_tes`. This
is the last failing test under `dEQP-VK.tessellation`.
2023-12-04 14:24:16 -08:00
Hugo Devillers
738bfd49e3 msl: fix test regressions with samplemask 2023-12-04 12:47:15 +01:00
Hugo Devillers
950cad5913 Added an Op field to SPIRType
This field allows telling what the 'head' of the type is, without having to look at parent types.
2023-11-30 12:28:50 +01:00
Hans-Kristian Arntzen
57dbfa0400 MSL: Support std140 half matrices and arrays.
Super awkward since there is no clean way to express this.
2023-11-27 15:28:20 +01:00
chirsz-ever
20dd53b312
Allow to customize float literals in output 2023-11-22 22:17:24 +08:00
Hans-Kristian Arntzen
bf059200be
Only use lowp path for legacy ES 2023-11-16 14:00:48 +01:00
Hans-Kristian Arntzen
0e9bc69128
Review nit, update brace placement 2023-11-16 14:00:00 +01:00
Eliza Velasquez
93150ed7fb Workaround for generating bool uniforms in ESSL1
Fixes #2223.
2023-11-13 15:23:36 -08:00
Hans-Kristian Arntzen
2fba284b4e MSL: Improve handling of sample masks. 2023-10-23 14:40:28 +02:00
Hans-Kristian Arntzen
f12ee5e0a4 Merge remote-tracking branch 'epic/fixes_hlsl' 2023-10-23 11:54:49 +02:00
Laura Hermanns
5d7ee6ad11 Fix declaration of gl_SampleMaskIn[1] in HLSL backend. 2023-10-17 09:11:09 -04: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
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
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
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
8ec95fbe16 Consider dynamically indexed gl_Position in mesh. 2023-07-03 14:20:27 +02:00
Hans-Kristian Arntzen
601b60c531 Consider plain Position builtin variable as well. 2023-07-03 14:15:26 +02:00
Hans-Kristian Arntzen
a065c3b48a Merge branch 'dx12-mesh-flip-y' of https://github.com/Try/SPIRV-Cross into pr-2168 2023-07-03 13:55:02 +02:00
Try
68376504a0 track access to meshlet position.y, via SPIRExpression 2023-07-01 15:49:35 +02:00
Hans-Kristian Arntzen
0e1ce21d75 Skip line directives when emitting loop condition blocks.
Avoids problem where enabling line directives breaks loop optimizations
since it thinks there are legitimate statements in the block.
2023-06-12 12:33:58 +02:00
Hans-Kristian Arntzen
030d0be28c
Merge pull request #2163 from KhronosGroup/fix-2162
GLSL: Fix bug with mixed precision on PHI variables.
2023-06-07 16:27:50 +02:00
Hans-Kristian Arntzen
5b322555d6 GLSL: Fix bug with mixed precision on PHI variables. 2023-06-07 15:31:29 +02:00
Hans-Kristian Arntzen
74702f5077
Merge pull request #2161 from KhronosGroup/fix-2151
Fix more edge cases in bool <-> short remapping
2023-06-07 15:30:10 +02:00
Hans-Kristian Arntzen
13e6981cc8 MSL: Consider changed array types for array-of-constant-bool in struct. 2023-06-07 13:54:50 +02:00
Hans-Kristian Arntzen
8735108609 MSL: Consider bool-short remapping for constant expressions as well. 2023-06-07 12:33:37 +02:00
Hans-Kristian Arntzen
74bae9a06c Minor cleanup in constant_expression(). 2023-06-07 12:30:57 +02:00
Hans-Kristian Arntzen
bbcd8de9a3 MSL: Handle more complex array copy scenarios with bool <-> short. 2023-06-06 15:05:56 +02:00
Hans-Kristian Arntzen
01b98264ce MSL: Handle stores to struct bool[]. 2023-06-06 13:55:29 +02:00
Hans-Kristian Arntzen
c4eb2317a4 MSL: Consider bool/short remapping when dealing with composites. 2023-06-06 13:19:21 +02:00
Hans-Kristian Arntzen
2ace2714ed
Apply suggestions from code review 2023-06-06 12:41:59 +02:00