RetroArch/deps/SPIRV-Cross/spirv_msl.hpp

426 lines
16 KiB
C++
Raw Normal View History

/*
* Copyright 2016-2018 The Brenwill Workshop Ltd.
*
* 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.
*/
#ifndef SPIRV_CROSS_MSL_HPP
#define SPIRV_CROSS_MSL_HPP
#include "spirv_glsl.hpp"
2018-02-04 18:55:22 +01:00
#include <stdint.h>
#include <limits>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace spirv_cross
{
// Defines MSL characteristics of a vertex attribute at a particular location.
// The used_by_shader flag is set to true during compilation of SPIR-V to MSL
// if the shader makes use of this vertex attribute.
struct MSLVertexAttr
{
uint32_t location = 0;
uint32_t msl_buffer = 0;
uint32_t msl_offset = 0;
uint32_t msl_stride = 0;
bool per_instance = false;
bool used_by_shader = false;
};
// Matches the binding index of a MSL resource for a binding within a descriptor set.
// Taken together, the stage, desc_set and binding combine to form a reference to a resource
// descriptor used in a particular shading stage. Generally, only one of the buffer, texture,
// or sampler elements will be populated. The used_by_shader flag is set to true during
// compilation of SPIR-V to MSL if the shader makes use of this vertex attribute.
struct MSLResourceBinding
{
spv::ExecutionModel stage;
uint32_t desc_set = 0;
uint32_t binding = 0;
uint32_t msl_buffer = 0;
uint32_t msl_texture = 0;
uint32_t msl_sampler = 0;
bool used_by_shader = 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
enum MSLSamplerCoord
{
MSL_SAMPLER_COORD_NORMALIZED,
MSL_SAMPLER_COORD_PIXEL
};
enum MSLSamplerFilter
{
MSL_SAMPLER_FILTER_NEAREST,
MSL_SAMPLER_FILTER_LINEAR
};
enum MSLSamplerMipFilter
{
MSL_SAMPLER_MIP_FILTER_NONE,
MSL_SAMPLER_MIP_FILTER_NEAREST,
MSL_SAMPLER_MIP_FILTER_LINEAR,
};
enum MSLSamplerAddress
{
MSL_SAMPLER_ADDRESS_CLAMP_TO_ZERO,
MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE,
MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER,
MSL_SAMPLER_ADDRESS_REPEAT,
MSL_SAMPLER_ADDRESS_MIRRORED_REPEAT
};
enum MSLSamplerCompareFunc
{
MSL_SAMPLER_COMPARE_FUNC_NEVER,
MSL_SAMPLER_COMPARE_FUNC_LESS,
MSL_SAMPLER_COMPARE_FUNC_LESS_EQUAL,
MSL_SAMPLER_COMPARE_FUNC_GREATER,
MSL_SAMPLER_COMPARE_FUNC_GREATER_EQUAL,
MSL_SAMPLER_COMPARE_FUNC_EQUAL,
MSL_SAMPLER_COMPARE_FUNC_NOT_EQUAL,
MSL_SAMPLER_COMPARE_FUNC_ALWAYS
};
enum MSLSamplerBorderColor
{
MSL_SAMPLER_BORDER_COLOR_TRANSPARENT_BLACK,
MSL_SAMPLER_BORDER_COLOR_OPAQUE_BLACK,
MSL_SAMPLER_BORDER_COLOR_OPAQUE_WHITE
};
struct MSLConstexprSampler
{
MSLSamplerCoord coord = MSL_SAMPLER_COORD_NORMALIZED;
MSLSamplerFilter min_filter = MSL_SAMPLER_FILTER_NEAREST;
MSLSamplerFilter mag_filter = MSL_SAMPLER_FILTER_NEAREST;
MSLSamplerMipFilter mip_filter = MSL_SAMPLER_MIP_FILTER_NONE;
MSLSamplerAddress s_address = MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE;
MSLSamplerAddress t_address = MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE;
MSLSamplerAddress r_address = MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE;
MSLSamplerCompareFunc compare_func = MSL_SAMPLER_COMPARE_FUNC_NEVER;
MSLSamplerBorderColor border_color = MSL_SAMPLER_BORDER_COLOR_TRANSPARENT_BLACK;
float lod_clamp_min = 0.0f;
float lod_clamp_max = 1000.0f;
int max_anisotropy = 1;
bool compare_enable = false;
bool lod_clamp_enable = false;
bool anisotropy_enable = false;
};
// Tracks the type ID and member index of a struct member
using MSLStructMemberKey = uint64_t;
// Special constant used in a MSLResourceBinding desc_set
// element to indicate the bindings for the push constants.
static const uint32_t kPushConstDescSet = ((uint32_t)-1);
// Special constant used in a MSLResourceBinding binding
// element to indicate the bindings for the push constants.
static const uint32_t kPushConstBinding = 0;
// Decompiles SPIR-V to Metal Shading Language
class CompilerMSL : public CompilerGLSL
{
public:
// Options for compiling to Metal Shading Language
struct Options
{
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
typedef enum
{
iOS,
macOS,
} Platform;
Platform platform = macOS;
uint32_t msl_version = make_msl_version(1, 2);
bool enable_point_size_builtin = true;
bool resolve_specialized_array_lengths = true;
bool is_ios()
{
return platform == iOS;
}
bool is_macos()
{
return platform == macOS;
}
void set_msl_version(uint32_t major, uint32_t minor = 0, uint32_t patch = 0)
{
msl_version = make_msl_version(major, minor, patch);
}
bool supports_msl_version(uint32_t major, uint32_t minor = 0, uint32_t patch = 0)
{
return msl_version >= make_msl_version(major, minor, patch);
}
static uint32_t make_msl_version(uint32_t major, uint32_t minor = 0, uint32_t patch = 0)
{
return (major * 10000) + (minor * 100) + patch;
}
};
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
SPIRV_CROSS_DEPRECATED("CompilerMSL::get_options() is obsolete, use get_msl_options() instead.")
const Options &get_options() const
{
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 msl_options;
}
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
const Options &get_msl_options() const
{
return msl_options;
}
SPIRV_CROSS_DEPRECATED("CompilerMSL::set_options() is obsolete, use set_msl_options() instead.")
void set_options(Options &opts)
{
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_options = opts;
}
void set_msl_options(const Options &opts)
{
msl_options = opts;
}
// An enum of SPIR-V functions that are implemented in additional
// source code that is added to the shader if necessary.
enum SPVFuncImpl
{
SPVFuncImplNone,
SPVFuncImplMod,
SPVFuncImplRadians,
SPVFuncImplDegrees,
SPVFuncImplFindILsb,
SPVFuncImplFindSMsb,
SPVFuncImplFindUMsb,
SPVFuncImplArrayCopy,
SPVFuncImplInverse4x4,
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
SPVFuncImplInverse3x3,
SPVFuncImplInverse2x2,
SPVFuncImplRowMajor2x3,
SPVFuncImplRowMajor2x4,
SPVFuncImplRowMajor3x2,
SPVFuncImplRowMajor3x4,
SPVFuncImplRowMajor4x2,
SPVFuncImplRowMajor4x3,
};
// Constructs an instance to compile the SPIR-V code into Metal Shading Language,
// using the configuration parameters, if provided:
// - p_vtx_attrs is an optional list of vertex attribute bindings used to match
// vertex content locations to MSL attributes. If vertex attributes are provided,
// the compiler will set the used_by_shader flag to true in any vertex attribute
// actually used by the MSL code.
// - p_res_bindings is a list of resource bindings to indicate the MSL buffer,
// texture or sampler index to use for a particular SPIR-V description set
// and binding. If resource bindings are provided, the compiler will set the
// used_by_shader flag to true in any resource binding actually used by the MSL code.
CompilerMSL(std::vector<uint32_t> spirv, std::vector<MSLVertexAttr> *p_vtx_attrs = nullptr,
std::vector<MSLResourceBinding> *p_res_bindings = nullptr);
// Alternate constructor avoiding use of std::vectors.
CompilerMSL(const uint32_t *ir, size_t word_count, MSLVertexAttr *p_vtx_attrs = nullptr, size_t vtx_attrs_count = 0,
MSLResourceBinding *p_res_bindings = nullptr, size_t res_bindings_count = 0);
// Compiles the SPIR-V code into Metal Shading Language.
std::string compile() override;
// Compiles the SPIR-V code into Metal Shading Language, overriding configuration parameters.
// Any of the parameters here may be null to indicate that the configuration provided in the
// constructor should be used. They are not declared as optional to avoid a conflict with the
// inherited and overridden zero-parameter compile() function.
std::string compile(std::vector<MSLVertexAttr> *p_vtx_attrs, std::vector<MSLResourceBinding> *p_res_bindings);
// This legacy method is deprecated.
typedef Options MSLConfiguration;
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
SPIRV_CROSS_DEPRECATED("Please use get_msl_options() and set_msl_options() instead.")
std::string compile(MSLConfiguration &msl_cfg, std::vector<MSLVertexAttr> *p_vtx_attrs = nullptr,
std::vector<MSLResourceBinding> *p_res_bindings = nullptr);
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
// Remap a sampler with ID to a constexpr sampler.
// Older iOS targets must use constexpr samplers in certain cases (PCF),
// so a static sampler must be used.
// The sampler will not consume a binding, but be declared in the entry point as a constexpr sampler.
// This can be used on both combined image/samplers (sampler2D) or standalone samplers.
// The remapped sampler must not be an array of samplers.
void remap_constexpr_sampler(uint32_t id, const MSLConstexprSampler &sampler);
protected:
void emit_instruction(const Instruction &instr) override;
void emit_glsl_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args,
uint32_t count) override;
void emit_header() override;
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
void emit_function_prototype(SPIRFunction &func, const Bitset &return_flags) override;
void emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id) override;
void emit_fixup() override;
void emit_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index,
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
const std::string &qualifier = "", uint32_t base_offset = 0) override;
std::string type_to_glsl(const SPIRType &type, uint32_t id = 0) override;
std::string image_type_glsl(const SPIRType &type, uint32_t id = 0) override;
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
std::string sampler_type(const SPIRType &type);
std::string builtin_to_glsl(spv::BuiltIn builtin, spv::StorageClass storage) override;
std::string constant_expression(const SPIRConstant &c) override;
size_t get_declared_struct_member_size(const SPIRType &struct_type, uint32_t index) const override;
std::string to_func_call_arg(uint32_t id) override;
std::string to_name(uint32_t id, bool allow_alias = true) const override;
std::string to_function_name(uint32_t img, const SPIRType &imgtype, bool is_fetch, bool is_gather, bool is_proj,
bool has_array_offsets, bool has_offset, bool has_grad, bool has_dref,
uint32_t lod) override;
std::string to_function_args(uint32_t img, const SPIRType &imgtype, bool is_fetch, bool is_gather, bool is_proj,
uint32_t coord, uint32_t coord_components, uint32_t dref, uint32_t grad_x,
uint32_t grad_y, uint32_t lod, uint32_t coffset, uint32_t offset, uint32_t bias,
uint32_t comp, uint32_t sample, bool *p_forward) override;
std::string unpack_expression_type(std::string expr_str, const SPIRType &type) override;
std::string bitcast_glsl_op(const SPIRType &result_type, const SPIRType &argument_type) override;
bool skip_argument(uint32_t id) const override;
std::string to_qualifiers_glsl(uint32_t id) override;
void replace_illegal_names() override;
void declare_undefined_values() override;
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
void declare_constant_arrays();
bool is_non_native_row_major_matrix(uint32_t id) override;
bool member_is_non_native_row_major_matrix(const SPIRType &type, uint32_t index) override;
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
std::string convert_row_major_matrix(std::string exp_str, const SPIRType &exp_type, bool is_packed) override;
void preprocess_op_codes();
void localize_global_variables();
void extract_global_variables_from_functions();
void resolve_specialized_array_lengths();
void mark_packable_structs();
void mark_as_packable(SPIRType &type);
std::unordered_map<uint32_t, std::set<uint32_t>> function_global_vars;
void extract_global_variables_from_function(uint32_t func_id, std::set<uint32_t> &added_arg_ids,
std::unordered_set<uint32_t> &global_var_ids,
std::unordered_set<uint32_t> &processed_func_ids);
uint32_t add_interface_block(spv::StorageClass storage);
void mark_location_as_used_by_shader(uint32_t location, spv::StorageClass storage);
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
uint32_t ensure_correct_builtin_type(uint32_t type_id, spv::BuiltIn builtin);
void emit_custom_functions();
void emit_resources();
void emit_specialization_constants();
void emit_interface_block(uint32_t ib_var_id);
bool maybe_emit_input_struct_assignment(uint32_t id_lhs, uint32_t id_rhs);
bool maybe_emit_array_assignment(uint32_t id_lhs, uint32_t id_rhs);
void add_convert_row_major_matrix_function(uint32_t cols, uint32_t rows);
std::string func_type_decl(SPIRType &type);
std::string entry_point_args(bool append_comma);
std::string to_qualified_member_name(const SPIRType &type, uint32_t index);
std::string ensure_valid_name(std::string name, std::string pfx);
std::string to_sampler_expression(uint32_t id);
std::string builtin_qualifier(spv::BuiltIn builtin);
std::string builtin_type_decl(spv::BuiltIn builtin);
std::string built_in_func_arg(spv::BuiltIn builtin, bool prefix_comma);
std::string member_attribute_qualifier(const SPIRType &type, uint32_t index);
std::string argument_decl(const SPIRFunction::Parameter &arg);
std::string round_fp_tex_coords(std::string tex_coords, bool coord_is_fp);
uint32_t get_metal_resource_index(SPIRVariable &var, SPIRType::BaseType basetype);
uint32_t get_ordered_member_location(uint32_t type_id, uint32_t index);
size_t get_declared_struct_member_alignment(const SPIRType &struct_type, uint32_t index) const;
std::string to_component_argument(uint32_t id);
void align_struct(SPIRType &ib_type);
bool is_member_packable(SPIRType &ib_type, uint32_t index);
MSLStructMemberKey get_struct_member_key(uint32_t type_id, uint32_t index);
std::string get_argument_address_space(const SPIRVariable &argument);
void emit_atomic_func_op(uint32_t result_type, uint32_t result_id, const char *op, uint32_t mem_order_1,
uint32_t mem_order_2, bool has_mem_order_2, uint32_t op0, uint32_t op1 = 0,
bool op1_is_pointer = false, uint32_t op2 = 0);
const char *get_memory_order(uint32_t spv_mem_sem);
void add_pragma_line(const std::string &line);
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
void add_typedef_line(const std::string &line);
void emit_barrier(uint32_t id_exe_scope, uint32_t id_mem_scope, uint32_t id_mem_sem);
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
void emit_array_copy(const std::string &lhs, uint32_t rhs_id) override;
void build_implicit_builtins();
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
void emit_entry_point_declarations() override;
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
uint32_t builtin_frag_coord_id = 0;
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
Options msl_options;
std::set<SPVFuncImpl> spv_function_implementations;
std::unordered_map<uint32_t, MSLVertexAttr *> vtx_attrs_by_location;
std::unordered_map<MSLStructMemberKey, uint32_t> struct_member_padding;
std::set<std::string> pragma_lines;
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
std::set<std::string> typedef_lines;
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
std::vector<uint32_t> vars_needing_early_declaration;
std::vector<MSLResourceBinding *> resource_bindings;
MSLResourceBinding next_metal_resource_index;
uint32_t stage_in_var_id = 0;
uint32_t stage_out_var_id = 0;
uint32_t stage_uniforms_var_id = 0;
bool needs_vertex_idx_arg = false;
bool needs_instance_idx_arg = false;
std::string qual_pos_var_name;
std::string stage_in_var_name = "in";
std::string stage_out_var_name = "out";
std::string stage_uniform_var_name = "uniforms";
std::string sampler_name_suffix = "Smplr";
spv::Op previous_instruction_opcode = spv::OpNop;
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
std::unordered_map<uint32_t, MSLConstexprSampler> constexpr_samplers;
// OpcodeHandler that handles several MSL preprocessing operations.
struct OpCodePreprocessor : OpcodeHandler
{
OpCodePreprocessor(CompilerMSL &compiler_)
: compiler(compiler_)
{
}
bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override;
CompilerMSL::SPVFuncImpl get_spv_func_impl(spv::Op opcode, const uint32_t *args);
CompilerMSL &compiler;
std::unordered_map<uint32_t, uint32_t> result_types;
bool suppress_missing_prototypes = false;
bool uses_atomics = false;
};
// Sorts the members of a SPIRType and associated Meta info based on a settable sorting
// aspect, which defines which aspect of the struct members will be used to sort them.
// Regardless of the sorting aspect, built-in members always appear at the end of the struct.
struct MemberSorter
{
enum SortAspect
{
Location,
LocationReverse,
Offset,
OffsetThenLocationReverse,
Alphabetical
};
void sort();
bool operator()(uint32_t mbr_idx1, uint32_t mbr_idx2);
MemberSorter(SPIRType &t, Meta &m, SortAspect sa);
SPIRType &type;
Meta &meta;
SortAspect sort_aspect;
};
};
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
} // namespace spirv_cross
#endif