Hans-Kristian Arntzen
ef247e75ec
GLSL: Improve support for GL_ARB_shader_draw_parameters in desktop GLSL.
...
Opt-in to using the extension to support gl_InstanceIndex.
2020-05-22 12:53:34 +02:00
dan sinclair
3d01d1bf50
Roll SPIRV-Tools, SPIRV-Headers and GLSLang.
...
This CL rolls the various dependencies and updates the test files.
2020-05-21 15:21:41 -04:00
Hans-Kristian Arntzen
287e93ff80
Merge pull request #1370 from dj2/roll_deps_20
...
Roll dependencies
2020-05-21 13:18:50 +02:00
dan sinclair
8bf916f575
Roll dependencies
...
This CL updates the GLSLang, SPIRV-Tools and SPIRV-Headers dependencies.
2020-05-20 10:27:51 -04:00
Hans-Kristian Arntzen
b4dd0b6fb1
GLSL: Add more test shaders for hit attribute types.
2020-05-20 15:07:50 +02:00
Hans-Kristian Arntzen
66ec3e3e54
GLSL: Support ray payloads and hit attributes declared as Block.
2020-05-20 15:07:47 +02:00
Hans-Kristian Arntzen
271ad33380
GLSL: Add some more focused RT test shaders.
2020-05-20 14:11:28 +02:00
Hans-Kristian Arntzen
f3a362b1aa
HLSL: Implement image queries for UAV images.
...
This was completely unimplemented for some reason.
2020-05-19 13:53:04 +02:00
Hans-Kristian Arntzen
86380acf4d
Support gl_InstanceID in RT shaders.
2020-05-08 13:39:43 +02:00
Hans-Kristian Arntzen
107ab7c2b7
MSL: Avoid packed arrays in more cases.
...
Extend the array stride relaxation to non-packed arrays as well, as
long as the array in question contains a single array element.
2020-05-06 10:27:12 +02:00
Hans-Kristian Arntzen
de3698f0e0
Add missing reference files from PR merge.
2020-05-06 10:08:01 +02:00
Le Hoang Quyen
9ddfe6db6d
Fix #1359 : MSL: If the packed type is scalar, don't emit "pack_" prefix.
...
Scalar type is already packed in metal.
2020-05-06 00:43:34 +08:00
Hans-Kristian Arntzen
0ebb88cc39
MSL: Redirect member indices when buffer has been sorted by Offset.
...
If a buffer rewrites its Offsets, all member references to that struct
are invalidated, and must be redirected, do so in to_member_reference,
but there might be other places where this is needed. Fix as required.
SPIR-V code relying on this is somewhat questionable, but seems to be
in-spec.
2020-04-30 11:48:53 +02:00
Hans-Kristian Arntzen
d7d630a0b7
Merge pull request #1347 from KhronosGroup/fix-1343
...
Implement OpAtomicLoad/OpAtomicStore.
2020-04-27 15:29:21 +02:00
Hans-Kristian Arntzen
9b7140e2ba
Implement OpAtomicLoad/OpAtomicStore.
...
Need some emulation on GLSL/HLSL, fix bug with atomic store on MSL.
2020-04-27 12:11:46 +02:00
Hans-Kristian Arntzen
6ef47d6657
MSL: Fix case where subpassInput is passed to leaf functions.
2020-04-27 11:29:21 +02:00
dan sinclair
171c646474
Roll GLSLang, SPIRV-Tools and SPIRV-Headers.
...
This CL rolls the various dependencies and updates tests to match.
2020-04-23 10:53:49 -04:00
Hans-Kristian Arntzen
5e5d1c27ce
GLSL: Support f16x2 <-> f32 bitcast.
...
There is no native formulation, so introduce a concept of a "complex"
bitcast to handle odd-ball cases which have no native unary operation.
2020-04-21 23:27:33 +02:00
Hans-Kristian Arntzen
bdb343ea06
Be a bit more careful what nonuniform state is propagated.
2020-04-21 14:48:44 +02:00
Hans-Kristian Arntzen
5cb0f0a640
Merge pull request #1335 from KhronosGroup/fix-1325
...
GLSL/HLSL: Implement unpack/pack2x32Uint
2020-04-21 14:05:12 +02:00
Hans-Kristian Arntzen
7b9cba7424
HLSL: Add parens in unpackUint2x32 for clarity.
2020-04-21 11:49:26 +02:00
Hans-Kristian Arntzen
a396744f89
Ensure unpack/pack2x32 tests are compatible with test suite.
2020-04-21 11:48:58 +02:00
Asuka
55dfbead2f
GLSL/HLSL: Support packUint2x32 and unpackUint2x32
2020-04-21 11:34:12 +02:00
Hans-Kristian Arntzen
f8592ecdfc
MSL: Deal correctly with initializers on Private variables.
...
Do not attempt to defer declaration. It would happen to work in most
cases, but the edge case is where the first thing that happens to a
variable is being OpStore'd into.
2020-04-21 11:20:49 +02:00
Hans-Kristian Arntzen
17ad62eea4
MSL: Support edge case with DX layout in scalar block layout.
...
DX may emit ArrayStride and MatrixStride of 16, but the size of the
object does not align with that and expect to pack other members inside
its last member.
The workaround is to emit array size/col/row one less than we expect and
rely on padding to carve out a "dead zone" for the last member.
2020-04-20 15:29:24 +02:00
Hans-Kristian Arntzen
ebf463674d
MSL: Allow removing clip distance user varyings.
...
Only safe if user knows that subsequent shader stage will not read clip
distance.
2020-04-20 09:58:40 +02:00
Panagiotis Christopoulos Charitos
b3109b8ad0
Reflection: Add specialization constant name
...
Fixes #1311
2020-04-18 22:00:36 +02:00
Chip Davis
96f7008aa8
MSL: Force disabled fragment builtins to have the right name.
...
DXVK emits SPIR-V where fragment shader builtins have names derived from
DXBC assembly, e.g. `oDepth` for `FragDepth`. When we declared the
disabled output, we used this name, but when referencing it, we
continued to use the GLSL name. This breaks compilation.
2020-04-15 19:25:18 -05:00
Chip Davis
495e48de44
MSL: Only disable output variables in fragment shaders.
...
Forgot to do this in #1319 .
Fixes #1322 .
2020-04-15 12:14:57 -05:00
Chip Davis
b29f83c383
MSL: Add options to control emission of fragment outputs.
...
Like with `point_size` when not rendering points, Metal complains when
writing to a variable using the `[[depth]]` qualifier when no depth
buffer be attached. In that case, we must avoid emitting `FragDepth`,
just like with `PointSize`.
I assume it will also complain if there be no stencil attachment and the
shader write to `[[stencil]]`, or it write to `[[color(n)]]` but there
be no color attachment at n.
2020-04-13 15:29:11 -05:00
Hans-Kristian Arntzen
c7b75a8fe6
MSL: Do not use base expression with PhysicalTypeID OpCompositeExtract.
...
Similar reasoning as packed expressions.
2020-04-07 18:25:44 +02:00
Hans-Kristian Arntzen
14f24d71ab
Merge pull request #1308 from KhronosGroup/fix-1306
...
HLSL: Add support for treating NonWritable UAV texture as SRV instead.
2020-04-03 17:42:56 +02:00
Hans-Kristian Arntzen
d9d3359ffb
MSL: Deal with cases where builtin is implicitly needed, declared, but unused.
...
We need to make sure any builtins which are declared and unused are
emitted as active variables.
2020-04-03 12:50:21 +02:00
Hans-Kristian Arntzen
28bf9057df
HLSL: Add support for treating NonWritable UAV texture as SRV instead.
2020-04-03 11:50:50 +02:00
Hans-Kristian Arntzen
3cb6aeb480
MSL: Fix access chain for deep struct hierarchy on array of buffers.
2020-03-31 14:17:29 +02:00
dan sinclair
32307df73a
Roll GLSLang, SPIRV-Tools and SPIRV-Headers
...
This CL rolls the various dependencies and updates tests as needed.
2020-03-30 11:03:43 -04:00
Hans-Kristian Arntzen
b8905bbd95
Add support for forcefully zero-initialized variables.
...
Useful to better support certain platforms which require all variables
to be initialized to something.
2020-03-26 13:38:27 +01:00
Hans-Kristian Arntzen
04e877df12
GLSL: Implement GL_EXT_shader_framebuffer_fetch.
2020-03-19 14:53:39 +01:00
Hans-Kristian Arntzen
05004a57ea
GLSL/HLSL: Fix nonuniform qualifier for SSBO atomics.
2020-03-19 12:05:27 +01:00
Hans-Kristian Arntzen
a3d3c80dd7
GLSL/HLSL: Implement nonuniform qualifier for image atomics.
2020-03-19 11:35:29 +01:00
Hans-Kristian Arntzen
185551bfaf
HLSL: Do not emit globallycoherent for SRV ByteAddressBuffer.
2020-03-05 10:37:36 +01:00
Hans-Kristian Arntzen
95cd20f1c7
Add test for disable-storage-image-qualifier-deduction.
2020-03-04 16:42:31 +01:00
Hans-Kristian Arntzen
c27e1efbf1
HLSL: Add option to always treat SSBO as UAV, even with readonly.
...
This can make codegen more predictable since ByteAddressBuffer is SRV
and not UAV.
2020-03-04 16:42:31 +01:00
Hans-Kristian Arntzen
d91e134500
MSL: Add native array test for composite array initialization.
2020-02-24 13:34:51 +01:00
Hans-Kristian Arntzen
30343f3e95
MSL: Reintroduce workaround for constant arrays being passed by value.
2020-02-24 13:22:52 +01:00
Hans-Kristian Arntzen
20b28f72fa
MSL: Reinstate workaround for returning arrays.
2020-02-24 13:04:10 +01:00
Hans-Kristian Arntzen
c9d4f9cd74
MSL: Add a workaround path to force native arrays for everything.
2020-02-24 12:47:14 +01:00
Dan Sinclair
7ec16b64c8
Roll GLSLang, SPIRV-Tools and SPIRV-Headers
...
This CL rolls the various dependencies of SPIRV-Cross and updates the
tests as needed.
2020-02-19 10:13:52 -05:00
Hans-Kristian Arntzen
e81c1b1d98
HLSL: Declare undef variables as static.
...
Undef variables would somehow become cbuffer variables without any
warning ...
2020-02-08 13:39:50 +01:00
Hans-Kristian Arntzen
655312cb47
GLSL: Support GL_ARB_enchanced_layouts for XFB.
2020-01-27 13:11:38 +01:00