Commit Graph

703 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
8a2d980fa1 Merge pull request #157 from KhronosGroup/vector-less-ctors
Add vector-less IR construction to subclasses as well.
2017-04-05 09:10:25 +02:00
Bill Hollings
7703b746f7 CompilerMSL vectorless constructor uses vectorless attribute and resource bindings. 2017-04-04 16:38:17 -04:00
Hans-Kristian Arntzen
d18edc3cb5 Merge pull request #159 from Kode/fix
Fix HLSL matrix unrolling
2017-04-03 22:05:31 +02:00
Robert Konrad
3804292c43 Merge branch 'master' of github.com:KhronosGroup/SPIRV-Cross into fix 2017-04-03 11:43:35 +02:00
Robert Konrad
1fb2315a35 Add a test for HLSL matrix unrolling 2017-04-03 11:42:36 +02:00
Robert Konrad
61b561772c Fix HLSL matrix unrolling 2017-04-03 11:38:15 +02:00
Hans-Kristian Arntzen
ec5f3ec4b2 Merge pull request #158 from KhronosGroup/separate-sampler-buffer
Fix case where samplerBuffer is emitted without combined sampler.
2017-04-02 11:13:27 +02:00
Hans-Kristian Arntzen
543e380d90 Fix case where samplerBuffer is emitted without combined sampler. 2017-04-02 11:03:07 +02:00
Hans-Kristian Arntzen
9bad477f16 Add vector-less IR construction to subclasses as well. 2017-04-01 16:08:19 +02:00
Hans-Kristian Arntzen
46f4695fb7 Merge pull request #156 from kayru/ir_array_ctor
Added a Compiler ctor that takes IR as raw array and count
2017-04-01 14:44:47 +02:00
Yuriy O'Donnell
ae8de51138 Added a Compiler ctor that takes IR as raw array and count
This avoids the need to construct a temporary std::vector on the application side just to create a Compiler instance if application itself doesn't use STL containers.
2017-04-01 14:35:42 +02:00
Hans-Kristian Arntzen
af75c7585a Merge pull request #155 from KhronosGroup/cfg-parameter-preserve
Preserve function arguments if variable is only conditionally written.
2017-03-25 16:51:19 +01:00
Hans-Kristian Arntzen
c609eab443 Fix includes. 2017-03-25 16:43:26 +01:00
Hans-Kristian Arntzen
7193e9f500 Use --msl in Travis script. 2017-03-25 16:30:46 +01:00
Hans-Kristian Arntzen
bf5c07532c Run format_all.sh. 2017-03-25 16:28:44 +01:00
Hans-Kristian Arntzen
b2c2e6483b Analyze parameter preservation for functions.
This is kinda tricky, because if we only conditionally write to a
function parameter variable it is implicitly preserved in SPIR-V, so we must force
an in qualifier on the parameter to get the same behavior in GLSL.
2017-03-25 16:25:30 +01:00
Hans-Kristian Arntzen
a5546e9963 Merge pull request #154 from KhronosGroup/bitfield-fix
Fix bitfield functions.
2017-03-25 15:52:54 +01:00
Hans-Kristian Arntzen
24382a8ea2 Use findLSB as well in bitfield test. 2017-03-25 15:46:12 +01:00
Hans-Kristian Arntzen
6801af4dce Fix bitfield functions. 2017-03-25 15:38:20 +01:00
Hans-Kristian Arntzen
f4749df09a Merge pull request #151 from Kode/fix
Transform more functions for HLSL
2017-03-24 16:13:34 +01:00
Robert Konrad
cb637db5d6 Handle GL_ARB_derivative_control 2017-03-24 15:58:54 +01:00
Robert Konrad
9fadd34afe Add new HLSL tests 2017-03-24 15:41:20 +01:00
Robert Konrad
f3a82778f9 Fix OpLogicalNot in HLSL 2017-03-24 15:00:48 +01:00
Robert Konrad
78ec0fcb22 Update HLSL test output
HLSL requires builtins to be defined after
texcoords in some cases.
2017-03-24 14:40:13 +01:00
Robert Konrad
a7e2a69a6f Add bit casting to HLSL 2017-03-24 14:13:59 +01:00
Robert Konrad
9ec9dd0647 Add dFd(x/y)(Fine/Coarse) to GLSL 2017-03-24 13:59:19 +01:00
Robert Konrad
e7b0258556 Add more HLSL instructions 2017-03-24 13:58:39 +01:00
Hans-Kristian Arntzen
91a1d0a4fe Merge pull request #150 from KhronosGroup/empty-io
Workaround empty I/O variable declarations
2017-03-24 10:13:12 +01:00
Hans-Kristian Arntzen
840a72d47a Workaround empty struct declaration and empty IO variables. 2017-03-24 10:03:11 +01:00
Hans-Kristian Arntzen
ba0d7eda37 Update Travis glslang revision to latest. 2017-03-24 09:52:48 +01:00
Hans-Kristian Arntzen
f5c498372e Merge pull request #148 from Kode/fix
Prefer plain texture2D in legacy es vertex shaders
2017-03-24 09:43:17 +01:00
Robert Konrad
ec39647d92 Check for legal lod id
And avoid passing superfluous has_lod parameter.
2017-03-24 09:26:02 +01:00
Robert Konrad
eab111ed32 Add tests for legacy lod handling 2017-03-23 15:51:43 +01:00
Robert Konrad
9760f1544c Throw when an lod value is used but not supported
Plus requested changes.
2017-03-23 14:43:54 +01:00
Robert Konrad
edfc297179 Put check for lod legality in its own function
Also add requested code style changes.
2017-03-23 13:25:24 +01:00
Hans-Kristian Arntzen
4004be6b8b Merge pull request #149 from KhronosGroup/public-struct-member-reflection
Make buffer decoration interface public.
2017-03-23 13:21:19 +01:00
Hans-Kristian Arntzen
cd9c90202e Make buffer decoration interface public. 2017-03-23 12:36:53 +01:00
Hans-Kristian Arntzen
6479a50bbe Merge pull request #147 from KhronosGroup/member-name-check
Ensure struct members have valid identifiers.
2017-03-23 10:21:49 +01:00
Robert Konrad
3f74503aca Prefer plain texture2D in legacy es vertex shaders
WebGL supports lod texture funcs only in fragment
shaders but SPIR-V supports only lod texture funcs
in vertex shaders. This reverts calls which were
forced (infered from using a 0 constant) to use
an lod to plain calls in vertex shaders when
using legacy es.
2017-03-23 10:11:45 +01:00
Hans-Kristian Arntzen
fd432f8580 Ensure struct members have valid identifiers. 2017-03-23 09:47:43 +01:00
Hans-Kristian Arntzen
ecc6ef6937 Merge pull request #145 from brenwill/master
CompilerMSL mark the legacy compile() function as deprecated
2017-03-22 16:32:32 +01:00
Bill Hollings
6a42051d6a CompilerMSL mark the legacy version of the compile() function as deprecated. 2017-03-22 11:15:08 -04:00
Hans-Kristian Arntzen
b03d789dd6 Merge pull request #144 from KhronosGroup/unknown-extension-fix
Do not crash on unknown extensions.
2017-03-21 16:50:12 +01:00
Hans-Kristian Arntzen
299e19fb61 Do not crash on unknown extensions. 2017-03-21 16:33:54 +01:00
Hans-Kristian Arntzen
ba09b0e1a0 Merge pull request #136 from KhronosGroup/hlsl-builtin
Rewrite HLSL backend handling of inputs and outputs.
2017-03-21 13:56:50 +01:00
Hans-Kristian Arntzen
eb6a415d4c Run format_all.sh. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
a0a582dd04 Do not emit interpolation qualifiers to static globals. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
b8bda45802 Add test case for interpolation qualifiers in HLSL. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
3eed439643 Run format.sh. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
447545311b Add test for input I/O blocks in fragment. 2017-03-21 13:48:50 +01:00