1090 lines
31 KiB
C++
Raw Normal View History

/*
* Copyright 2015-2017 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "spirv_cpp.hpp"
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
#include "spirv_cross_util.hpp"
#include "spirv_glsl.hpp"
#include "spirv_hlsl.hpp"
#include "spirv_msl.hpp"
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
#include "spirv_reflect.hpp"
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <limits>
#include <memory>
#include <stdexcept>
#include <unordered_map>
#include <unordered_set>
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#endif
using namespace spv;
using namespace spirv_cross;
using namespace std;
#ifdef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
static inline void THROW(const char *str)
{
fprintf(stderr, "SPIRV-Cross will abort: %s\n", str);
fflush(stderr);
abort();
}
#else
#define THROW(x) throw runtime_error(x)
#endif
struct CLIParser;
struct CLICallbacks
{
void add(const char *cli, const function<void(CLIParser &)> &func)
{
callbacks[cli] = func;
}
unordered_map<string, function<void(CLIParser &)>> callbacks;
function<void()> error_handler;
function<void(const char *)> default_handler;
};
struct CLIParser
{
CLIParser(CLICallbacks cbs_, int argc_, char *argv_[])
: cbs(move(cbs_))
, argc(argc_)
, argv(argv_)
{
}
bool parse()
{
#ifndef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
try
#endif
{
while (argc && !ended_state)
{
const char *next = *argv++;
argc--;
if (*next != '-' && cbs.default_handler)
{
cbs.default_handler(next);
}
else
{
auto itr = cbs.callbacks.find(next);
if (itr == ::end(cbs.callbacks))
{
THROW("Invalid argument");
}
itr->second(*this);
}
}
return true;
}
#ifndef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
catch (...)
{
if (cbs.error_handler)
{
cbs.error_handler();
}
return false;
}
#endif
}
void end()
{
ended_state = true;
}
uint32_t next_uint()
{
if (!argc)
{
THROW("Tried to parse uint, but nothing left in arguments");
}
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
uint64_t val = stoul(*argv);
if (val > numeric_limits<uint32_t>::max())
{
THROW("next_uint() out of range");
}
argc--;
argv++;
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
return uint32_t(val);
}
double next_double()
{
if (!argc)
{
THROW("Tried to parse double, but nothing left in arguments");
}
double val = stod(*argv);
argc--;
argv++;
return val;
}
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
// Return a string only if it's not prefixed with `--`, otherwise return the default value
const char *next_value_string(const char *default_value)
{
if (!argc)
{
return default_value;
}
if (0 == strncmp("--", *argv, 2))
{
return default_value;
}
return next_string();
}
const char *next_string()
{
if (!argc)
{
THROW("Tried to parse string, but nothing left in arguments");
}
const char *ret = *argv;
argc--;
argv++;
return ret;
}
CLICallbacks cbs;
int argc;
char **argv;
bool ended_state = false;
};
static vector<uint32_t> read_spirv_file(const char *path)
{
FILE *file = fopen(path, "rb");
if (!file)
{
fprintf(stderr, "Failed to open SPIRV file: %s\n", path);
return {};
}
fseek(file, 0, SEEK_END);
long len = ftell(file) / sizeof(uint32_t);
rewind(file);
vector<uint32_t> spirv(len);
if (fread(spirv.data(), sizeof(uint32_t), len, file) != size_t(len))
spirv.clear();
fclose(file);
return spirv;
}
static bool write_string_to_file(const char *path, const char *string)
{
FILE *file = fopen(path, "w");
if (!file)
{
fprintf(stderr, "Failed to write file: %s\n", path);
return false;
}
fprintf(file, "%s", string);
fclose(file);
return true;
}
static void print_resources(const Compiler &compiler, const char *tag, const vector<Resource> &resources)
{
fprintf(stderr, "%s\n", tag);
fprintf(stderr, "=============\n\n");
bool print_ssbo = !strcmp(tag, "ssbos");
for (auto &res : resources)
{
auto &type = compiler.get_type(res.type_id);
if (print_ssbo && compiler.buffer_is_hlsl_counter_buffer(res.id))
continue;
// If we don't have a name, use the fallback for the type instead of the variable
// for SSBOs and UBOs since those are the only meaningful names to use externally.
// Push constant blocks are still accessed by name and not block name, even though they are technically Blocks.
bool is_push_constant = compiler.get_storage_class(res.id) == StorageClassPushConstant;
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
bool is_block = compiler.get_decoration_bitset(type.self).get(DecorationBlock) ||
compiler.get_decoration_bitset(type.self).get(DecorationBufferBlock);
bool is_sized_block = is_block && (compiler.get_storage_class(res.id) == StorageClassUniform ||
compiler.get_storage_class(res.id) == StorageClassUniformConstant);
uint32_t fallback_id = !is_push_constant && is_block ? res.base_type_id : res.id;
uint32_t block_size = 0;
if (is_sized_block)
block_size = uint32_t(compiler.get_declared_struct_size(compiler.get_type(res.base_type_id)));
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
Bitset mask;
if (print_ssbo)
mask = compiler.get_buffer_block_flags(res.id);
else
mask = compiler.get_decoration_bitset(res.id);
string array;
for (auto arr : type.array)
array = join("[", arr ? convert_to_string(arr) : "", "]") + array;
fprintf(stderr, " ID %03u : %s%s", res.id,
!res.name.empty() ? res.name.c_str() : compiler.get_fallback_name(fallback_id).c_str(), array.c_str());
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
if (mask.get(DecorationLocation))
fprintf(stderr, " (Location : %u)", compiler.get_decoration(res.id, DecorationLocation));
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
if (mask.get(DecorationDescriptorSet))
fprintf(stderr, " (Set : %u)", compiler.get_decoration(res.id, DecorationDescriptorSet));
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
if (mask.get(DecorationBinding))
fprintf(stderr, " (Binding : %u)", compiler.get_decoration(res.id, DecorationBinding));
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
if (mask.get(DecorationInputAttachmentIndex))
fprintf(stderr, " (Attachment : %u)", compiler.get_decoration(res.id, DecorationInputAttachmentIndex));
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
if (mask.get(DecorationNonReadable))
fprintf(stderr, " writeonly");
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
if (mask.get(DecorationNonWritable))
fprintf(stderr, " readonly");
if (is_sized_block)
fprintf(stderr, " (BlockSize : %u bytes)", block_size);
uint32_t counter_id = 0;
if (print_ssbo && compiler.buffer_get_hlsl_counter_buffer(res.id, counter_id))
fprintf(stderr, " (HLSL counter buffer ID: %u)", counter_id);
fprintf(stderr, "\n");
}
fprintf(stderr, "=============\n\n");
}
static const char *execution_model_to_str(spv::ExecutionModel model)
{
switch (model)
{
case spv::ExecutionModelVertex:
return "vertex";
case spv::ExecutionModelTessellationControl:
return "tessellation control";
case ExecutionModelTessellationEvaluation:
return "tessellation evaluation";
case ExecutionModelGeometry:
return "geometry";
case ExecutionModelFragment:
return "fragment";
case ExecutionModelGLCompute:
return "compute";
default:
return "???";
}
}
static void print_resources(const Compiler &compiler, const ShaderResources &res)
{
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
auto &modes = compiler.get_execution_mode_bitset();
fprintf(stderr, "Entry points:\n");
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
auto entry_points = compiler.get_entry_points_and_stages();
for (auto &e : entry_points)
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
fprintf(stderr, " %s (%s)\n", e.name.c_str(), execution_model_to_str(e.execution_model));
fprintf(stderr, "\n");
fprintf(stderr, "Execution modes:\n");
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
modes.for_each_bit([&](uint32_t i) {
auto mode = static_cast<ExecutionMode>(i);
uint32_t arg0 = compiler.get_execution_mode_argument(mode, 0);
uint32_t arg1 = compiler.get_execution_mode_argument(mode, 1);
uint32_t arg2 = compiler.get_execution_mode_argument(mode, 2);
switch (static_cast<ExecutionMode>(i))
{
case ExecutionModeInvocations:
fprintf(stderr, " Invocations: %u\n", arg0);
break;
case ExecutionModeLocalSize:
fprintf(stderr, " LocalSize: (%u, %u, %u)\n", arg0, arg1, arg2);
break;
case ExecutionModeOutputVertices:
fprintf(stderr, " OutputVertices: %u\n", arg0);
break;
#define CHECK_MODE(m) \
case ExecutionMode##m: \
fprintf(stderr, " %s\n", #m); \
break
CHECK_MODE(SpacingEqual);
CHECK_MODE(SpacingFractionalEven);
CHECK_MODE(SpacingFractionalOdd);
CHECK_MODE(VertexOrderCw);
CHECK_MODE(VertexOrderCcw);
CHECK_MODE(PixelCenterInteger);
CHECK_MODE(OriginUpperLeft);
CHECK_MODE(OriginLowerLeft);
CHECK_MODE(EarlyFragmentTests);
CHECK_MODE(PointMode);
CHECK_MODE(Xfb);
CHECK_MODE(DepthReplacing);
CHECK_MODE(DepthGreater);
CHECK_MODE(DepthLess);
CHECK_MODE(DepthUnchanged);
CHECK_MODE(LocalSizeHint);
CHECK_MODE(InputPoints);
CHECK_MODE(InputLines);
CHECK_MODE(InputLinesAdjacency);
CHECK_MODE(Triangles);
CHECK_MODE(InputTrianglesAdjacency);
CHECK_MODE(Quads);
CHECK_MODE(Isolines);
CHECK_MODE(OutputPoints);
CHECK_MODE(OutputLineStrip);
CHECK_MODE(OutputTriangleStrip);
CHECK_MODE(VecTypeHint);
CHECK_MODE(ContractionOff);
default:
break;
}
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
});
fprintf(stderr, "\n");
print_resources(compiler, "subpass inputs", res.subpass_inputs);
print_resources(compiler, "inputs", res.stage_inputs);
print_resources(compiler, "outputs", res.stage_outputs);
print_resources(compiler, "textures", res.sampled_images);
print_resources(compiler, "separate images", res.separate_images);
print_resources(compiler, "separate samplers", res.separate_samplers);
print_resources(compiler, "images", res.storage_images);
print_resources(compiler, "ssbos", res.storage_buffers);
print_resources(compiler, "ubos", res.uniform_buffers);
print_resources(compiler, "push", res.push_constant_buffers);
print_resources(compiler, "counters", res.atomic_counters);
}
static void print_push_constant_resources(const Compiler &compiler, const vector<Resource> &res)
{
for (auto &block : res)
{
auto ranges = compiler.get_active_buffer_ranges(block.id);
fprintf(stderr, "Active members in buffer: %s\n",
!block.name.empty() ? block.name.c_str() : compiler.get_fallback_name(block.id).c_str());
fprintf(stderr, "==================\n\n");
for (auto &range : ranges)
{
const auto &name = compiler.get_member_name(block.base_type_id, range.index);
fprintf(stderr, "Member #%3u (%s): Offset: %4u, Range: %4u\n", range.index,
!name.empty() ? name.c_str() : compiler.get_fallback_member_name(range.index).c_str(),
unsigned(range.offset), unsigned(range.range));
}
fprintf(stderr, "==================\n\n");
}
}
static void print_spec_constants(const Compiler &compiler)
{
auto spec_constants = compiler.get_specialization_constants();
fprintf(stderr, "Specialization constants\n");
fprintf(stderr, "==================\n\n");
for (auto &c : spec_constants)
fprintf(stderr, "ID: %u, Spec ID: %u\n", c.id, c.constant_id);
fprintf(stderr, "==================\n\n");
}
static void print_capabilities_and_extensions(const Compiler &compiler)
{
fprintf(stderr, "Capabilities\n");
fprintf(stderr, "============\n");
for (auto &capability : compiler.get_declared_capabilities())
fprintf(stderr, "Capability: %u\n", static_cast<unsigned>(capability));
fprintf(stderr, "============\n\n");
fprintf(stderr, "Extensions\n");
fprintf(stderr, "============\n");
for (auto &ext : compiler.get_declared_extensions())
fprintf(stderr, "Extension: %s\n", ext.c_str());
fprintf(stderr, "============\n\n");
}
struct PLSArg
{
PlsFormat format;
string name;
};
struct Remap
{
string src_name;
string dst_name;
unsigned components;
};
struct VariableTypeRemap
{
string variable_name;
string new_variable_type;
};
struct InterfaceVariableRename
{
StorageClass storageClass;
uint32_t location;
string variable_name;
};
struct CLIArguments
{
const char *input = nullptr;
const char *output = nullptr;
const char *cpp_interface_name = nullptr;
uint32_t version = 0;
uint32_t shader_model = 0;
uint32_t msl_version = 0;
bool es = false;
bool set_version = false;
bool set_shader_model = false;
bool set_msl_version = false;
bool set_es = false;
bool dump_resources = false;
bool force_temporary = false;
bool flatten_ubo = false;
bool fixup = false;
bool yflip = false;
bool sso = false;
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
bool support_nonzero_baseinstance = true;
vector<PLSArg> pls_in;
vector<PLSArg> pls_out;
vector<Remap> remaps;
vector<string> extensions;
vector<VariableTypeRemap> variable_type_remaps;
vector<InterfaceVariableRename> interface_variable_renames;
vector<HLSLVertexAttributeRemap> hlsl_attr_remap;
string entry;
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
string entry_stage;
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
struct Rename
{
string old_name;
string new_name;
ExecutionModel execution_model;
};
vector<Rename> entry_point_rename;
uint32_t iterations = 1;
bool cpp = false;
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
string reflect;
bool msl = false;
bool hlsl = false;
bool hlsl_compat = false;
bool vulkan_semantics = false;
bool flatten_multidimensional_arrays = false;
bool use_420pack_extension = true;
bool remove_unused = false;
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
bool combined_samplers_inherit_bindings = false;
};
static void print_help()
{
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
fprintf(stderr, "Usage: spirv-cross\n"
"\t[--output <output path>]\n"
"\t[SPIR-V file]\n"
"\t[--es]\n"
"\t[--no-es]\n"
"\t[--version <GLSL version>]\n"
"\t[--dump-resources]\n"
"\t[--help]\n"
"\t[--force-temporary]\n"
"\t[--vulkan-semantics]\n"
"\t[--flatten-ubo]\n"
"\t[--fixup-clipspace]\n"
"\t[--flip-vert-y]\n"
"\t[--iterations iter]\n"
"\t[--cpp]\n"
"\t[--cpp-interface-name <name>]\n"
"\t[--msl]\n"
"\t[--msl-version <MMmmpp>]\n"
"\t[--hlsl]\n"
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
"\t[--reflect]\n"
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
"\t[--shader-model]\n"
"\t[--hlsl-enable-compat]\n"
"\t[--separate-shader-objects]\n"
"\t[--pls-in format input-name]\n"
"\t[--pls-out format output-name]\n"
"\t[--remap source_name target_name components]\n"
"\t[--extension ext]\n"
"\t[--entry name]\n"
"\t[--stage <stage (vert, frag, geom, tesc, tese comp)>]\n"
"\t[--remove-unused-variables]\n"
"\t[--flatten-multidimensional-arrays]\n"
"\t[--no-420pack-extension]\n"
"\t[--remap-variable-type <variable_name> <new_variable_type>]\n"
"\t[--rename-interface-variable <in|out> <location> <new_variable_name>]\n"
"\t[--set-hlsl-vertex-input-semantic <location> <semantic>]\n"
"\t[--rename-entry-point <old> <new> <stage>]\n"
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
"\t[--combined-samplers-inherit-bindings]\n"
"\t[--no-support-nonzero-baseinstance]\n"
"\n");
}
static bool remap_generic(Compiler &compiler, const vector<Resource> &resources, const Remap &remap)
{
auto itr =
find_if(begin(resources), end(resources), [&remap](const Resource &res) { return res.name == remap.src_name; });
if (itr != end(resources))
{
compiler.set_remapped_variable_state(itr->id, true);
compiler.set_name(itr->id, remap.dst_name);
compiler.set_subpass_input_remapped_components(itr->id, remap.components);
return true;
}
else
return false;
}
static vector<PlsRemap> remap_pls(const vector<PLSArg> &pls_variables, const vector<Resource> &resources,
const vector<Resource> *secondary_resources)
{
vector<PlsRemap> ret;
for (auto &pls : pls_variables)
{
bool found = false;
for (auto &res : resources)
{
if (res.name == pls.name)
{
ret.push_back({ res.id, pls.format });
found = true;
break;
}
}
if (!found && secondary_resources)
{
for (auto &res : *secondary_resources)
{
if (res.name == pls.name)
{
ret.push_back({ res.id, pls.format });
found = true;
break;
}
}
}
if (!found)
fprintf(stderr, "Did not find stage input/output/target with name \"%s\".\n", pls.name.c_str());
}
return ret;
}
static PlsFormat pls_format(const char *str)
{
if (!strcmp(str, "r11f_g11f_b10f"))
return PlsR11FG11FB10F;
else if (!strcmp(str, "r32f"))
return PlsR32F;
else if (!strcmp(str, "rg16f"))
return PlsRG16F;
else if (!strcmp(str, "rg16"))
return PlsRG16;
else if (!strcmp(str, "rgb10_a2"))
return PlsRGB10A2;
else if (!strcmp(str, "rgba8"))
return PlsRGBA8;
else if (!strcmp(str, "rgba8i"))
return PlsRGBA8I;
else if (!strcmp(str, "rgba8ui"))
return PlsRGBA8UI;
else if (!strcmp(str, "rg16i"))
return PlsRG16I;
else if (!strcmp(str, "rgb10_a2ui"))
return PlsRGB10A2UI;
else if (!strcmp(str, "rg16ui"))
return PlsRG16UI;
else if (!strcmp(str, "r32ui"))
return PlsR32UI;
else
return PlsNone;
}
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
static ExecutionModel stage_to_execution_model(const std::string &stage)
{
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
if (stage == "vert")
return ExecutionModelVertex;
else if (stage == "frag")
return ExecutionModelFragment;
else if (stage == "comp")
return ExecutionModelGLCompute;
else if (stage == "tesc")
return ExecutionModelTessellationControl;
else if (stage == "tese")
return ExecutionModelTessellationEvaluation;
else if (stage == "geom")
return ExecutionModelGeometry;
else
SPIRV_CROSS_THROW("Invalid stage.");
}
static int main_inner(int argc, char *argv[])
{
CLIArguments args;
CLICallbacks cbs;
cbs.add("--help", [](CLIParser &parser) {
print_help();
parser.end();
});
cbs.add("--output", [&args](CLIParser &parser) { args.output = parser.next_string(); });
cbs.add("--es", [&args](CLIParser &) {
args.es = true;
args.set_es = true;
});
cbs.add("--no-es", [&args](CLIParser &) {
args.es = false;
args.set_es = true;
});
cbs.add("--version", [&args](CLIParser &parser) {
args.version = parser.next_uint();
args.set_version = true;
});
cbs.add("--dump-resources", [&args](CLIParser &) { args.dump_resources = true; });
cbs.add("--force-temporary", [&args](CLIParser &) { args.force_temporary = true; });
cbs.add("--flatten-ubo", [&args](CLIParser &) { args.flatten_ubo = true; });
cbs.add("--fixup-clipspace", [&args](CLIParser &) { args.fixup = true; });
cbs.add("--flip-vert-y", [&args](CLIParser &) { args.yflip = true; });
cbs.add("--iterations", [&args](CLIParser &parser) { args.iterations = parser.next_uint(); });
cbs.add("--cpp", [&args](CLIParser &) { args.cpp = true; });
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
cbs.add("--reflect", [&args](CLIParser &parser) { args.reflect = parser.next_value_string("json"); });
cbs.add("--cpp-interface-name", [&args](CLIParser &parser) { args.cpp_interface_name = parser.next_string(); });
cbs.add("--metal", [&args](CLIParser &) { args.msl = true; }); // Legacy compatibility
cbs.add("--msl", [&args](CLIParser &) { args.msl = true; });
cbs.add("--hlsl", [&args](CLIParser &) { args.hlsl = true; });
cbs.add("--hlsl-enable-compat", [&args](CLIParser &) { args.hlsl_compat = true; });
cbs.add("--vulkan-semantics", [&args](CLIParser &) { args.vulkan_semantics = true; });
cbs.add("--flatten-multidimensional-arrays", [&args](CLIParser &) { args.flatten_multidimensional_arrays = true; });
cbs.add("--no-420pack-extension", [&args](CLIParser &) { args.use_420pack_extension = false; });
cbs.add("--extension", [&args](CLIParser &parser) { args.extensions.push_back(parser.next_string()); });
cbs.add("--rename-entry-point", [&args](CLIParser &parser) {
auto old_name = parser.next_string();
auto new_name = parser.next_string();
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
auto model = stage_to_execution_model(parser.next_string());
args.entry_point_rename.push_back({ old_name, new_name, move(model) });
});
cbs.add("--entry", [&args](CLIParser &parser) { args.entry = parser.next_string(); });
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
cbs.add("--stage", [&args](CLIParser &parser) { args.entry_stage = parser.next_string(); });
cbs.add("--separate-shader-objects", [&args](CLIParser &) { args.sso = true; });
cbs.add("--set-hlsl-vertex-input-semantic", [&args](CLIParser &parser) {
HLSLVertexAttributeRemap remap;
remap.location = parser.next_uint();
remap.semantic = parser.next_string();
args.hlsl_attr_remap.push_back(move(remap));
});
cbs.add("--remap", [&args](CLIParser &parser) {
string src = parser.next_string();
string dst = parser.next_string();
uint32_t components = parser.next_uint();
args.remaps.push_back({ move(src), move(dst), components });
});
cbs.add("--remap-variable-type", [&args](CLIParser &parser) {
string var_name = parser.next_string();
string new_type = parser.next_string();
args.variable_type_remaps.push_back({ move(var_name), move(new_type) });
});
cbs.add("--rename-interface-variable", [&args](CLIParser &parser) {
StorageClass cls = StorageClassMax;
string clsStr = parser.next_string();
if (clsStr == "in")
cls = StorageClassInput;
else if (clsStr == "out")
cls = StorageClassOutput;
uint32_t loc = parser.next_uint();
string var_name = parser.next_string();
args.interface_variable_renames.push_back({ cls, loc, move(var_name) });
});
cbs.add("--pls-in", [&args](CLIParser &parser) {
auto fmt = pls_format(parser.next_string());
auto name = parser.next_string();
args.pls_in.push_back({ move(fmt), move(name) });
});
cbs.add("--pls-out", [&args](CLIParser &parser) {
auto fmt = pls_format(parser.next_string());
auto name = parser.next_string();
args.pls_out.push_back({ move(fmt), move(name) });
});
cbs.add("--shader-model", [&args](CLIParser &parser) {
args.shader_model = parser.next_uint();
args.set_shader_model = true;
});
cbs.add("--msl-version", [&args](CLIParser &parser) {
args.msl_version = parser.next_uint();
args.set_msl_version = true;
});
cbs.add("--remove-unused-variables", [&args](CLIParser &) { args.remove_unused = true; });
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
cbs.add("--combined-samplers-inherit-bindings",
[&args](CLIParser &) { args.combined_samplers_inherit_bindings = true; });
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
cbs.add("--no-support-nonzero-baseinstance", [&](CLIParser &) { args.support_nonzero_baseinstance = false; });
cbs.default_handler = [&args](const char *value) { args.input = value; };
cbs.error_handler = [] { print_help(); };
CLIParser parser{ move(cbs), argc - 1, argv + 1 };
if (!parser.parse())
{
return EXIT_FAILURE;
}
else if (parser.ended_state)
{
return EXIT_SUCCESS;
}
if (!args.input)
{
fprintf(stderr, "Didn't specify input file.\n");
print_help();
return EXIT_FAILURE;
}
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
// Special case reflection because it has little to do with the path followed by code-outputting compilers
if (!args.reflect.empty())
{
CompilerReflection compiler(read_spirv_file(args.input));
compiler.set_format(args.reflect);
auto json = compiler.compile();
if (args.output)
write_string_to_file(args.output, json.c_str());
else
printf("%s", json.c_str());
return EXIT_SUCCESS;
}
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
unique_ptr<CompilerGLSL> compiler;
bool combined_image_samplers = false;
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
bool build_dummy_sampler = false;
if (args.cpp)
{
compiler = unique_ptr<CompilerGLSL>(new CompilerCPP(read_spirv_file(args.input)));
if (args.cpp_interface_name)
static_cast<CompilerCPP *>(compiler.get())->set_interface_name(args.cpp_interface_name);
}
else if (args.msl)
{
compiler = unique_ptr<CompilerMSL>(new CompilerMSL(read_spirv_file(args.input)));
auto *msl_comp = static_cast<CompilerMSL *>(compiler.get());
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
auto msl_opts = msl_comp->get_msl_options();
if (args.set_msl_version)
msl_opts.msl_version = args.msl_version;
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
msl_comp->set_msl_options(msl_opts);
}
else if (args.hlsl)
compiler = unique_ptr<CompilerHLSL>(new CompilerHLSL(read_spirv_file(args.input)));
else
{
combined_image_samplers = !args.vulkan_semantics;
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
build_dummy_sampler = true;
compiler = unique_ptr<CompilerGLSL>(new CompilerGLSL(read_spirv_file(args.input)));
}
if (!args.variable_type_remaps.empty())
{
auto remap_cb = [&](const SPIRType &, const string &name, string &out) -> void {
for (const VariableTypeRemap &remap : args.variable_type_remaps)
if (name == remap.variable_name)
out = remap.new_variable_type;
};
compiler->set_variable_type_remap_callback(move(remap_cb));
}
for (auto &rename : args.entry_point_rename)
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
compiler->rename_entry_point(rename.old_name, rename.new_name, rename.execution_model);
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
auto entry_points = compiler->get_entry_points_and_stages();
auto entry_point = args.entry;
ExecutionModel model = ExecutionModelMax;
if (!args.entry_stage.empty())
{
model = stage_to_execution_model(args.entry_stage);
if (entry_point.empty())
{
// Just use the first entry point with this stage.
for (auto &e : entry_points)
{
if (e.execution_model == model)
{
entry_point = e.name;
break;
}
}
if (entry_point.empty())
{
fprintf(stderr, "Could not find an entry point with stage: %s\n", args.entry_stage.c_str());
return EXIT_FAILURE;
}
}
else
{
// Make sure both stage and name exists.
bool exists = false;
for (auto &e : entry_points)
{
if (e.execution_model == model && e.name == entry_point)
{
exists = true;
break;
}
}
if (!exists)
{
fprintf(stderr, "Could not find an entry point %s with stage: %s\n", entry_point.c_str(),
args.entry_stage.c_str());
return EXIT_FAILURE;
}
}
}
else if (!entry_point.empty())
{
// Make sure there is just one entry point with this name, or the stage
// is ambiguous.
uint32_t stage_count = 0;
for (auto &e : entry_points)
{
if (e.name == entry_point)
{
stage_count++;
model = e.execution_model;
}
}
if (stage_count == 0)
{
fprintf(stderr, "There is no entry point with name: %s\n", entry_point.c_str());
return EXIT_FAILURE;
}
else if (stage_count > 1)
{
fprintf(stderr, "There is more than one entry point with name: %s. Use --stage.\n", entry_point.c_str());
return EXIT_FAILURE;
}
}
if (!entry_point.empty())
compiler->set_entry_point(entry_point, model);
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
if (!args.set_version && !compiler->get_common_options().version)
{
fprintf(stderr, "Didn't specify GLSL version and SPIR-V did not specify language.\n");
print_help();
return EXIT_FAILURE;
}
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
CompilerGLSL::Options opts = compiler->get_common_options();
if (args.set_version)
opts.version = args.version;
if (args.set_es)
opts.es = args.es;
opts.force_temporary = args.force_temporary;
opts.separate_shader_objects = args.sso;
opts.flatten_multidimensional_arrays = args.flatten_multidimensional_arrays;
opts.enable_420pack_extension = args.use_420pack_extension;
opts.vulkan_semantics = args.vulkan_semantics;
opts.vertex.fixup_clipspace = args.fixup;
opts.vertex.flip_vert_y = args.yflip;
Squashed 'deps/SPIRV-Cross/' changes from e59cc24495..f96c9f9fb4 f96c9f9fb4 Merge pull request #635 from KhronosGroup/fix-631 e044732896 Support OpTypeImage with depth == 2 (unknown) properly. a6814a405a Merge pull request #630 from KhronosGroup/fix-628 af2d3abd03 Fail more gracefully with some unsupported opcodes. 26107ba200 Fix os.errno issues on Travis. ee44f6027b Changed OpTypeImage to only flag depth if the op is 1 c863f53cac Merge pull request #627 from KhronosGroup/macro-namespace-fix 9ddbd5aff6 Run format_all.sh. f1752e58e1 Add basic namespace to internal macros. d67e586b2e Merge pull request #626 from billhollings/master 9bf226cb05 Fixes for code review of PR 626. 4c5142b9d3 CompilerMSL support larger texel buffers by using 2D Metal textures. 314f39a7c4 Merge pull request #621 from billhollings/master 4beefe756c Fixes from PR 621 code review. f66507a701 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 0ea5e0549e Merge pull request #615 from JustSid/master 5ac55ee735 Fixed emission of some legacy texture ops without requiring the appropriate extensions ceec708b89 Added better fallbacks for legacy textureProjLod() and textureProjLodOffset() generation 994f789465 Merge pull request #624 from KhronosGroup/fix-619 33c61d2abe Support branch/loop hints in HLSL. 327fb03677 Merge pull request #623 from KhronosGroup/fix-618 2077478651 Merge pull request #622 from KhronosGroup/fix-620 10dfaf79d5 Support globallycoherent in HLSL. ffa9133d77 Support ternary expressions in OpSpecConstantOp. e091031613 CompilerMSL pass builtin struct members into functions. 7607eb6923 Merge pull request #617 from KhronosGroup/fix-612 d94d20f4f3 Deal with some builtins being declared with wrong signedness. 0f62b5dc1e Moved check for depth texture and shadowXY emission completely to legacy_tex_op() 447a253ce7 Simplified check for depth texture 76c8e3c1c4 Merge pull request #616 from KhronosGroup/fix-614 b29629fd46 Add support to remove SPIRV_Cross_BaseInstance uniform. 809631ce21 Mention JSON backend in README. 040204d65c Fix warnings and run format_all.sh. b4c8c3b9b2 Merge branch 'reflection' of git://github.com/jherico/SPIRV-Cross f6dad78c99 Added support for shadowXY() sample instructions in legacy GLSL 9ad432463c Prefix integer types with underscore 0ad0f948e1 More PR feedback 3b30202bee Add reflection specific test cases, add reflection testing to test_shaders.sh 8d84a541ac Add specialization constant output in reflection 762040084d More feedback d0a67ba6a7 Code consolidation, const correctness, faster regression testing 3a825349bc More cleanup 6c88b0048b PR feedback ee86000529 Cleanup code 709d3c60f2 Working on reflection output 0039cb86fc Merge pull request #613 from KhronosGroup/fix-609 9d31154917 Deal with switch case labels which share a block. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: f96c9f9fb4fc7d17991cecb2b2294dce06d08d9c
2018-07-04 22:50:02 +02:00
opts.vertex.support_nonzero_base_instance = args.support_nonzero_baseinstance;
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
compiler->set_common_options(opts);
// Set HLSL specific options.
if (args.hlsl)
{
auto *hlsl = static_cast<CompilerHLSL *>(compiler.get());
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
auto hlsl_opts = hlsl->get_hlsl_options();
if (args.set_shader_model)
{
if (args.shader_model < 30)
{
fprintf(stderr, "Shader model earlier than 30 (3.0) not supported.\n");
return EXIT_FAILURE;
}
hlsl_opts.shader_model = args.shader_model;
}
if (args.hlsl_compat)
{
// Enable all compat options.
hlsl_opts.point_size_compat = true;
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
hlsl_opts.point_coord_compat = true;
}
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
hlsl->set_hlsl_options(hlsl_opts);
}
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
if (build_dummy_sampler)
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
{
uint32_t sampler = compiler->build_dummy_sampler_for_combined_images();
if (sampler != 0)
{
// Set some defaults to make validation happy.
compiler->set_decoration(sampler, DecorationDescriptorSet, 0);
compiler->set_decoration(sampler, DecorationBinding, 0);
}
}
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
ShaderResources res;
if (args.remove_unused)
{
auto active = compiler->get_active_interface_variables();
res = compiler->get_shader_resources(active);
compiler->set_enabled_interface_variables(move(active));
}
else
res = compiler->get_shader_resources();
if (args.flatten_ubo)
{
for (auto &ubo : res.uniform_buffers)
compiler->flatten_buffer_block(ubo.id);
for (auto &ubo : res.push_constant_buffers)
compiler->flatten_buffer_block(ubo.id);
}
auto pls_inputs = remap_pls(args.pls_in, res.stage_inputs, &res.subpass_inputs);
auto pls_outputs = remap_pls(args.pls_out, res.stage_outputs, nullptr);
compiler->remap_pixel_local_storage(move(pls_inputs), move(pls_outputs));
for (auto &ext : args.extensions)
compiler->require_extension(ext);
for (auto &remap : args.remaps)
{
if (remap_generic(*compiler, res.stage_inputs, remap))
continue;
if (remap_generic(*compiler, res.stage_outputs, remap))
continue;
if (remap_generic(*compiler, res.subpass_inputs, remap))
continue;
}
for (auto &rename : args.interface_variable_renames)
{
if (rename.storageClass == StorageClassInput)
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
spirv_cross_util::rename_interface_variable(*compiler, res.stage_inputs, rename.location,
rename.variable_name);
else if (rename.storageClass == StorageClassOutput)
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
spirv_cross_util::rename_interface_variable(*compiler, res.stage_outputs, rename.location,
rename.variable_name);
else
{
fprintf(stderr, "error at --rename-interface-variable <in|out> ...\n");
return EXIT_FAILURE;
}
}
if (args.dump_resources)
{
print_resources(*compiler, res);
print_push_constant_resources(*compiler, res.push_constant_buffers);
print_spec_constants(*compiler);
print_capabilities_and_extensions(*compiler);
}
if (combined_image_samplers)
{
compiler->build_combined_image_samplers();
Squashed 'deps/SPIRV-Cross/' changes from c9516fa917..e59cc24495 e59cc24495 Merge pull request #607 from billhollings/master ac57a30ad6 Regenerate MSL shaders to fix conflicts from merge. ab2ea93e35 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 9b4defe202 CompilerMSL support matrices & arrays in stage-in & stage-out. 285f214071 Merge pull request #605 from KhronosGroup/unpack-regular-operations-msl 58fab58e5e Do not unpack transposed matrices. 192a882df3 Also unpack regular unary/binary operations on MSL. dc565136fb Merge pull request #604 from KhronosGroup/fix-603 b86bd0a265 Unpack expressions when used in functions on MSL. c5b6ba239c Merge pull request #599 from KhronosGroup/fix-295 f1e8555801 Emit matrix layouts in structs directly. b1196f2ace Merge pull request #598 from KhronosGroup/fix-594 6bcc890e63 Sanitize underscores in general, not just for members. 6fea07f2fd Merge pull request #597 from KhronosGroup/fix-595-596-592 3a9b045dc3 Various maintenance fixes. 0a83bacf3e Merge pull request #593 from KhronosGroup/old-clang-compile 2a1ab4108b Fix compile on older clang. 6ef1c49ec0 Merge pull request #591 from KhronosGroup/fix-578 04b149feb0 Fix image load/store on cube arrays in MSL. 8bac5c09f3 Merge pull request #590 from KhronosGroup/fix-581 f65120c147 Deal with packed expressions in more scenarios. db1ed375b0 Merge pull request #589 from KhronosGroup/fix-580 280fb93204 Add test for reading SSBO from fragment shader on MSL. a1b3964cbd Run format_all.sh. 6b3da831be Declare read-only SSBOs as const device in MSL. 08336e7bbb Merge pull request #588 from KhronosGroup/pr-583 46bf17c5d3 Add SREM tests for HLSL/MSL. 7cba89b4a5 Add reference files for SREM. 6b144cc609 handle OpSRem e792cd6160 no expression type for OpSRem f1eacba244 Merge pull request #587 from zeux/master 91fd41816f Fix textureGrad compilation for legacy targets 8cc1fdbb30 Merge pull request #586 from KhronosGroup/fix-584 ba15daee33 Add support for inheriting bindings for combined image samplers. f929c361c5 Merge pull request #577 from KhronosGroup/fix-575 bcaae84c76 Deal with scoping for Private variables. 26b887ec99 Fix atomic_compare_exchange_weak_explicit. 62c6d2d498 Merge pull request #576 from KhronosGroup/fix-574 fb7181bff1 Run format_all.sh. c643addacd Only reflect spec constant if it actually has a constant ID. 991b655c72 Declare OpSpecConstantOp up-front on relevant targets. 0617b98613 Run format_all.sh. 3951b9456f Fix SpecConstantComposite if input is SpecConstantOp. c74dc4578a Merge pull request #572 from KhronosGroup/vulkan-glsl-sampler-mediump 01080365fa Use mediump on images in --vulkan-semantics as well. 9d370aca58 Merge pull request #571 from KhronosGroup/fix-570 7eba247864 Handle inout properly with split access chains. 97e38bcd38 Merge pull request #569 from KhronosGroup/fix-566 b71f5dfc0c Fix split access chains for builtin arrays. e4694a8403 Merge pull request #568 from KhronosGroup/fix-567 903b798da7 Fix GCC 8.1 build. d3b966322d Merge pull request #565 from pmuetschard/master aced6058b4 Don't limit GLSL identifiers with HLSL keywords. 2792f8f3f2 Merge pull request #564 from KhronosGroup/fix-563 85a8f066f4 Do not use RMW rewrite for matrices. 04f0a08cfc Merge pull request #562 from KhronosGroup/fix-561 d2df067dd4 Force recompile if we add row-major transpose functions in MSL. 7b95168c3d Do not clear spv_function_implementations on MSL. 9279750a1d Merge pull request #560 from KhronosGroup/fix-557 17be3c652f Deal with fake overloads when using combined image samplers. e80d6e0142 Merge pull request #559 from KhronosGroup/fix-558 3187d89c31 Reduce test case ... MSL can't deal with certain unusual cases yet. f3e810b8b3 Fix OpCompositeConstruct with arrays in MSL. 9d43e9c02a Merge pull request #556 from billhollings/master ba1026b899 Merge branch 'master' of https://github.com/KhronosGroup/SPIRV-Cross 57213cb7ca Compiler MSL default gather offset when component specified. 1ebccb4466 Mention Wiki in README. 8f07df016b Merge pull request #555 from KhronosGroup/fix-553 7e23e69f2a Run format_all.sh. 47081f810a Fix GatherDref on GLSL. 6b478c928d Merge pull request #554 from KhronosGroup/query-fixes 40bbf6be7a Build combined dummy samplers for Query functions without sampler as well. d93807a625 Deal with OpImageFetch without explicit LOD. 454691f434 Merge pull request #547 from KhronosGroup/op-image-usage-tracking aaf397cd1f Fix usage tracking issue for OpImage. bbf6b60350 Merge pull request #546 from KhronosGroup/fix-545 893ed379d5 Remove some stale test files. cd442b9c2f Clean and fix some issues with test_shaders.py. 18958ecccb Add test for combined-sampler-reuse on GLSL. 0280800a8f Fix case where SampledImage would get flushed to temporary. a090907607 Merge pull request #543 from KhronosGroup/fix-542 8b75e46433 Fix some formatting issues. f56433b802 Add new tests for combined arrays of sampler + image. a39eb4826b Combined array of images is starting to work ... 1478847122 Change AppVeyor badge link to the correct one. d559a8df39 Add AppVeyor status badge. dd39d36726 Merge pull request #540 from KhronosGroup/appveyor cc82d14ee8 Add appveyor script. d0c829b580 Add no-opt to CTest, make test_shaders.py faster when FXC is missing. 2804d9acd7 Merge pull request #539 from KhronosGroup/fix-533 e351e5c565 Use convert_to_string for lod clamp. e30a94225f Complete MSL constexpr samplers. 64f9461d72 Check for array of samplers. df58debf7a Add support for constexpr samplers in MSL. 3a8335eee0 Merge pull request #537 from KhronosGroup/fix-535 b9cd3dcd7f Run format_all.sh. e930f79e2e Be a bit smarter about uint on legacy targets. 2684054bbd Merge pull request #538 from KhronosGroup/fix-io-block-location b06c1af9b3 Distinguish between enhanced_layouts and SSO requirements. 28c9be8a23 Unsigned integers are disallowed on legacy targets. 7796a9f3ec Merge pull request #531 from KhronosGroup/subgroup c266429be9 Partially implement subgroup ops for HLSL SM 6.0. 146ea76f52 Add test shader for subgroup. e1ccfd5dbb Implement all of subgroup. f6c0e53f58 Start adding Vulkan 1.1 subgroup support to GLSL. 489e04e09e Merge pull request #530 from KhronosGroup/fix-529 9c2761f69a Run format_all.sh. 8175e2e200 Fix depth compare textures when used in functions without argument. edac731360 Merge pull request #528 from msiglreith/fix_root_constants_name 6bdd775936 Merge pull request #526 from taisei-project/strip-uniform-location f260c452f7 Fix naming of root constants 4a43024dba Strip uniform locations for ESSL < 3.00 and GLSL < 430 9b8c2c4654 Merge pull request #524 from KhronosGroup/fix-512-523 694b314f87 Support empty structs. 31a3fdf4ee Decouple public require_extension and the internal use of the function. d0133c5dd9 Merge pull request #509 from KhronosGroup/hlsl-semantic-counter-buffer d8cdab2f57 Add test shader for semantic decoration. 05c66f9cac Add test shader which uses counter buffer extension. 215d3ca0a4 Add support for new HLSL semantic/counter buffer decorations. 7f84537350 Merge pull request #519 from KhronosGroup/fix-507 ac81a0ce68 Use declared binding in SPIR-V as a fallback for explicit MSL binds. e8ca39b7b5 Add test for sampler image arrays. 382101bd05 Run format_all.sh. 1d082e9b79 Fix passing arrays of combined image samplers in HLSL. 5827dd54ea Support array of images and samplers in MSL. 81eb72a9a0 Ignore LOD when sampling 1D textures in MSL. 69ffd918a6 Merge pull request #522 from KhronosGroup/fix-515 938040be0b Only disable binding layout for UBOs. fe697a80f5 Emit classic uniform for UBO in GLSL 1.30. 65be63fd04 Merge pull request #521 from KhronosGroup/fix-516 a6e211e00b Support dual-source blending on GLSL and MSL. a1e30c8c2b Merge pull request #520 from KhronosGroup/fix-517 3229e6efb6 Add more illegal name replacement in MSL. 761b06bc73 Merge pull request #514 from KhronosGroup/fix-510 a901b4c814 Remove redundant temporary sort. c1947aa447 Update glslang/SPIRV-Tools on Travis. 35f64d03bb Fix name aliasing for temporary variables. 5161d5ed3b Merge pull request #505 from KhronosGroup/msl-array-mrt 719cf9d42f Run format_all.sh. 8e90382675 Properly flatten MRT outputs in MSL. 6e6ca0b237 Attempt MRT-as-array in MSL. fbfe13657a Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools 4f348a9807 Update README and update_test_shaders.sh. b46910e9f5 Access chain into packed vectors as arrays. a6afda650f Add newly moved reference files. cdbd376c42 Try building debug on Travis. e7bf8d2f48 Refactor out noopt shaders to their own folders. 1a4a36b6cd Experiment a bit more with Travis. 5a746ba941 Split checkout and build on Travis CI. 4979d10b54 Implement packHalf2x16/unpackHalf2x16 on MSL. ae2680c898 Make sure ballotARB inherits expression dependencies. 938c7debed Handle control-dependent temporaries. 012377f811 Refactor block IO emission to use bitset. 955eac522b Make use of the handy scripts for Travis as well. 9fbd8b789e Update tests for latest SPIRV-Tools and glslang. e8e58844d4 Rewrite everything to use Bitset rather than uint64_t. 29315f3b3f Merge pull request #498 from JustSid/master e66fd6c2a0 Added generation of the textureXYZGrad() legacy GLSL instruction 0f9cb0da0d Merge pull request #497 from KhronosGroup/fix-489 9a52713d77 Run format_all.sh. a803e5ae38 Deprecate set_options()/get_options() interface, replace it. 236b2fa47c Merge pull request #496 from KhronosGroup/fix-494 e3b8e9455c Add test shader where a phi variable invalidates a temporary. 1de74fdabd Explicitly emit break/continues in selection branches. e0efa737ca Expand the implementation of inherit_expression_dependencies. 01fbb3a342 Merge pull request #495 from KhronosGroup/fix-493 28cccc3dbb Emit complex continue blocks "properly". 54549a624f Add some test shaders for special merge methods. 8d557d4103 Handle cases where merge selects as also loop merge or continue blocks. 8c8a93f745 Merge pull request #492 from KhronosGroup/fix-488 922420e346 Disallow arrays and structs from becoming loop variables. 2e5d06d1ce Merge pull request #485 from KhronosGroup/fix-484 bdabd0c73a Disable double test in MSL FP16 tests. 723bec5d33 frexp/ldexp fails in debug builds, workaround temporarily. 0780820a7b Skip interpolateAt tests with FP16. ac0e93f392 Run format_all.sh. 18ad1be3c3 Add FP16 test for MSL as well. 47d94ff8d9 Add FP16 to HLSL. 770ed25f29 Merge pull request #487 from KhronosGroup/fix-486 15a941cd3d Add builtin GLSL functions to blacklist. d9da2db442 Some compat fixes for MSL and Half. 547278da12 Test denormal fp16 constants. 24dfe496c2 Run format_all.sh. 05348a66ca Add test shader for FP16 support. bc0f698df3 Fix packing alignments for float16. 91f85d3412 Begin adding float16_t support to GLSL. b0a2de5b63 Merge pull request #483 from KhronosGroup/fix-466 38d9d8af68 Add some more MSL test shaders. 5fe79eb59c Update tests. 294259e2f1 Fix type aliasing on MSL. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: e59cc244958af6059f7bd1d16d833e17409dec37
2018-06-20 09:32:45 +02:00
if (args.combined_samplers_inherit_bindings)
spirv_cross_util::inherit_combined_sampler_bindings(*compiler);
// Give the remapped combined samplers new names.
for (auto &remap : compiler->get_combined_image_samplers())
{
compiler->set_name(remap.combined_id, join("SPIRV_Cross_Combined", compiler->get_name(remap.image_id),
compiler->get_name(remap.sampler_id)));
}
}
Squashed 'deps/SPIRV-Cross/' changes from 33c5cd9..c9516fa c9516fa Fix OSX Travis. 94cd777 Move `rename_interface_variable` to util 467c956 Merge pull request #480 from KhronosGroup/fix-476 1e4db56 Run format_all.sh. eecbeaa Take execution model into account for entry point methods. 337150f Merge pull request #479 from KhronosGroup/fix-477 3c1b147 Support Invariant for BuiltInPosition. cae1722 Merge pull request #475 from KhronosGroup/fix-convert-cast e69b1ae Fix implicit conversion bug. b39c063 Merge pull request #474 from KhronosGroup/fix-pointer-overload fda36f8 Fix function overload when SPIR-V overloads on pointer type. a61e728 Merge pull request #472 from KhronosGroup/fix-446 6a12ff7 Fix multiple declaration of spvDet2x2 on MSL. b380a21 Implement MatrixInverse on HLSL. 6066fe4 Merge pull request #471 from KhronosGroup/fix-462 f6d08e6 Add workaround for PointCoord builtin on HLSL. fb196c2 Merge pull request #470 from KhronosGroup/fix-459 dd603ea Support spec constant array size in blocks. 32b1c7d Merge pull request #469 from KhronosGroup/fix-454 a04bdcc Handle overloaded functions which share the same OpName. f887b20 Merge pull request #468 from KhronosGroup/fix-461 4543dac Run format_all.sh. 047ad7d Support special float constants (NaN/Inf). 3f64f56 Merge pull request #465 from KhronosGroup/fix-445 0673f27 Fix incorrect loop range. 114c2c5 Add clip/cull-distance support to HLSL. fb3f92a Overhaul clip/cull distance support in GLSL. 11bbccb Merge pull request #464 from billhollings/master 50ef6cd CompilerMSL remove incorrect packing of non-interface type-aliased structs. 3925fe8 Merge pull request #460 from KhronosGroup/fix-424 47b3742 Run format_all.sh. 1a2e4de Add test for texelFetch without sampler. 4db7061 Begin implementing texelFetch(texture2D) workaround on GLSL. d871a89 Remove "EXPERIMENTAL" tag from MSL/HLSL. 218b0a5 Merge pull request #455 from KhronosGroup/fix-452 8a3bef2 Add OpFRem tests. 54a065b Run format_all.sh. 3fa6cc8 Implement FRem. a9a6bca Merge pull request #453 from KhronosGroup/fix-444 843e34b Add IsFrontFace support to HLSL. 3d0c61f Merge pull request #451 from KhronosGroup/fix-437 636cc30 Fix case where hoisted temporaries were used before being declared. 4d1c5ad Merge pull request #450 from jodavis42/OpCopyMemoryCrash b4b629b Null crash fix in OpCopyMemory. 6a0f698 Set width when creating NumWorkgroups buffer. 2bda0d5 Merge pull request #449 from billhollings/master 2964e32 CompilerMSL support gl_SampleMask and convert it to scalar uint from array. 64d3083 Merge pull request #448 from billhollings/master b453348 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross 607b0d6 CompilerMSL support smaller offsets for 3-row row-major matrices. 7be30aa Merge pull request #442 from KhronosGroup/fix-435 a3104e9 Also check that type we load is an image. a3ae861 Fix depth image usage in MSL for separate image/samplers. 702e086 Support passing implicit frag_coord arguments down to functions. 0912427 Begin implementing subpassLoad in MSL. 18a594a Implement subpass input support in HLSL. f4bce68 Merge pull request #433 from KhronosGroup/fix-428 c9db3e5 Overload on constant storage. b2c9487 Attempt to deduce constant/thread storage. 1a9c960 MSL cannot declare inline arrays except in certain cases. 156dd90 Implicit return value takes thread storage. d89b790 Fix wrong function declaration in MSL. 00ccd59 Return arrays in HLSL/MSL by writing to an output variable instead. 9fa91f7 Support returning arrays from functions in GLSL/MSL. ed6b775 Merge pull request #417 from msiglreith/root_constants_overwrite 369f5f6 Add missing include d096f5c hlsl: Support custom root constant layout 4b58f65 Merge pull request #438 from zeux/msvc-warning-fix 24cf308 Fix MSVC 2015 warning 8b53b70 Merge pull request #434 from KhronosGroup/fix-429 18e8833 Support gl_NumWorkgroups in HLSL. 181a5fa Fix formatting after merge. e3f4041 Fixes MSVC 2013 compilation ef33770 Merge pull request #431 from twinaphex/master 59a12c7 Uniquely name these static functions git-subtree-dir: deps/SPIRV-Cross git-subtree-split: c9516fa91709b68ac20fa614625e85e0ced3f23f
2018-03-06 04:10:13 +01:00
if (args.hlsl)
{
auto *hlsl_compiler = static_cast<CompilerHLSL *>(compiler.get());
uint32_t new_builtin = hlsl_compiler->remap_num_workgroups_builtin();
if (new_builtin)
{
hlsl_compiler->set_decoration(new_builtin, DecorationDescriptorSet, 0);
hlsl_compiler->set_decoration(new_builtin, DecorationBinding, 0);
}
}
string glsl;
for (uint32_t i = 0; i < args.iterations; i++)
{
if (args.hlsl)
glsl = static_cast<CompilerHLSL *>(compiler.get())->compile(move(args.hlsl_attr_remap));
else
glsl = compiler->compile();
}
if (args.output)
write_string_to_file(args.output, glsl.c_str());
else
printf("%s", glsl.c_str());
return EXIT_SUCCESS;
}
int main(int argc, char *argv[])
{
#ifdef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
return main_inner(argc, argv);
#else
// Make sure we catch the exception or it just disappears into the aether on Windows.
try
{
return main_inner(argc, argv);
}
catch (const std::exception &e)
{
fprintf(stderr, "SPIRV-Cross threw an exception: %s\n", e.what());
return EXIT_FAILURE;
}
#endif
}