Commit Graph

720 Commits

Author SHA1 Message Date
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
Hans-Kristian Arntzen
e89b789af3 Add some tests for no stage inputs or outputs in HLSL. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
62df60ea3d Update vertex locations test to include I/O blocks. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
439fa9f4a2 Handle I/O blocks separately from regular inputs and outputs. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
784a23b92a Add instancing test to HLSL. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
a4aa89e992 Add test for fragment builtins like gl_FragDepth/gl_FragCoord. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
61c31c6054 Make use of explicit locations in HLSL. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
2ebe1a87a1 Run format_all.sh. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
bdea1a444a Begin rewriting how HLSL deals with inputs and outputs. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
099f307123 Add traversal for active builtin variables.
Refactor some ugly type-copying for access chains.
2017-03-21 13:48:28 +01:00
Hans-Kristian Arntzen
829910280d Merge pull request #142 from KhronosGroup/logical-vector-ops
Handle vector variants of OpLogicalAnd/Or/Not.
2017-03-20 23:04:58 +01:00
Hans-Kristian Arntzen
75391f9a68 Handle vector variants of OpLogicalAnd/Or/Not. 2017-03-20 22:45:40 +01:00
Hans-Kristian Arntzen
4941970905 Merge pull request #134 from brenwill/master
CompilerMSL aligns MSL struct members with SPIR-V offsets
2017-03-20 09:04:12 +01:00
Bill Hollings
6fdb534f4b test_shaders.py support deprecated --metal CLI option. 2017-03-19 21:46:06 -04:00
Bill Hollings
5ad73f33f5 MSL fixes from review of PR 134.
Remove unnecessary use of std:: prefix in spirv_msl.cpp.
Use typedef instead of #define.
spirv-cross deprecate --metal CLI option and replace with --msl option.
2017-03-19 21:06:21 -04:00
Bill Hollings
52a5597161 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-03-17 11:16:47 -04:00
Hans-Kristian Arntzen
088b06ebda Merge pull request #138 from KhronosGroup/deprecation-macro
Add deprecation macro.
2017-03-15 11:11:34 +01:00
Hans-Kristian Arntzen
8411470ab9 Add deprecation macro. 2017-03-15 10:31:19 +01:00
Bill Hollings
5550c87b1f CompilerMSL options access and UBO alignment test case.
CompilerMSL accesses options using same design pattern as CompilerGLSL and CompilerHLSL.
CompilerMSL support setting VA & rez binding specs via either constructor or compile() method overload.
CompilerMSL support single UBO packing and padding in single pass.
spriv_cross app (main.cpp) supports turning off UBO packing and padding via command line option.
Add MSL UBO alignment test shader.
2017-03-12 17:42:51 -04:00
Bill Hollings
dc69427402 Updates to MSL functionality to support PR review feedback. 2017-03-11 12:17:22 -05:00
Bill Hollings
65cd7eb670 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 2017-03-09 13:18:48 -05:00
Hans-Kristian Arntzen
6381b2ff9c Merge pull request #135 from hrydgard/warning-fix
Just fix a few minor warnings.
2017-03-07 10:57:02 +01:00
Henrik Rydgård
bfae041e21 Fix a few minor warnings. (i was used as a uint32_t in multiple places, like type_member_for_offset, so changed its type) 2017-03-07 10:19:08 +01:00
Bill Hollings
826de0e777 Merge with upstream and resolve conflicts. 2017-03-06 12:15:42 -05:00
Bill Hollings
a3546ebb54 spirv_msl only add padding structure members if required by member alignment. 2017-03-06 11:00:23 -05:00
Hans-Kristian Arntzen
5eb447f4b6 Merge pull request #133 from KhronosGroup/flatten-io-block
Add support for flattening I/O blocks.
2017-03-06 14:21:55 +01:00
Hans-Kristian Arntzen
fd12124bf7 Add tests for legacy I/O flattening. 2017-03-06 14:04:01 +01:00
Hans-Kristian Arntzen
c5de1cfa90 Add support for flattening I/O blocks.
Fix issue where layout() qualifiers are emitted for members in legacy
targets.
2017-03-06 14:01:51 +01:00
Hans-Kristian Arntzen
33ec91724d Merge pull request #132 from KhronosGroup/cull-distance
Add built-in cull distance.
2017-03-05 14:55:28 +01:00
Hans-Kristian Arntzen
7f2e17969b Add built-in cull distance. 2017-03-05 12:47:03 +01:00
Bill Hollings
5cb3ce96a7 spirv_msl pack MSL uniform struct members only when size warrants. 2017-03-02 17:57:26 -08:00
Bill Hollings
b332bae3c3 spirv_msl unpack packed MSL uniform struct members.
spirv_glsl add member_is_packed_type() and unpack_expression_type() functions.
2017-03-01 13:07:40 -05:00
Bill Hollings
484931d8b2 spirv_msl auto-alignment of members of MSL uniform structs.
spirv_msl optionally add padding and packing to allow MSL
struct members to align with SPIR-V struct alignments.
spirv_cross add convenience methods for testing Decorations.
spirv_glsl replace member_decl() function with new emit_stuct_member().
Allow struct member types to be marked as packed via DecorationCPacked decoration.
2017-02-28 21:44:36 -05:00
Bill Hollings
92f12d1d29 CompilerMSL avoid including hidden variables as entry point function arguments. 2017-02-25 23:19:52 -05:00