Commit Graph

1018 Commits

Author SHA1 Message Date
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
Tibor Klajnscek
c4fdb3f371 added get_required_extensions() API to GLSL compiler 2023-05-26 15:43:43 +02:00
Hans-Kristian Arntzen
6df60be69f Merge remote-tracking branch 'epic/fixes_hlsl' 2023-05-19 11:10:24 +02:00
Laura Hermanns
bcb6243798 HLSL: Add support to preserve (RW)StructuredBuffer resources. 2023-05-12 14:41:00 -04:00
Hans-Kristian Arntzen
193ca867ca MSL: Don't hit array copy path for pointer to array.
Pointee type of load and store pointers must be a top-level array type.
2023-05-10 12:46:35 +02:00
Hans-Kristian Arntzen
88790d3145 GLSL: Disambiguate pointer vs array properly in packed_size/alignment. 2023-05-10 12:35:47 +02:00
Hans-Kristian Arntzen
54b48a2f3a
Merge pull request #2133 from georgeouzou/main
GLSL: Support GL_KHR_shader_subgroup_arithmetic (WIP)
2023-05-10 11:32:00 +02:00
George Ouzounoudis
813cfdce4f GLSL: Address review comments
Fix a warning and some format issues
2023-05-01 14:24:33 +03:00
Laura Hermanns
16b5ce09d7 GLSL: Use actual field offset to validate vec4 boundary alignment. 2023-04-24 20:36:44 -04:00
georgeouzou
168e9f2cc9 GLSL: Support KHR_subgroup_arithmetic IMul/FMul
Support NV workarounds for IMul/FMul Reduce/InclusiveScan/ExclusiveScan
2023-04-03 19:13:30 +03:00
georgeouzou
ab3a6212b8 GLSL: Checking for inactive threads in non uniform arithmetic ops
The last argument of shuffle*NV functions does not return if the
current thread is inactive, but only if it is out of range.
2023-04-03 18:42:08 +03:00
georgeouzou
dbf6218883 GLSL: Support KHR_subgroup_arithmetic FAdd
Support NV workarounds for FAdd Reduce/InclusiveScan/ExclusiveScan
2023-04-02 10:45:25 +03:00
georgeouzou
b693d8faec GLSL: Support KHR_subgroup_arithmetic IAdd
Support NV workarounds for IAdd Reduce/InclusiveScan/ExclusiveScan
2023-04-02 01:25:15 +03:00
Hans-Kristian Arntzen
50623e13c8 GLSL: Fix expression reorder bug with legacy FMA fallback. 2023-03-30 17:24:11 +02:00
Try
cb45e4be6f cleanup 2023-03-21 21:11:07 +01:00
Try
4a5d21bf1c virtual emit_mesh_tasks 2023-03-21 21:08:59 +01:00
Try
dd8839c6f9 task shader initial 2023-03-18 17:20:16 +01:00
Laura Hermanns
83650af3fb GLSL: Don't create temporaries for sampled image types in GLSL.
This fixes a bug that was exposed when targeting GLSL with
Vulkan semantics while 'force_temporary' is enabled.
2023-02-27 11:51:49 -05:00
rdb
c356dd6220 GLSL: Fix missing precision qualifier in spvDeterminant return value
Follow-up to #2100
2023-01-27 21:44:47 +01:00
rdb
20981666cc GLSL: Legacy matrix inverse/determinant polyfills, outerProduct()
Also refactors polyfill mechanism in GLSL and fixes transpose() lowering precision.
2023-01-27 13:51:47 +01:00
Hans-Kristian Arntzen
86a985f28c
Merge pull request #2093 from rdb/emulate-unsupported-hyperbolic-funcs
GLSL/HLSL: Add emulated fallbacks for hyperbolic math functions
2023-01-27 12:15:28 +01:00
Hans-Kristian Arntzen
cd612e7dde
Merge pull request #2090 from rdb/glsl-legacy-math-funcs
GLSL: Add support for trunc, modf, isnan and isinf in legacy GLSL
2023-01-27 12:13:14 +01:00
rdb
f8cc03fd1e
GLSL: Drop invariant keyword in GLSL 110 2023-01-27 11:10:47 +01:00
rdb
53974b4fae GLSL/HLSL: Add emulated fallbacks for sinh/cosh/tanh/asinh/acosh/atanh
The inverse hyperbolic functions are not supported in HLSL, and none of them are supported in legacy GLSL.
2023-01-26 19:40:42 +01:00
rdb
d10044b23e GLSL: Add support for modf, isnan and isinf in legacy GLSL 2023-01-26 19:14:25 +01:00
Hans-Kristian Arntzen
9de5abaf78 GLSL: Minor fixes for shader clock implementation. 2023-01-26 15:41:51 +01:00
Hans-Kristian Arntzen
f575b89436
Merge pull request #2091 from LDeakin/shader-clock
GLSL: Support OpReadClockKHR
2023-01-26 15:41:40 +01:00
Hans-Kristian Arntzen
9da448c9ff
Merge pull request #2096 from rdb/glsl-extension-checks
GLSL: Add various missing extension checks
2023-01-26 15:41:15 +01:00
rdb
d70bfa5f34 GLSL: Allow sample inputs in desktop < 400 with GL_ARB_sample_shading
Neither legacy ES nor legacy desktop support these extensions
2023-01-23 14:51:26 +01:00
rdb
2202c2a701 GLSL: Add various additional extension checks. 2023-01-23 11:55:53 +01:00