Hans-Kristian Arntzen
fa5b206d97
MSL: Workaround broken vector -> scalar access chain in MSL.
...
On MSL, the compiler refuses to allow access chains into a normal vector type.
What happens in practice instead is a read-modify-write where a vector type is
loaded, modified and written back.
The workaround is to convert a vector into a pointer-to-scalar before
the access chain continues to add the scalar index.
2020-07-06 10:03:44 +02:00
Hans-Kristian Arntzen
fab75792a9
Merge pull request #1419 from KhronosGroup/msl-input-attachment-index-fallback
...
MSL: Use input attachment index directly for resource index fallback.
2020-07-06 10:01:30 +02:00
Hans-Kristian Arntzen
e1600d4df8
MSL: Use input attachment index directly for resource index fallback.
2020-07-06 09:49:46 +02:00
Hans-Kristian Arntzen
c465cd5004
Merge pull request #1417 from KhronosGroup/fix-351
...
GLSL: Support multi-level struct flattening for I/O.
2020-07-06 09:20:37 +02:00
Hans-Kristian Arntzen
2ac8f51b06
GLSL: Support I/O flattening with arrays as final type.
2020-07-06 09:18:30 +02:00
Hans-Kristian Arntzen
2d43103a55
GLSL: Support multi-level struct flattening for I/O.
2020-07-03 14:38:51 +02:00
Hans-Kristian Arntzen
d573a95a9c
Run format_all.sh.
2020-07-01 11:42:58 +02:00
Hans-Kristian Arntzen
8f716947c2
test: Use --hlsl-dx9-compatible when attempting to compile SM 3.0 shaders.
2020-07-01 11:37:03 +02:00
Hans-Kristian Arntzen
2894b40868
Merge pull request #1412 from KhronosGroup/fix-1411
...
GLSL: Fix nested legacy switch workarounds.
2020-06-30 15:56:07 +02:00
Hans-Kristian Arntzen
70f17142de
GLSL: Fix nested legacy switch workarounds.
2020-06-30 12:02:24 +02:00
Hans-Kristian Arntzen
b1082c10af
Merge pull request #1410 from KhronosGroup/fix-1406
...
GLSL: Support switch more properly in legacy ESSL
2020-06-29 15:22:39 +02:00
Hans-Kristian Arntzen
42096ca4a1
Merge pull request #1409 from KhronosGroup/fix-1405
...
Improve expression usage tracking
2020-06-29 15:22:14 +02:00
Hans-Kristian Arntzen
4d79d634f5
GLSL: Implement switch on ESSL 1.0.
...
Cannot use switch on legacy ESSL, fallback to plain branches.
2020-06-29 13:35:46 +02:00
Hans-Kristian Arntzen
bae76d7915
GLSL: Use for-loop fallback instead of do/while for legacy ESSL.
...
do/while loops are not guaranteed to be supported in ESSL 1.0 / OpenGLES
2.0 implementations.
2020-06-29 12:50:31 +02:00
Hans-Kristian Arntzen
3afbfdb090
Implement context-sensitive expression read tracking.
...
When inside a loop, treat any read of outer expressions to happen
multiple times, forcing a temporary of said outer expressions.
This avoids the problem where we can end up relying on loop-invariant code motion to happen in the
compiler when converting optimized shaders.
2020-06-29 12:20:35 +02:00
Hans-Kristian Arntzen
05188aca69
Fix bug with control dependent expression tracking.
...
For a direct branch without merge, we lost control dependent
expressions.
2020-06-29 10:55:50 +02:00
Hans-Kristian Arntzen
2e7a562583
Merge pull request #1404 from KhronosGroup/fix-1402
...
HLSL: Workaround FXC bugs with degenerate switch blocks.
2020-06-23 18:32:35 +02:00
Hans-Kristian Arntzen
eb0f0323d3
HLSL: Workaround FXC bugs with degenerate switch blocks.
...
When we see a switch block which only contains one default block, emit a
do {} while(false) statement instead, which is far more idiomatic and
readable anyways.
2020-06-23 15:39:04 +02:00
Hans-Kristian Arntzen
f9ae06512e
Merge pull request #1401 from dj2/roll-deps-22
...
Roll deps and update tests.
2020-06-22 16:10:12 +02:00
Hans-Kristian Arntzen
9eb615c63b
Merge pull request #1400 from KhronosGroup/fix-1399
...
MSL: Remove the old VertexAttr API.
2020-06-22 16:08:53 +02:00
dan sinclair
0abc017501
Roll deps and update tests.
...
This CL rolls the GLSlang, SPIRV-Tools and SPIRV-Headers dependencies
and updates the various test files.
2020-06-22 09:33:29 -04:00
Hans-Kristian Arntzen
f9da366ae6
MSL: Remove the old VertexAttr API.
...
Too many issues with deprecated declarations on various compilers, just
get rid of it.
2020-06-22 11:14:24 +02:00
Hans-Kristian Arntzen
7edaea87cf
Merge pull request #1398 from Kangz/fix-deprecation
...
Fix placement of SPIRV_CROSS_DEPRECATED.
2020-06-19 17:20:06 +02:00
Hans-Kristian Arntzen
6add77aa97
Merge pull request #1397 from KhronosGroup/fix-1396
...
Fix duplicated initialization for loop variables with initializers.
2020-06-19 16:30:28 +02:00
Corentin Wallez
8aee532f56
Fix placement of SPIRV_CROSS_DEPRECATED.
...
The [[deprecated]] attribute is supposed to be in front of a typedef,
not after the typedef keyword.
2020-06-19 14:28:00 +02:00
Hans-Kristian Arntzen
f141521ebe
Fix duplicated initialization for loop variables with initializers.
2020-06-19 10:51:00 +02:00
Hans-Kristian Arntzen
d7976b7b24
Merge pull request #1395 from KhronosGroup/fix-1394
...
MSL: Deal with array load-store in buffer-block structs
2020-06-18 14:02:12 +02:00
Hans-Kristian Arntzen
ace4d25222
MSL: Add test case for constructing struct with non-value-type array.
2020-06-18 12:55:59 +02:00
Hans-Kristian Arntzen
7314f51a32
MSL: Deal with loading non-value-type arrays.
2020-06-18 12:46:39 +02:00
Hans-Kristian Arntzen
02db4c1f16
MSL: Add tests for array copies in and out of buffers.
2020-06-18 11:59:02 +02:00
Hans-Kristian Arntzen
03d4bcea68
MSL: Improve handling of array types in buffer objects.
...
When loading and storing array types which belong to buffer objects, we
need to treat these values as not being value types. Also, need to
handle array load/store from/to more address space combinations.
2020-06-18 11:49:03 +02:00
Hans-Kristian Arntzen
11832b6e14
Clean up some deprecation warnings when building with Makefile.
2020-06-18 10:07:31 +02:00
Hans-Kristian Arntzen
5e509b159a
Remove unused member in MSLShaderInput.
...
Missed in review.
2020-06-18 10:07:17 +02:00
Hans-Kristian Arntzen
a64484f62b
Merge pull request #1392 from cdavis5e/msl-frag-input-vecsize
...
MSL: Fix up input variables' vector lengths in all stages.
2020-06-17 09:41:04 +02:00
Chip Davis
5281d9997e
MSL: Fix up input variables' vector lengths in all stages.
...
Metal is picky about interface matching. If the types don't match
exactly, down to the number of vector components, Metal fails pipline
compilation. To support pipelines where the number of components
consumed by the fragment shader is less than that produced by the vertex
shader, we have to fix up the fragment shader to accept all the
components produced.
2020-06-16 14:50:30 -05:00
Hans-Kristian Arntzen
7073ed2edb
Merge pull request #1393 from KhronosGroup/fix-1391
...
HLSL: Fix texProj in legacy HLSL.
2020-06-16 16:06:47 +02:00
Hans-Kristian Arntzen
d13dc0ce47
HLSL: Fix texProj in legacy HLSL.
2020-06-16 12:54:22 +02:00
Hans-Kristian Arntzen
9e3df69d4e
Merge pull request #1390 from rdb/master
...
GLSL: Require GL_ARB_draw_instanced for gl_InstanceID in GLSL < 1.40
2020-06-15 14:57:22 +02:00
rdb
031cbaa5a2
GLSL: Require GL_ARB_draw_instanced for gl_InstanceID in GLSL < 1.40
2020-06-12 22:42:26 +02:00
Hans-Kristian Arntzen
92fcd7d2b0
Merge pull request #1389 from KhronosGroup/sparse-clamp
...
GLSL: Handle the rest of GL_ARB_sparse_texture_clamp.
2020-06-08 13:41:06 +02:00
Hans-Kristian Arntzen
f383cc98f2
GLSL: Handle the rest of GL_ARB_sparse_texture_clamp.
...
Missed these in initial sparse implementation.
2020-06-08 13:40:11 +02:00
Hans-Kristian Arntzen
bbefea2b02
Merge pull request #1388 from KhronosGroup/uint-sparse-residency-query
...
GLSL: Support uint code for sparse residency query.
2020-06-08 11:41:08 +02:00
Hans-Kristian Arntzen
857e1c445c
GLSL: Support uint code for sparse residency query.
2020-06-08 11:40:02 +02:00
Hans-Kristian Arntzen
553a7f959b
Merge pull request #1385 from KhronosGroup/fix-1237
...
GLSL: Implement sparse feedback.
2020-06-08 11:12:00 +02:00
Hans-Kristian Arntzen
cbe0cca73b
Refactor texture fetch function generation.
...
Use structs instead of a million bool/uint32_t arguments passed on stack.
2020-06-08 10:17:40 +02:00
Hans-Kristian Arntzen
b73c047faf
Merge pull request #1387 from Lichtso/master
...
Fix missing switch cases in Y'CbCr conversion
2020-06-07 16:13:13 +02:00
Alexander Meißner
1f5875e23e
Fix missing switch cases in Y'CbCr conversion
...
Otherwise the following lines will never be reached for the other two valid ycbcr_models (RGB_IDENTITY and YCBCR_IDENTITY) as they would cause a SPIRV_CROSS_THROW.
2020-06-06 22:01:05 +02:00
Hans-Kristian Arntzen
3ce81c0025
Merge pull request #1384 from KhronosGroup/fix-1380
...
MSL: Remove obsolete MSLVertexAttr members.
2020-06-04 15:55:47 +02:00
Hans-Kristian Arntzen
757c10bbe4
Merge pull request #1383 from KhronosGroup/fix-1381
...
HLSL: Add native support for 16-bit types.
2020-06-04 15:55:33 +02:00
Hans-Kristian Arntzen
275974e062
GLSL: Implement sparse feedback.
2020-06-04 15:50:28 +02:00