Commit Graph

2608 Commits

Author SHA1 Message Date
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
Hans-Kristian Arntzen
6600793884 MSL: Remove obsolete MSLVertexAttr members.
These are completely unused. Need to keep the members around for ABI
compatbility however ...
2020-06-04 12:43:04 +02:00
Hans-Kristian Arntzen
2d5200650a HLSL: Add native support for 16-bit types.
Adds support for templated load/store in SM 6.2 to deal with small
types.
2020-06-04 12:33:56 +02:00
Hans-Kristian Arntzen
d385bf096f
Merge pull request #1378 from bbernhar/issue_410
HLSL: Add option to treat certain SSBO bindings as UAV
2020-05-28 21:20:57 +02:00
Bryan Bernhart
32bead81c8 Prefer set/binding API 2020-05-28 10:21:41 -07:00
Hans-Kristian Arntzen
999a7b5256
Merge pull request #1379 from KhronosGroup/fix-1377
Document CLI options.
2020-05-28 15:51:38 +02:00
Hans-Kristian Arntzen
165392a2b0 Document all CLI options. 2020-05-28 13:23:33 +02:00
Hans-Kristian Arntzen
d31bc0247e Do not mask writes to remapped variables in all cases.
If they don't have a static expression we should still write to it.
2020-05-28 11:49:28 +02:00
Bryan Bernhart
17bccc9f7e HLSL: Add option to treat certain SSBO bindings as UAV, even with readonly. 2020-05-27 13:08:15 -07:00
Hans-Kristian Arntzen
61cddd6307
Merge pull request #1376 from KhronosGroup/fix-1374
Handle physical pointers in reflection API.
2020-05-25 15:07:22 +02:00