Commit Graph

2683 Commits

Author SHA1 Message Date
Ryan Harrison
76658247ac Update SPIR-V Headers to 1.5 rev 3 2020-04-28 10:16:39 -04:00
Hans-Kristian Arntzen
471990d4dc
Merge pull request #1349 from KhronosGroup/fix-1348
Work around odd deadlock in test_shaders.py in --parallel mode.
2020-04-27 18:50:55 +02:00
Hans-Kristian Arntzen
35a9b793d6 Work around odd deadlock in test_shaders.py in --parallel mode.
Not exactly sure what is going on, internet suggests there's a pipe that
fills up. Calling close() before we start waiting for results seems to
do the trick.
2020-04-27 16:44:14 +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
4330b046be
Merge pull request #1346 from KhronosGroup/fix-1340
MSL: Fix case where subpassInput is passed to leaf functions.
2020-04-27 13:26:51 +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
cbaaa02af9
Merge pull request #1345 from apayen/master
Fixed recursion in combined_decoration_for_member
2020-04-27 11:31:39 +02:00
Hans-Kristian Arntzen
6ef47d6657 MSL: Fix case where subpassInput is passed to leaf functions. 2020-04-27 11:29:21 +02:00
Alexis Payen de la Garanderie
4edfe96739 Fixed recursion in combined_decoration_for_member
Members in nested structs were not properly iterated on,
and as a result, flags like row major for matrices could be
not propagated properly.
2020-04-27 15:54:16 +09:00
Hans-Kristian Arntzen
7ba0f8f087
Merge pull request #1342 from dj2/roll
Roll GLSLang, SPIRV-Tools and SPIRV-Headers.
2020-04-24 19:11:23 +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
1ad1662a2b
Merge pull request #1339 from KhronosGroup/fix-1338
GLSL: Support f16x2 <-> f32 bitcast.
2020-04-22 12:21:26 +02: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
c58839bfd4
Merge pull request #1336 from KhronosGroup/fix-1333
Handle RayQueryKHR type.
2020-04-21 16:31:22 +02:00
Hans-Kristian Arntzen
bf289c37a2
Merge pull request #1337 from KhronosGroup/nonuniform-propagation-fix
Be a bit more careful what nonuniform state is propagated.
2020-04-21 14:49:57 +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
6b0e558169 Handle RayQueryKHR type.
Do not error out in parsing in shaders which use ray queries.
2020-04-21 14:25:18 +02:00
Hans-Kristian Arntzen
78b4d9379b Update SPIR-V headers. 2020-04-21 14:23:24 +02:00
Hans-Kristian Arntzen
b2e934b53f
Merge pull request #1328 from devshgraphicsprogramming/patch-1
Try and solve issue #1327
2020-04-21 14:06:27 +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
Mateusz Kielan
127224d816 Fix issue #1327
Drop the nonuniform_qualifier in GLSL downcompile NV_gpu_shader5 supports divergent indexing transparently, but obviously runtime sized descriptor arrays are not supported by anything in OpenGL.
2020-04-21 13:29:30 +02:00
Hans-Kristian Arntzen
58548e25a2
Merge pull request #1334 from KhronosGroup/fix-1332
MSL: Deal correctly with initializers on Private variables.
2020-04-21 12:16:27 +02:00
Hans-Kristian Arntzen
7b9cba7424 HLSL: Add parens in unpackUint2x32 for clarity. 2020-04-21 11:49:26 +02:00
Hans-Kristian Arntzen
e4e4791c4e HLSL: Only allow 64-bit integers in SM 6.0. 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
3fb86e4385
Merge pull request #1331 from KhronosGroup/fix-1321
MSL: Support edge case with DX layout in scalar block layout.
2020-04-21 10:50:47 +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
f38cbeb814
Merge pull request #1330 from KhronosGroup/fix-1320
MSL: Allow removing clip distance user varyings.
2020-04-20 13:23:19 +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
Hans-Kristian Arntzen
aa5fbc004b
Merge pull request #1329 from godlikepanos/master
Reflection: Add specialization constant name
2020-04-18 23:34:22 +02:00
Panagiotis Christopoulos Charitos
b3109b8ad0 Reflection: Add specialization constant name
Fixes #1311
2020-04-18 22:00:36 +02:00
Hans-Kristian Arntzen
90198199df
Merge pull request #1324 from cdavis5e/msl-disabled-builtin-names
MSL: Force disabled fragment builtins to have the right name.
2020-04-16 10:26:40 +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
Hans-Kristian Arntzen
fbc560782c
Merge pull request #1323 from cdavis5e/msl-disable-frag-only
MSL: Only disable output variables in fragment shaders.
2020-04-15 20:29:39 +02: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
Hans-Kristian Arntzen
54658d6255
Merge pull request #1319 from cdavis5e/msl-frag-outputs
MSL: Add options to control emission of fragment outputs.
2020-04-14 10:17:01 +02: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
fcbc590937
Merge pull request #1316 from Malacath-92/master
Improve compatibility with clang-cl
2020-04-09 18:19:53 +02:00
Hanno
4560ee24fd Improve compatibility with clang-cl 2020-04-09 17:30:20 +02:00
Hans-Kristian Arntzen
a1d9b474b5
Merge pull request #1314 from KhronosGroup/fix-1313
MSL: Do not use base expression with PhysicalTypeID OpCompositeExtract.
2020-04-07 19:31:45 +02: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
6637610b16
Merge pull request #1309 from KhronosGroup/fix-1305
Expose query if a resource was used as a comparison/depth resource
2020-04-03 17:47:22 +02:00
Hans-Kristian Arntzen
941cceedb4 Expose a query if samplers or images are comparison resources. 2020-04-03 17:43:42 +02:00
Hans-Kristian Arntzen
b691b7d1e3 Do not add NonWritable/NonReadable decorations for regular images. 2020-04-03 17:43:42 +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
cfcd84319b
Merge pull request #1310 from KhronosGroup/msl-force-declare-implicit-builtins
MSL: Deal with cases where builtin is implicitly needed, declared, but unused
2020-04-03 17:41:09 +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
01cee74b02
Merge pull request #1307 from troughton/patch-1
MSL: mark BuiltInFragCoord as implicitly used for subpass reads
2020-04-03 12:39:30 +02:00