Pull latest SPIRV-Cross, fixing Metal shader compilation (#14850)

* Squashed 'deps/SPIRV-Cross/' changes from 2820ab0b51..49e4117c5f

49e4117c5f Updates for main branch rename.
88c6b49959 Merge pull request #2085 from KhronosGroup/fix-2075
a085227395 Merge pull request #2084 from KhronosGroup/fix-2069
1047c13d40 GLSL: Handle textureGatherOffsets properly.
f84527346d GLSL: Declare gl_in/gl_out as array more robustly.
38cd214007 Merge pull request #2083 from KhronosGroup/pr-2080
d46c10ebd3 Refactor PHI checks into block_is_noop instead.
bcbe33ad11 Also consider NonSemantic ExtInst in block_is_noop.
9d8ef6b36c Update test for updated block_is_noop check.
a61a541e1c Merge branch 'accept_noop' of https://github.com/loic-sharma/SPIRV-Cross into pr-2080
457fd3db70 Add tests for loops compiled with debug semantics.
07a629f149 Roll dependencies.
d69a2cafe5 Accept no ops
cded61dde3 Merge pull request #2076 from billhollings/ios-tier2-writable-images
284ccf5d2d Fixes from code review of adding writable images to iOS Tier2 argument buffers.
0bb28ef88a Merge pull request #2078 from KhronosGroup/fix-2072
549cde7fae Fix GCC5 build.
cc2b3b61a6 Merge pull request #2077 from EpicGames/fixes_glsl
6371580f51 Fixed typo in CompilerGLSL::should_dereference()
643b7be196 MSL: Add support for writable images in iOS Tier2 argument buffers.
a89dea3c49 Merge pull request #2071 from KhronosGroup/fix-2068
baf38f0593 Merge pull request #2070 from KhronosGroup/fix-2066
68a012a4f2 CFG: Handle implied access to opaque loaded values.
03b1f66ef1 GLSL: Fix row-major workaround wrapper for ES.
3c997e12eb Add C API option for enable row major workaround.
c77b09b57c Merge pull request #2063 from KhronosGroup/fix-2060
451ed10e91 Merge pull request #2062 from cdavis5e/msl-spirv-assembly-fixes
df76a14056 MSL: Refactor member reference in terms of one boolean.
e75c496ec6 Fix MSL Access Chain
540a1e82c6 Merge pull request #2056 from cdavis5e/msl-discarded-frag-checks
061cdd2052 MSL: Don't dereference forwarded copies of `OpVariable` pointers.
5547b25afe Interleave undef values with constants and types.
06ef3de002 GLSL, MSL: Handle `OpUndef` as part of a constant composite.
aa5a8c482e MSL: Prevent stores to storage resources in discarded fragments.
51d2dfe02a MSL: Add missing casts to `Op?MulExtended`.
c7ce92a95b MSL: Manually update `BuiltInHelperInvocation` when a fragment is discarded.
edd66a2fc9 Merge pull request #2055 from KhronosGroup/fix-2053
e8a22a7cf6 Handle ShaderDebugInfo non-semantic extension.
abc31207bf Merge pull request #2052 from KhronosGroup/hlsl-mesh-shader-ext
b606e4f752 HLSL: Fix test for non-block per-primitive IO.
ebf779dcfb HLSL: Do not support ClipCull size > 4 in mesh shaders.
94160e8890 GLSL: Add test for mesh with non-block builtin IO.
3a066cd733 HLSL: Handle case where PerVertex block is not used.
f5ef0a74fb HLSL: Make sure to test deeply nested functions in mesh shaders.
e418266d25 HLSL: Some cleanups and fixes in analyze_meshlet_writes.
892f65b3a6 HLSL: Fix some warnings from review.
a4d5c0c4a5 HLSL: Fix-up some style issues from review.
10f55a11eb HLSL: Add missing reference for mesh shader test.
322f1b9fb3 Fixup glslang reference.
80146a20da HLSL: Implement VK_EXT_mesh_shader
744279ec78 Merge pull request #2050 from cdavis5e/op-spec-constant-op-composite-insert
8cf99e7d44 MSL: Implement `CompositeInsert` `OpSpecConstantOp`.
3cecac74c6 Merge pull request #2051 from KhronosGroup/roll-glslang-dep
605bce39d7 Roll glslang dependency.
677299cc56 Merge pull request #2049 from KhronosGroup/fix-2046
4de9d6c2b6 MSL: Handle implicit integer promotion rules.
c813d8d67b Merge pull request #2044 from KhronosGroup/fix-2038
2a49f7e82d MSL: Fix restrict vs __restrict incompatibility.
3ea057a303 Merge pull request #2045 from KhronosGroup/fix-2037
0851baf9ee Merge pull request #2043 from KhronosGroup/fix-2040
47c7fc16eb HLSL: Add option to bind vertex input smemantics by name.
04af769e85 MSL: Handle partial access chains with array-of-UBO/SSBO.
5763919669 Merge pull request #2039 from cdavis5e/raw-buffer-tess-input
e698633e22 MSL: Account for composite types when assigning locations.
0b679334e4 MSL: Don't flatten arrayed per-patch output blocks in tessellation shaders.
a171087180 MSL: Support "raw" buffer input in tessellation evaluation shaders.
f09ba27777 Merge pull request #2035 from KhronosGroup/fix-2032
f15d465a52 Merge pull request #2034 from KhronosGroup/fix-2028
799d8c9e35 Merge pull request #2033 from KhronosGroup/fix-2029
b5386e3ea9 HLSL: Improve support for VertexInfo aux struct.
4ecdb24e59 MSL: Expose way to query if a buffer needs array length.
f3b1375b13 Add reflection support for shader record buffers.
c821207ae2 Merge pull request #2027 from billhollings/msl-opstore-addr-space-cast
0a1127aa50 MSL: Emit correct address space when casting during OpStore.
81ba8f78f6 Merge pull request #2025 from KhronosGroup/fix-2009
291def0793 MSL: Add more keywords to reserved set.
a7f64a8b90 MSL: Report unsupported 64-bit atomics.
ddaa2da629 Merge pull request #2024 from KhronosGroup/msl-descriptor-aliasing
a915e0bd4b MSL: Do not attempt to alias push constants.
adf0995bb9 Merge pull request #2023 from KhronosGroup/msl-descriptor-aliasing
24dc49e692 MSL: Handle descriptor aliasing of raw buffer descriptors.
1ad6006130 Merge pull request #2021 from siegelaaron94/opengles_texture1d_textureSize
7b4c470f16 GLSL: Account for ES sampler1D to sampler2D promotion in textureSize.
6d3518e238 Merge pull request #2018 from atyuwen/master
7afbbb624a Merge pull request #2019 from billhollings/msl-OpPtrEqual-OpPtrNotEqual-OppPtrDiff
5493b3030e MSL: Support OpPtrEqual, OpPtrNotEqual, and OpPtrDiff.
1b9296e1a5 MSL: only fix up gl_FragCoord if really necessary.
f6ca617825 Merge pull request #2017 from KhronosGroup/roll-deps
a5a7999666 Update mesh/task test references.
d7a6861f64 Update glslang/spirv-tools.
1e7e9fc32b Merge pull request #2015 from FrankXie05/vcpkg-instructions
8553588895 Merge pull request #2014 from cdavis5e/msl-shader-output-fixup
064eaebe72 MSL: Add a mechanism to fix up shader outputs.
d206e54ece Add vcpkg installation instructions
210a800130 Merge pull request #2012 from KhronosGroup/mesh-shaders
4c345166dc GLSL: Implement task shaders.
5762617729 GLSL: Implement GL_EXT_mesh_shader.
6a73e68d30 Update glslang reference.
ec7b9b0ce7 Update SPIR-V headers.
9fcf62784b Merge pull request #2011 from KhronosGroup/roll-deps
d24f41f1d5 Update dependencies.
c93ee9261e Merge pull request #2005 from atyuwen/master
f40dba4919 GLSL: added an option to disable row-major-load workaround.
10f2aa77da Skip remapped vars in 'fixup_reserved_names'
9afa82e7b8 GLSL: disable row major load around on GLES.
33e19e86bf Don't rename remapped variables like 'gl_LastFragDepthARM'
61c603f3ba Merge pull request #1996 from KhronosGroup/fix-1993
bc3987e59a MSL: Fix various bugs with Ptr/U bitcasts.
c084973c67 Merge pull request #1995 from KhronosGroup/fix-1992
05bbcc2d09 Do not optimize OpCompositeInsert for hoisted temporaries.
a725d8fad1 Fix minor style nit from review.
1bc05ef735 Merge branch 'master' of https://github.com/gpx1000/SPIRV-Cross
a9cadd4982 Merged in cts-shared-composite-variables (pull request #1)
fc4a12fd4f MSL: Use a wrapper type for matrices in workgroup storage.
faea931de3 MSL: Also replace `bool` with `short` in structures.
0cccd0a65a Merge pull request #1986 from KhronosGroup/fix-1975
4dfac510ed Handle multiple breaks out of switches.
c24d5a7b90 Merge pull request #1985 from KhronosGroup/fix-1973
8ba0820c9d Merge pull request #1984 from KhronosGroup/fix-1972
095e9e5cee Merge pull request #1982 from RandomShaper/hlsl_subgroup_scan
be904dcc1e Handle collapsed loops similar to collapsed selections.
f7e98c39db Avoid detection of false loop variables.
cb4e310f43 Merge pull request #1983 from KhronosGroup/fix-1979
1fe470b199 HLSL: Implement GroupOperation(Inclusive/Exclusive)Scan.
06ca9accd7 HLSL: Add option to emit entry point name 1:1 instead of main().
d8d051381f Merge pull request #1970 from KhronosGroup/fix-1969
963fdfdf68 Handle PHI in collapsed switch constructs.
f46745095d Merge pull request #1965 from billhollings/msl-physical_storage_buffer
064a697b18 MSL: Fix implicit conversion precision build error.
4185acc70d MSL: Fixes from review for SPV_KHR_physical_storage_buffer extension.
78eb5043f9 MSL: Fixes from review for SPV_KHR_physical_storage_buffer extension.
e6925974d1 Merge pull request #1966 from fred-wang/macos-snprintf
9c44a97faa address more review comments
1310f5ba4d Keep using sprintf on windows.
99f8613847 Fix compilation errors with deprecated sprintf function
ba3e6ffe03 Merge pull request #1964 from sergmister/patch-1
52c7c2dab6 MSL: Add support for SPV_KHR_physical_storage_buffer extension.
1bba4d5137 Fix typo
99b59b3528 Merge pull request #1963 from KhronosGroup/convert-u-to-rtas-fix
e08e0cf28d GLSL: Handle forced temporary OpConvertUToAccelerationStructureKHR.
89b1c24bdc Merge pull request #1961 from RandomShaper/hlsl_more_bitcasts
d8c5e39436 HLSL: Implement bit casts between Half and UShort.
197a273fd4 Merge pull request #1959 from KhronosGroup/fix-1955-1956
df21a99d1a GLSL: Add more extension ladder fallbacks for unusual integer sizes.
a97bbc24c5 Merge pull request #1958 from KhronosGroup/fix-1957
cdafafe93b Merge pull request #1954 from vkaytsanov/patch-1
533aab00b6 GLSL: Add missing KHR barycentric references.
46e4b5a3c8 Fix control flow bug where we missed continue;
612de70b38 Fix missing function in README sample
50b4d5389b Merge pull request #1953 from KhronosGroup/bary-khr
e45d01c41f Emit KHR barycentrics if source enables the KHR extension.
0aedc7d128 Roll dependencies.
af223101c6 Merge pull request #1952 from KhronosGroup/fix-1944
c8ab790163 Merge pull request #1951 from KhronosGroup/fix-1950
88e583d062 GLSL: Add basic support for GL_EXT_shader_atomic_float.
1c88730e12 GLSL: Implement 1D texture emulation for ES.
3f855646f0 Merge pull request #1948 from iwubcode/gl_layer_hlsl
a6976d596a HLSL: fix BuiltInLayer to emit semantic 'SV_RenderTargetArrayIndex' instead of 'SV_RenderTargetIndex'
b3ff97d0fe Merge pull request #1946 from KhronosGroup/fix-1943
48d50fa911 Merge pull request #1945 from KhronosGroup/fix-1938
d08ce828f4 Promote Unreachable cases into break to avoid fallthrough.
4b9e60273c Add tests for OpCompositeInsert edge cases.
23662668dd Attempt more optimal codegen for OpCompositeInsert.
d0c8dc3045 Merge pull request #1942 from KhronosGroup/no-fetch-grad-workaround
a3c4177324 GLSL: Don't apply Grad LOD workarounds for fetch.
bfefb5f511 Merge pull request #1941 from KhronosGroup/fix-1934
832d469048 Merge pull request #1940 from KhronosGroup/fix-1935
05206005ca MSL: Potentially cast loaded Input variables.
92164d38d1 GLSL: Do not analyze precision for Undef variables.
940efca099 Merge pull request #1936 from KhronosGroup/rt-stage-cli
0b303aab16 Add --stage handling for ray tracing.
0c8a79b0b5 Merge pull request #1932 from KhronosGroup/fix-1868
7eb5ced2a0 Refactor out query for operation type/result IDs.
7a6c2da9aa GLSL: Handle more proper semantics for RelaxedPrecision.
d28136cc7a GLSL: Clean up some ways of querying decoration flags.
a9d23d7652 Merge pull request #1931 from EpicGames/fixes_hlsl
65431446f4 HLSL: Add missing BuiltInLayer to HLSL backend.
6ae7ddb92a Merge pull request #1930 from KhronosGroup/fix-1928
960edcd396 Merge pull request #1929 from KhronosGroup/fix-1925
10a7631d50 HLSL: Add more comprehensible reserved identifier list.
40b3053b4c Handle early reads from loop variables with initializers.
c52333b984 Merge pull request #1924 from stefalie/master
ee4ac5c2ce Merge pull request #1927 from billhollings/msl-interface-block-array-length-1
3bca246ad2 MSL: Emit interface block members of array length 1 as arrays instead of scalars.
089cf27119 remove newline at eof
56fd17f552 add qualifiers to reference reflect json output
05c9a14422 cli: display missing memory qualifiers for reflect and dump-resources
d7cae5e7cd Merge pull request #1917 from KhronosGroup/fix-1906
0500f9ed5d Merge pull request #1916 from KhronosGroup/fix-1910
d2a4f9842b GLSL: Support GL_EXT_debug_printf.
5b18fb1bcd MSL: Pass down global RayQuery object to leaf functions.
779138f39f Merge pull request #1914 from RandomShaper/hlsl_view_index
2ea1c9b642 HLSL: Implement ViewIndex.
6a67891418 Merge pull request #1909 from skkkksdkfak/primitive_id
54c00b69a4 Translate gl_PrimitiveID to SV_PrimitiveID.
0d4ce028bf Merge pull request #1903 from KhronosGroup/fix-1900
17c52990d5 MSL: Fix goofy bugs in ray query.
a3996eccf3 Merge pull request #1896 from Roy-AMD/fix-condition-issue
749be80389 Use types have same widths in loop condition.
44691aa975 Merge pull request #1899 from billhollings/forward-volatile-vars-except-builtins
85f98eb0c5 Allow volatile vars that are not builtins to be forwarded.
d000b9e71c Merge pull request #1898 from KhronosGroup/pr-1859
191c57b6cc Merge pull request #1897 from KhronosGroup/fix-1763
a7eefbc114 HLSL: Disable FXC testing for rayquery shaders.
cd209ff46d HLSL: Update test from review.
c95338e03e Merge branch 'ray_query' of https://github.com/k-payl/SPIRV-Cross into pr-1859
7b9eaf0b5e MSL: Handle awkward mix and match of Offset / ArrayStride in constants.
251361bd6f VK_KHR_ray_query implementation
565db34cba Merge pull request #1892 from KhronosGroup/meta-lookup-cleanup
39bad2c1f9 Avoid redundant meta lookups in ParsedIR when setting member decorations.
d5c3bd8b5e Merge pull request #1890 from KhronosGroup/fix-1889
4ab5bbb4e5 Fixup names of anonymous inner structs.
0b51794f01 Merge pull request #1888 from KhronosGroup/msl-ib-variable-name-alias-fix
1ec9d018fd MSL: Handle aliased variable names for resources placed in IB struct.
213c5f42ea MSL: Fix minor nits.
4ec1fb0aa9 Merge pull request #1887 from billhollings/msl-use-var-name-for-flattened-interface-struct-members
0c0fd98322 MSL: Use var name instead of var-type name for flattened interface members.
3915c37bb1 Merge branch 'fixup_gl_helper_invocation' of https://github.com/RandomShaper/SPIRV-Cross
c4f9e4fde9 HLSL: Fix Helper Invocation wrongly allowed in compute.
a1803778c2 Merge pull request #1885 from KhronosGroup/helper-invocation-rework
b192b8887a MSL: Consider that gl_IsHelperInvocation can be Volatile.
15d29f00e2 Add test for SPIR-V 1.6 Volatile HelperInvocation.
93b0dc7718 Consider Volatile in should_forward().
476b6541fa Remove forwardable bit in SPIRVariable.
5d9fc2d903 HLSL: Add test for HelperInvocation.
005c14ad6a HLSL: Implement HelperInvocationEXT.
75224c6c7c Merge branch 'gl_helper_invocation' of https://github.com/RandomShaper/SPIRV-Cross
278a4c80ed HLSL: Add support for gl_HelperInvocation
6c7a40822f Merge pull request #1881 from KhronosGroup/relax-nan-checks
31be74a853 Add relax_nan_checks options.
b91ecf6077 Merge pull request #1880 from KhronosGroup/fix-1879
2ce1e5c140 Merge pull request #1878 from mysterymath/move
dc62cc792b Handle OpTerminateInvocation.
2a7f436135 Merge branch 'msl-add-nested-structs-to-io-blocks-squash'
7b594c125e Fix formatting nits from review.
bb4ced0280 MSL: Document clarification of location incrementing.
02d588b7e4 MSL: Fix var names in test shaders to avoid reserved identifiers.
3bb3b22b34 MSL: Non-functional fixes from PR code review.
3d4daab29d MSL: Support input/output blocks containing nested struct arrays
44c3333a1c Qualify std::move.
d16183d1d2 Merge pull request #1873 from KhronosGroup/fix-1861
02440e85cf Merge pull request #1872 from KhronosGroup/fix-1867
7af0a5f820 HLSL: Do not emit VPOS fixup unless position is active.
5555f2784b MSL: Refactor and fix use of quadgroup vs simdgroup.
a569680406 Merge pull request #1870 from abrachet/master
0eda71c409 Qualify move as std::move
c08ee860c8 Merge pull request #1869 from xndcn/msl
1b5c406a3d MSL: append entry point args to local variable names to avoid conflicts
188dc8b13c Merge pull request #1862 from flokart-world/feature/flatten-ubo-for-hlsl
64e058aa9b Merge pull request #1863 from KhronosGroup/various-fixes
ed4ded040e HLSL: Make --flatten-ubo work correctly
a56b22bf4e Add more scenarios where we can guarantee forward progress.
c716a9a5dd Add debug option to modify maximum number of compile iterations.
29cc18988c Fix regression from adding 64-bit switch support.
339e61a0e0 Do not emit hoisted access chain temporaries unless backend supports it.
5d9a95370f GLSL: Ensure correct signed integer type for more texture functions.
131278458e Merge pull request #1860 from KhronosGroup/docs-update
a8016a6470 Update documentation for descriptor set support in MSL/HLSL.
1a36968e5d [Spirv_msl] Fix normalize on half3/half2 (#1856)
53d94a982e Merge pull request #1852 from KhronosGroup/fix-1850
5a29181b35 Merge pull request #1851 from KhronosGroup/fix-1835
5b952d2cbf MSL: Rethink how opaque descriptors are passed to leaf functions.
ac46140ba3 Test aliased names in declared LUTs.
48b5a9069f Handle aliased names in spec constants.
08d5f5ed18 Merge pull request #1849 from KhronosGroup/fix-1844
9b25581d49 MSL: Handle constant construct of block-like array types.
79b13813c6 Merge pull request #1848 from KhronosGroup/fix-1843
5a5be7f9b9 MSL: Handle signed atomic min/max.
7dd974b9db Merge pull request #1847 from KhronosGroup/fix-1775
e940577fba Merge pull request #1846 from KhronosGroup/fix-1760
1d13a3e36a Rework how loop iteration counts are validated.
ef6bde6580 Do not forward expressions which carry a huge amount of dependencies.
a1bb29ccbb Merge pull request #1845 from KhronosGroup/pr-1842-fix
017cdfe25b Update references for GL_EXT_texture_buffer.
4407c0dd14 fix: GL_EXT_texture_buffer is more common than GL_OES_texture_buffer
fe5a0aa72f Merge pull request #1839 from KhronosGroup/spv1.6
e8b30cc31d Merge pull request #1838 from KhronosGroup/fix-1811
7c12228359 Add sanity test for SPIR-V 1.6 modules.
7c83fc22fa Add support for LocalSizeId.
35bb328443 Test: Add --allow-localsizeid flag for spirv-val.
eadca962c8 Merge pull request #1837 from KhronosGroup/roll-deps
a10d72e3b1 Merge pull request #1834 from chirsz-ever/chirsz/fix-msl-copy-array
fe8848a6f2 Roll dependencies.
9c0b74f73b Merge pull request #1836 from KhronosGroup/pr-1824-fixup
be333e0cab MSL: Move float2->3 TessCoord fixup to a better location.
2793d22af5 Merge branch 'master' of git://github.com/cfnptr/SPIRV-Cross
e0ae55d5e2 Merge pull request #1822 from etra0/add-diff
55a0291ce5 Merge pull request #1817 from etra0/fix-1784
90c252274d MSL: Allow copy array from UniformConstant storage
2acf0e73dd Fix gl_TessCoord arguments presence. Update reference shaders.
a66984072b Fix incorrect MSL gl_TessCoord variable type
2bb051206b test_shaders: Add the option to generate diff instead.
905b8244e7 Clamp vector element access to vector size.
e9cc640334 Merge pull request #1815 from etra0/fix-1768
25868923da Merge pull request #1819 from sindney/master
6d8302ef14 MSL: Add 64 bit switch support
4b0584ce70 ESSL: Vertex shader input doesn't support array types.
37dfb3f45f Merge pull request #1794 from etra0/master
5345051a85 Removed tracking of OpConstant and OpPhi.
7c3cb0b12c Merge pull request #1810 from billhollings/early-frag-tests-depth-out
248e9ae9ed MSL: Don't output depth and stencil values with explicit early fragment tests.
75e3752273 Added block.cases_32bit and reworked the cases fix
401296d3b8 Merge pull request #1808 from billhollings/depth-img-vs-depth-cmp
03f678dec4 Cast the switch selector in GLSL to uint32_t
fd252b21ff Separate (partially) the tracking of depth images from depth compare ops.
48046646ee Fixed wrong condition and formatting.
2e0fb3a778 Merge pull request #1807 from KhronosGroup/fix-1801
f1b411c9e8 GLSL: Deal with buffer_reference_align.
1adc53b107 Merge pull request #1806 from KhronosGroup/fix-1777
21a15b90e5 Merge pull request #1804 from KhronosGroup/fix-1759
2714f5410c CFG: Handle degenerate selection constructs.
e40d19bdbf MSL: Handle non-thread storage class in Modf/Frexp pointer versions.
f1d4aff85e Merge pull request #1805 from KhronosGroup/fix-1776
2c53d30664 Merge pull request #1803 from KhronosGroup/fix-1802
4561ecddbd Handle Modf/Frexp in more cases.
d295c2a046 Merge pull request #1800 from EddeDev/master
849978653a Merge pull request #1798 from billhollings/tess-output-clip
05e8e5a953 Correctly reflect declared buffer size for out of order members.
4dcf64a99b Fixed potential compilation error in spirv_cross_containers.hpp
250a02967d Removed unnecessary tracking of types.
4ebd56bf9e MSL: Correctly emit user(clip/cullN) for clip/cull builtins in tess output struct.
f099d714f3 Removing logic in the parser
04293e03fd Merge pull request #1797 from KhronosGroup/clone-protocol
0d03516382 Always use https protocol when cloning external test deps.
061397e32e Merge pull request #1792 from billhollings/uniform-struct-packing-nested
3eb5532979 Add 64 bit support for OpSwitch
be812c45e5 MSL: Remove over-zealous check for struct packing compatibility.
66adba17a8 Merge pull request #1791 from billhollings/msl-out-of-order-struct-offsets
76cb807c19 MSL: Fix type redirection when struct members are reordered to align with offsets.
29632959d2 Merge pull request #1787 from KhronosGroup/fix-1786
edf247fb1c MSL: Workaround compiler crashes when using threadgroup bool.
43eecb2360 SPIRV-Cross contribution needed for `INTEL_fragment_shader_ordering`
94dea2507e Merge pull request #1769 from audulus/spm2
f5219f47c3 Add Package.swift.
2a56c2bc04 Merge pull request #1783 from billhollings/more-unpacked-vectors
ab640bc3d3 Merge pull request #1782 from KhronosGroup/fix-1781
974a0818b8 MSL: Support more usecases for unpacked vectors.
2b5e17eca5 MSL: Never used templated array for RayQuery objects.
bc338710e1 MSL: Remove some redundant breaks.
5afb3d313f MSL: Fix some trivial bugs not caught by CI when adding ray query.
345a7d171c Merge pull request #1773 from congyue1977/master
2895a43274 Fix unsupported exceptions for ConvertUToAccelerationStructure & BindingTableRecordOffset.
d52ec1e196 Fix all requested changes, test_shaders.py supports compiling MSL 2.4 shaders, and the Intersection Query currently only supports MSL 2.4 on the iOS platform.
6d13c99273 Merge pull request #1780 from billhollings/out-of-bounds-swizzle-fix
595eb0c21d Per spec, support undefined behavior for out-of-bounds swizzles.
597f29d09d Support Metal 2.4 Intersection Query, Implement GL_EXT_ray_query.
e4243b898c Merge pull request #1766 from KhronosGroup/fix-1765
6382f15470 Test behavior around OpSelect with matrices.
6071df5840 Fix wrong detection of trivial_mix_op.
97a438d214 Merge pull request #1757 from KhronosGroup/fix-1754
f72bb3c6f5 Improve handling of INT_MIN/INT64_MIN literals.
457c00bd07 Merge pull request #1756 from KhronosGroup/fix-1753
91c25e8473 Merge pull request #1755 from KhronosGroup/fix-1751
9b2a8c7622 HLSL: Ensure synthetic NumWorkgroups variable is considered active.
bb04156d3c CLI/HLSL: Don't set explicit binding for synthesized NumWorkgroups CBV.
96d95fbb31 MSVC: Workaround crtdbg macroing free().
9462b90067 Merge pull request #1752 from billhollings/function-constants-opquantize
325f107c5b Merge pull request #1745 from billhollings/location-component-vecsize
ec054dad7f MSL: Support synthetic functions in function constants.
dee35bf3ce Merge pull request #1749 from billhollings/fastmath-quantize
ba66a91402 MSL: Use vec<T, n> in template SpvHalfTypeSelector for function spvQuantizeToF16().
a2671e35b0 MSL: Consolidate spvQuantizeToF16() functions into a single template function.
5742047b24 MSL: Honor infinities in OpQuantizeToF16 when compiling using fast-math.
05ac99ae23 Merge pull request #1748 from billhollings/fastmath-nocontraction
fb3defc9ef MSL: Honor DecorationNoContraction when compiling using fast-math.
548a23da34 MSL: Track location component to match vecsize between shader stages.
fe1af2ae72 Merge pull request #1747 from KhronosGroup/ci-fix
d579444a82 Merge pull request #1744 from billhollings/location-attribute-fix
6628e10fc6 Merge pull request #1746 from billhollings/fast-math-per-vulkan
3ca99bbbcc Remove tests for Ubuntu 16.04.
0f12557695 Remove obsolete Travis CI YML.
40141ffddf MSL: Selectively enable fast-math in MSL code to match Vulkan CTS results.
86dfac12c8 MSL: Fix location and component variable matching between shader stages.
b81334a513 Merge pull request #1738 from billhollings/return-value-after-discard-terminator
2a150f5a2f MSL: Add explanatory comment requested in PR review.
35e92e6ffb MSL: Return fragment function value even when last SPIR-V Op is discard (OpKill).
c2500e504d Merge pull request #1735 from billhollings/add-const-op-exprs
472f9d4f6d Add tests for OpSpecConstantOp ops OpQuantizeToF16 and OpSRem.
5fb1ca4f0d Add support for additional ops in OpSpecConstantOp.
51d8e7be94 Merge pull request #1734 from KhronosGroup/buffer-reference-uvec2
b8f1e71907 GLSL: Emit GL_EXT_buffer_reference_uvec2 as required.
d6fe75df10 Merge pull request #1732 from KhronosGroup/fix-1731
23c4480d8e Fix switch fallthrough case in some cases.
0e2880ab99 Merge pull request #1729 from KhronosGroup/fix-1726
2eea6a579b MSL: Consider that function/private variables can be block-like.
840d4483bc Merge pull request #1728 from KhronosGroup/fix-1727
5b0cafb416 Track temporary access for OpArrayLength result.
c062b6b852 Merge pull request #1725 from billhollings/fix-duplicate-glposition
fad1590786 Merge pull request #1722 from billhollings/row-maj-mtx-store-from-const
27e7abeab1 Merge pull request #1724 from billhollings/msl-const-expr-casting
e76fcf9309 MSL: Add test for fixes to MSL constant expression type down-casting.
3105e82b2e MSL: Fix duplicate gl_Position outputs when gl_Position defined but unused.
a75fe07546 MSL: Fix casting in constant expressions with different sizes.
9552ca5473 MSL: Support row-major transpose when storing matrix from constant RHS matrix.
bab4e5911b Merge pull request #1716 from KhronosGroup/terminator-access-fix
cb613eb675 Handle value access in terminators.
1964799fba Merge pull request #1715 from KhronosGroup/precise-fp16-fp64
ac11a91792 GLSL: Emit precise for fp16/fp64 types as well.
cd22336a38 Merge pull request #1712 from cdavis5e/msl-subgroup-ballot-simplify
03ad13bae6 MSL: Simplify spvSubgroupBallot().
18f3cd6810 GLSL: Ensure ray query object decls are flushed if allocated in Function.
e51630595f Merge pull request #1711 from KhronosGroup/fix-1690
5b227cc57c GLSL: Implement GL_EXT_ray_query.
6196e3b029 MSL: Remove redundant path for SampleMask.
2fcbef398c Merge pull request #1709 from billhollings/fix-sample-mask-in
fe08bf4af4 Remove EXPERIMENTAL from JSON reflection backend.
ebb5098def MSL: Adjust gl_SampleMaskIn for sample-shading and/or fixed sample mask.
be3988b13c Merge pull request #1706 from SpaceIm/fix/ios-bundle
a70ce5192e Merge pull request #1708 from KhronosGroup/fix-interpolant-access-chain
71b83a18f4 MSL: Add test for scalar access chain pull interpolant.
d42c0b2e08 Merge pull request #1707 from billhollings/fix-interpolant-access-chain
3e04eee491 MSL: Fix setting SPIRVCrossDecorationInterpolantComponentExpr decoration.
d74eaabde0 fix cross-build to iOS/tvOS/watchOS
1ae2b58f19 Merge pull request #1700 from pkasting/master
bf746bd680 Merge pull request #1699 from KhronosGroup/pervertexnv
7cdab07efe Fix -Wunreachable-code-aggressive.
206ee8f171 GLSL: Support pervertexNV in NV barycentric extension.
c5b8022e61 Merge pull request #1669 from KhronosGroup/1560-reuse1
54882ad16d Add GLSL.std.450.h to REUSE.
3781d49d7c .gitignore ignored new license text
c862f8d22d Actually checkout repo into new reuse job
f2a65545b8 Finish adding SPDX tags and setup a reuse checked in Github Actions CI
2ceca64004 Add missing copyright headers.
853e84e8bf Merge pull request #1698 from KhronosGroup/fix-1691
d6b29ab017 HLSL: Rewrite how block IO is emitted.
9338996f3b Merge pull request #1697 from KhronosGroup/fix-1693
3149095585 Merge pull request #1696 from KhronosGroup/fix-1694
d75666b170 GLSL: Emit num_views for OVR_multiview2.
8216e87f02 Handle SPIR-V 1.4 selection constructs.
9cdeefb5e3 Merge pull request #1692 from Kangz/fix_default_copy_dtor
6a85c695cc Fix IVariant -Wdeprecated-copy-with-dtor
2e1b5fb39e Merge pull request #1686 from KhronosGroup/fix-1684
fa42f1ce34 Merge pull request #1685 from KhronosGroup/fix-1683
449f68ef3b Ensure loop control flow hints only appear above loops.
d62b3c2b92 GLSL: Implement control flow hints.
165dbff228 Handle odd type for textureGather component.
585fc6f3cb MSL: Always enable support for base vertex/index on iOS.
a6ce49ca24 Merge pull request #1680 from xndcn/cc
02fb8f2a24 Add comment after inf/nan float number for clarifying.
ff61890722 Merge pull request #1679 from okuoku/fix-c-sample-code
38c6ef1d56 Fix C sample code in README.md
faec1a8643 Merge pull request #1678 from KhronosGroup/fix-1674
9ea0e8b859 Merge pull request #1677 from KhronosGroup/fix-1673
c87cb54499 MSL: Add CLI option for sampler suffix.
bf3793dd35 MSL: Improve handling of split tessellation access chains.
a6c9514856 Merge pull request #1676 from KhronosGroup/fix-1671
0214990e7c Merge pull request #1675 from KhronosGroup/fix-1670
26a4986009 GLSL: Implement noncoherent framebuffer fetch.
99ae0d32e9 MSL: Handle array with component when we cannot rely on user() attrib.
a64ddcdd49 MSL: Handle array of IO variable with Component decoration.
418542eaef Merge pull request #1668 from KhronosGroup/fix-1665
b8115ffbe0 HLSL: Implement invariant as precise.
e47a30e807 Honor NoContraction qualifier.
0eeaffe048 Merge branch '16-bit-int-types-glsl'
6dbab0df47 Update reference output.
0408c592dd Fixed 16 bit int types
72a2ec4c1b MSL: Fix '--msl-multi-patch-workgroup' out of bounds reads when dispatching more threads than control points (#1662)
995c7981cc Merge pull request #1663 from billhollings/metal-arg-buff-padding-patch
098cdd64f6 MSL: Padding for Metal argument buffers should not double-count SampledImages.
c624d5387c Merge pull request #1660 from KhronosGroup/fix-1658
82a77e534e MSL: Use proper array for quad tess levels.
b38e3b4a47 Merge pull request #1661 from KhronosGroup/fix-1659
0e963c62b6 HLSL: Support Shuffle wave ops.
bbcef69a45 Merge pull request #1657 from KhronosGroup/fix-1607
532f65583e Rewrite how non-uniform qualifiers are handled.
d137abeef5 Merge pull request #1655 from KhronosGroup/fix-1640
8e24e0b224 Merge pull request #1654 from KhronosGroup/fix-1641
71eb1754e3 Merge pull request #1653 from KhronosGroup/fix-1638
2cbc7f0f37 Merge pull request #1652 from KhronosGroup/fix-1644
b084f639cb Merge pull request #1651 from KhronosGroup/fix-1645
c89b5a1a3f GLSL: Support shading rate builtins.
3fd148450a GLSL: Implement gl_FragFullyCoveredNV.
f93a8fb1fe GLSL: Support GL_EXT_shader_image_load_formatted.
90c70e6605 MSL: Handle variable access in OpSelect.
96ba044f01 HLSL: Fix automatic location assignment in block IO.
3cb8e7c223 Merge pull request #1643 from KhronosGroup/fix-1639
ae9ca7d73c MSL: Fix copy of arrays to/from stage IO variables.
986196030d MSL: Don't use native arrays for tess level inputs.
4a379a00f3 MSL: Don't emit native array for masked clip/cull distance.
406af8ff4d c: Add C API for builtin stage IO reflection.
b4a380a04c Support reflecting builtins.
852f2da63c Check SPIR-V 1.4 rules when reflecting resources.
682a227f4b MSL: Make builtin argument type declaration context sensitive.
c1edd35d57 MSL: Use spvUnsafeArray for builtin arrays after all.
7b9a591aa7 MSL: Hoist out to_tesc_invocation_id() in more places.
75ed73818c MSL: Handle loading Clip/CullDistance in TESE.
a159334895 MSL: Correctly analyze if builtin block is active.
cea934c03f MSL: Test that we can capture cull distance to buffer.
5826298697 MSL: Handle CullDistance better.
23da445bd4 MSL: Emit multiple threadgroup slices for multi-patch.
b442500204 MSL: Unroll initializations of CullDistance/ClipDistance control points.
c9946296dd MSL: Fix initialization of masked threadgroup variables.
ee85bb345e Fix print_help comment.
faf80b08fc MSL: Don't report fallback location allocations as being "used".
adc5fe3615 C: Add C api for stage output masking.
5e9c2d060e MSL: Cleanup fallback IO block emission.
e32c474911 MSL: Handle masking of TESC IO block members.
dc54f75eec MSL: Fixup gl_PerVertex names if we're emitting masked builtins.
40f628f49c MSL: Add test for complex control point outputs.
46c48ee6b5 MSL: Rewrite how IO blocks are emitted in multi-patch mode.
425e968720 MSL: Handle flattening of patch block outputs as well.
8e2dbe0d38 MSL: Do not declare patch variables on stack.
ff3f5bcba5 MSL: Handle masking of builtin control points.
6ecdd64a91 MSL: Emit a masked builtin IO block if necessary.
436b1250da MSL: Do not perform scalar fixups for control-point outputs.
22c9b63e78 MSL: Fix argument_decl check for builtin.
c635c35c12 MSL: Temporarily allow empty output struct.
a59e25db18 MSL: Small refactors.
74b2acab9b MSL: Always emit block variable for block types.
ae7bb41ef4 MSL: Test that we can mask location writes in TESC.
3255d6cef0 MSL: Explicitly only consider masked variables to be thread-group-like.
ba93b6518d MSL: Fix masking of vertex block outputs.
a393de31e6 MSL: Refactor out variable/block member masking.
857295a9ab MSL: Add tests for masking with --for-tess.
43b6ea2c9a MSL: Remove position mask tests. They will fail compilation.
e7b37392bf MSL: Emit correct address space for masked arguments.
65b5ff7ece MSL: Don't emit weird reference type for spvUnsafeArray types.
e7824c8b6e MSL: Handle masked outputs in extract_global_variables.
50a6bc058a MSL: Force builtin arrays for builtin array types.
88b54f5dab MSL: Add tests for vertex output masking.
394c038bfd MSL: Do not consider effective storage for any composite.
04988b89b9 MSL: Handle effective storage for masked CP outputs.
f2b5fb3f45 MSL: Emit threadgroup storage class for masked control point outputs.
ea91579a7f MSL: Do not redirect tess access chains on masked outputs.
9c1cadd440 Add --mask-stage-output-* CLI options.
f682e89188 MSL: Correctly emit array type for masked outputs.
2a2d57df13 MSL: Sketch out API to aid LTO-style optimization.
9a144bb2b9 Clean up member sorting.
0997e81118 MSL: Sort builtin IO block members by builtin type.
b4aa6dacfa MSVC: Add /bigobj for debug builds.
45818c14e4 Merge pull request #1648 from billhollings/msl-pad-arg-buff-structs
b3bfe22eaa MSL: Fixes to support padding Metal argument buffer entries based on argument index.
daba0dfba6 MSL: Fixes to support padding Metal argument buffer entries based on argument index.
9060e5a13c MSL: Fixes to support padding Metal argument buffer entries based on argument index.
9866cf4496 MSL: Fixes to support padding Metal argument buffer entries based on argument index.
6c0e11f907 Merge branch 'master' of https://github.com/billhollings/SPIRV-Cross into msl-pad-arg-buff-structs
582749ac68 Merge pull request #1650 from Dredhog/active-builtins-c-api
edde535574 c: Remove SPVC_PUBLIC_API prefix from API implementation
215f31b33f c: Add missing API to query active builtins.
17dab614dc MSL: Support padding Metal argument buffer entries based on argument index.
d2e1e7ba98 Fix Github CI in PRs.
28ae7b8f35 Merge pull request #1642 from mehmetoguzderin/msl-long-ulong-member
e2f7a753d2 Move condition to default block
0a0c9db9be MSL: Support long ulong types in buffers in 2.3+.
84d1f8aa2a Use Github actions CI tag.
2e000a0be4 Add GitHub Actions script.
60aa24566e Merge pull request #1633 from KhronosGroup/fix-1626
ee31e84e30 GLSL: Handle complex load/store scenarios to gl_SampleMask.
fb1f295aaf Merge pull request #1635 from KhronosGroup/fix-1627
5d846acee5 Merge pull request #1634 from KhronosGroup/fix-1625
0ac70fa7ca Merge pull request #1632 from KhronosGroup/fix-1629
4ca06c7278 Handle edge cases in OpCopyMemory.
aea6d29aa8 MSL: Add test for logical subgroup arith ops.
d6c2c1b39a HLSL: Support logical subgroup ops.
5570043af3 GLSL: Add support for Logical subgroup ops.
bc4cb1b3c5 Throw if SPIR-V module has no entry points.
d57ab68a21 Merge pull request #1630 from KhronosGroup/fix-1628
97796e0609 MSL: Deal with pointer-to-pointer qualifier ordering.
621884d709 Merge pull request #1622 from KhronosGroup/fix-1619
da238e5f12 Merge pull request #1623 from phuang/patch-2
c66a571057 Add two missing source files
b1e36a1f78 Merge pull request #1621 from KhronosGroup/fix-1618
85704f70bc MSL: Handle load and store to TessLevel array in TESC.
ce552f4f91 MSL: Gracefully assign automatic input locations to builtin attributes.
aa271c1460 MSL: Refactor out location consumption count computation.
6f1f6775f3 Add comment where aux image atomic buffers are reflected from.
92d379bab4 Merge pull request #1620 from phuang/patch-1
bc3416a18f Fix build errors on Windows
bae17e8204 Merge pull request #1617 from KhronosGroup/fix-1608
5789e3eed9 Merge pull request #1616 from KhronosGroup/fix-1609
daddbd4078 MSL: Fixup type when using tessellation levels in TESC functions.
0ad12a0036 MSL: Always return [[position]] when required.
05a1a07f70 Merge pull request #1615 from KhronosGroup/fix-1612
09dc76f68a c: Add missing IOS_SUPPORT_BASE_VERTEX_INSTANCE option.
8f5ab50fb8 Merge pull request #1614 from KhronosGroup/fix-1610
21a931613e HLSL: Add vector to illegal names list.
4741bbaa64 Merge pull request #1606 from billhollings/position-invariance
8e03cb60a5 Expose position invariance.
84a41cd488 Merge pull request #1603 from KhronosGroup/small-improvements
ea02a0c03a Check entry point variables in is_hidden_variables.
4bedad3860 Handle nonuniformEXT qualifier for acceleration structures.
7ab3f3f74e Deal better with CompositeExtract from constant composite.
66fb0bd9df GLSL: Handle tracing against incoming payload/callable.
9acb9ec31f Merge pull request #1594 from KhronosGroup/fix-1591
a5eaf2f44a Merge pull request #1595 from KhronosGroup/copyright-update
4704482bbc meta: Update copyright headers to 2021.
4c866e4662 Fix pathological complexity explosion for certain shaders.
820179bf46 Merge pull request #1590 from KhronosGroup/fix-1584
2097c30985 GLSL: Support both SPV_KHR_ray_tracing and NV_ray_tracing.
702c903f98 Merge pull request #1589 from KhronosGroup/roll-deps
ce18d1b8a5 CLI: Fix silly regression with handling of -V.
5d82d32e0f Roll dependencies.
0e5078dc0c Merge pull request #1588 from KhronosGroup/fix-1582
893a011299 MSL: Fix various bugs with framebuffer fetch on macOS and argument buffers.
3136e34215 MSL: Always use input_attachment_index for framebuffer fetch binding.
134a520034 Merge pull request #1587 from KhronosGroup/refactor-active-variable-consideration
03ee71e86c Add test for pure initializer gl_FragDepth.
3776d8978c GLSL: Force block declaration if clip/cull is used in tesc.
014b3bc5ea MSL: Make sure initialized output builtins are considered active.
a4a9b53b5b MSL: Always enable Outputs in vertex stages.
fa76d01203 MSL: Only consider builtin variables if they are part of IO interface.
c8837d7d80 MSL: Very slight refactor.
234c65c0f3 Merge pull request #1585 from KhronosGroup/fix-1569
72e9f619a9 Merge pull request #1583 from KhronosGroup/fix-1567
42ec132357 Merge pull request #1581 from KhronosGroup/fix-1554
c033a93951 GLSL: Fix -Wshadow error.
1a28a04333 GLSL: Update SPIR-V headers for modified ray tracing opcodes.
02b7f9cbe9 CLI: Add stdin support.
efed4c9738 MSL: Fix initializer for tess level outputs.
ab9200ffdf MSL: Don't flatten builtin arrays unless they're part of IO interface.
df4f8ef8fe MSL: Emit correct initializer for tessellation control points.
ad3e1584f9 MSL: Handle initializers for tess levels.
39fee93906 GLSL: Refactor out Output variable initialization.
6a3ea0385e GLSL: Add test for initializing tess level output.
175381fe08 GLSL: Handle some extreme edge cases in Output variable initialization.
7b7a21c405 Merge pull request #1578 from KhronosGroup/fix-1568
1a38fec382 Minor redundant nit.
a1c784f002 More robust handling of initialized output builtin variables.
9a304fe931 Handle output IO block initializers more robustly.
49ab12919c Merge pull request #1577 from KhronosGroup/fix-1574
3514c9ff33 Merge pull request #1576 from KhronosGroup/fix-1571
3a85d1c80c CMake: Disable compiler extensions explicitly.
ddb3c65648 Handle reserved identifiers for functions.
c4ff129fe3 MSL: Handle reserved identifiers for entry point.
e50f7d1ce8 Merge pull request #1566 from KhronosGroup/subgroup-table-fix
c8765a75f2 GLSL: Fix KHR subgroup extension table for subgroups.
762c3082ae Merge pull request #1564 from KhronosGroup/fix-1558
1eb42eb18c Merge pull request #1563 from KhronosGroup/fix-1559
a11c4780d0 GLSL: Emit nonuniformEXT in correct place for late-combined samplers.
dc940846d7 GLSL/HLSL: Disallow VariablePointers capability outright.
6d10da0224 Merge pull request #1553 from comex/no-subgroups-in-vertex-shaders
f41b59b36e Merge pull request #1557 from KhronosGroup/mit-dual-license-api
cf1e9e0643 Add MIT dual license for the SPIRV-Cross API.
0b79db773f Merge branch 'master' of git://github.com/js6i/SPIRV-Cross
c09a65c12d MSL: Added fmin3 and fmax3 library functions to the illegal name list.
5a85fa9400 msl: Don't try to use [[thread_index_in_simdgroup]] in vertex shaders.
be527632a6 Merge branch 'unused' of git://github.com/comex/SPIRV-Cross
c80cbde7aa spirv_msl: Don't add fixup hooks for builtin variables if they're unused.
3d16060c32 Merge pull request #1551 from cdavis5e/msl-subgroup-inactive-ballot-mask
1e67b21ee9 MSL: Don't mask off inactive bits in ballot masks.
1f178be3c9 Merge branch 'msl-sample-rate-position' of git://github.com/cdavis5e/SPIRV-Cross
fd738e3387 MSL: Adjust FragCoord for sample-rate shading.
782916a797 Merge pull request #1549 from KhronosGroup/various-fixes
e07f0a9df5 GLSL: Fix buffer_reference with aliased names.
c5826b4b69 GLSL: Emit storage qualifiers for buffer_reference.
650b5e1b12 HLSL: Fix validation with FXC for test.
6a614cc7f7 Normalize all internal workaround methods to use spv prefix.
35d3b9c3e7 Merge branch 'msl-subgroup-ops-2' of git://github.com/cdavis5e/SPIRV-Cross
dabdf4eff6 Merge pull request #1547 from scribam/cmake-minimum-required
1eb4852856 CMake: Set minimum required version to 3.0
68908355a9 MSL: Expand subgroup support.
58291963c6 Merge branch 'glsl-vertex-attrib-64bit' of git://github.com/rdb/SPIRV-Cross
df5e3730ca GLSL: Require GL_ARB_vertex_attrib_64bit for double input in pre-4.10
b3c59263a0 Merge pull request #1541 from cdavis5e/msl-ios-features
88e25e60ec MSL: Expose some more features on iOS.
1ee2d13873 MSL: Add missing reference file.
ef0256c23e Fix switch fallthrough
0d6fad4ab9 Merge branch 'extract_subgroup_ops' of git://github.com/js6i/SPIRV-Cross
9c2c0a23b9 Merge pull request #1533 from rdb/texture-fetch-size-fallbacks
10fa5f62aa GLSL: Legacy / extension fallbacks for textureSize and texelFetch
f0239bce05 MSL: extract global variables from subgroup ballot operations
6fc2a0581a Run format_all.sh.
71fcf0d9e6 Update texture gather test result.
008f3baad7 Merge branch 'arb-texture-gather' of git://github.com/rdb/SPIRV-Cross
46bf1e99d6 Merge pull request #1525 from cdavis5e/msl-interpolation-functions
509908d8db GLSL: Add error checking and extension fallback for textureGather
683c3f5c3f Merge pull request #1530 from rdb/legacy-glsl-round
ea334c14bc Merge pull request #1527 from rdb/legacy-transpose
2417010046 Merge pull request #1528 from rdb/fix-legacy-vertex-shader-lod
1648747fa7 Merge pull request #1529 from KhronosGroup/fix-msl-gather-regression
b3bd674aa7 GLSL: Remove unused `lod` argument from legacy_tex_op()
bf71994dae GLSL: implement transpose() in GLSL 1.10 / ES 1.00
9e6e5d2738 GLSL: Fix round/roundEven for legacy GLSL.
e8c500ceef GLSL: Fix support for textureLod in legacy vertex shaders
db13762297 MSL: Fix regression in image gather handling.
aca9b6879a MSL: Support pull-model interpolation on MSL 2.3+.
a20c768698 Merge pull request #1524 from rdb/hlsl-round-even
854f566869 HLSL: Support roundEven() in HLSL SM 4.0 and above
2e1bdeb212 Merge pull request #1520 from rdb/dx9-dref-samplers
135933d59e HLSL: Add regression test for SM3.0 texture samplers
18893ba3b9 HLSL: Support depth comparison texture sampling in SM 2/3.
fc644b50e6 Merge pull request #1523 from KhronosGroup/fix-1512
512e851185 Merge pull request #1522 from KhronosGroup/fix-1510
b3344174f7 HLSL: Add option to flatten matrix vertex input semantics.
1f018b0fb8 Parser: Don't assume OpTypePointer will always take a SPIRType.
244839d350 Merge pull request #1516 from billhollings/VK_EXT_descriptor_indexing
4bdd49df3f Syntax and format updates from code review.
c5a3f37a1c Merge pull request #1519 from cdavis5e/msl-mac-comparison-bias-grad
dcd66c283c Merge pull request #1521 from devshgraphicsprogramming/master
6402586015 Updated ref file for subgroups_basicvoteballot.vk.comp
9a1af25f02 Merge pull request #2 from KhronosGroup/master
6c5f394b09 Fix some bad assumptions about emulating `subgroupBarrier`
7f67abe0fe Minor format and typo updates from code review.
547c29f7bb MSL: Allow Bias and Grad arguments with comparison on Mac in MSL 2.3.
8884b34940 Merge pull request #1517 from atyuwen/master
303f813166 Merge pull request #1518 from KhronosGroup/fix-nonuniform-bracket-handling
439b666829 GLSL: Fix nonuniformEXT injection.
871a023877 fixed compile error with -std=c++20
541a801fed Merge pull request #1514 from cdavis5e/msl-mac-framebuffer-fetch
c8a43876c7 added metal keyworld: "level" (#1501)
b7b0e804e5 MSL: Support run-time sized image and sampler arrays (GL_EXT_nonuniform_qualifier/SPV_EXT_descriptor_indexing).
c20d5945a2 MSL: Allow framebuffer fetch on Mac in MSL 2.3.
78c6d2d628 Merge pull request #1509 from cdavis5e/mac-post-depth-coverage
08e49bfd67 Merge pull request #1508 from KhronosGroup/fix-1507
346b0b6c21 Merge pull request #1493 from KhronosGroup/ubo-row-major-load-workaround
d48d2a95c7 MSL: Allow post-depth coverage on Mac in MSL 2.3.
542d460364 Handle case where block is loop header, continue AND break block.
e47561a28b GLSL: Support a workaround for loading row-major matrices.
5ae9153a78 Merge pull request #1505 from cdavis5e/msl-vertex-writes
1b6b9705e6 MSL: For 2.1+, don't disable rasterization for vertex writes.
1a95017d11 Merge pull request #1503 from KhronosGroup/travis-python-update
b3a74f3a22 Merge pull request #1504 from KhronosGroup/fix-1502
f65f259ab7 MSL: Do not use component::x gather for depth2d textures.
1d68cbfb1b Update TravisCI python reference.
dd35821f2f Merge pull request #1499 from cdavis5e/subgroup-fixes
1264e2705e MSL: Cast broadcast booleans to ushort.
065b5bda3c MSL: Mask ballots passed to Ballot bit ops.
781367d083 MSL: Support vectors with OpGroupNonUniformAllEqual.
6ccb902462 MSL: Correct definitions of subgroup ballot mask variables.
a57b4b1b2e Merge pull request #1498 from cdavis5e/msl-swizzle-arrayed-nonconstant
064ed448b9 MSL: Don't remove periods from swizzle buffer index exprs.
7b80307a7d Merge pull request #1495 from cdavis5e/1d-2d-offset-grad
5845e009ea MSL: Handle Offset and Grad operands for 1D-as-2D textures.
0db1569e97 Merge pull request #1492 from KhronosGroup/non-native-matrix-fix
9c220a8247 Merge pull request #1490 from KhronosGroup/fix-1488
23a0cfc842 Merge pull request #1494 from cdavis5e/msl-tesc-tess-level-cast
3e6010d8c5 MSL: Don't use a bitcast for tessellation levels in tesc shaders.
120af42616 GLSL: Use need_transpose when checking for non-native matrix.
bd1ee4344e MSL: Support querying and modifying generated combined sampler suffix.
7332b44c3c Merge pull request #1489 from cdavis5e/msl-fix-atomic-image-coord
21d38f74ce MSL: Fix calculation of atomic image buffer address.
e827a06984 Merge pull request #1487 from cdavis5e/msl-atomic-image-interlock
7a5d0d6b29 MSL: Add missing interlock handling to atomic image buffers.
fab6ad234e Merge pull request #1486 from cdavis5e/atomic-image-argument-buffer
cc7aabce72 Merge pull request #1485 from cdavis5e/msl23-demote-to-helper
9cafea6cf8 MSL: Support atomic access to images from argument buffers.
2219c4a392 MSL: Support SPV_EXT_demote_to_helper_invocation for MSL 2.3.
401af49326 Merge pull request #1482 from KhronosGroup/gl-subgroup-merge
5619329665 Style nits for GL subgroup implementation.
a6f6547cf1 Add missing VK variant of the test file.
28994a3186 Update GL subgroup test file.
819c599ecd Merge branch 'issues1350-2' of git://github.com/devshgraphicsprogramming/SPIRV-Cross into master
db52e277b9 Resolved issues 1350, 1351, 1352
5cc2e4f634 Merge pull request #1475 from KhronosGroup/fix-1474
e0c9aad934 GLSL: Add support for transform_feedback3 geometry streams.
7a99d1cb72 GLSL: Use literal array size for cull/clip array sizes.
e6f5ce6b89 Merge pull request #1471 from KhronosGroup/fix-1467
6254be910e Merge pull request #1470 from KhronosGroup/fix-1469
34a6a45fba Work around MSVC warning.
5ea576ece2 Allow flip_vert_y in all relevant stages.
ea3cd74426 Merge pull request #1468 from dj2/roll-09-22
9880b05572 Roll dependencies.
8891bd3512 Merge pull request #1466 from KhronosGroup/fix-1465
2144274a91 Clean up conditional branch codegen.
54cc0b01f6 Deal with case where a selection construct conditionally merges/breaks.
16d9fea77c Merge pull request #1463 from KhronosGroup/fix-1462
66afe8c499 Implement a simple evaluator of specialization constants.
bdbef7b1f3 Merge pull request #1461 from Kangz/fix-warnings
bcd71536e2 Fix -Wduplicate-enum and -Wrange-for-analysis.
ba2d0e17d3 Merge pull request #1460 from KhronosGroup/fix-1458
446596643a Roll glslang/SPIRV-Tools deps.
18d03b3ea6 Handle OpUndef %void.
bad9dab8df Merge pull request #1457 from cdavis5e/msl-layered-subpass-data
4cf840ee7b MSL: Support layered input attachments.
c7507e39d4 Merge pull request #1456 from KhronosGroup/fix-1455
3360daa6f3 MSL: Fix OpCompositeInsert and OpVectorInsertDynamic.
9e3dbdc8d6 Merge pull request #1454 from cdavis5e/msl-multiview-non-layered
cab7335e64 MSL: Don't set the layer for multiview if the device doesn't support it.
4752a44f9e Merge pull request #1453 from cdavis5e/msl-multiview-base-instance
53080ecca8 MSL: Fix multiview view index calculation with a non-zero base instance.
685f86471e Merge pull request #1452 from KhronosGroup/minor-nits
95993f78af Run format_all.sh.
ee1b4e7042 Work around annoying warning on GCC 10.2.
eec76b04c7 Merge pull request #1450 from KhronosGroup/fix-1440
a07441568e Overhaul how we deal with reserved identifiers.
f0fe4442e3 Merge pull request #1448 from KhronosGroup/fix-1437
4f0f0e5a07 Merge pull request #1449 from KhronosGroup/fix-1443
fdbc80d131 HLSL: Fix FragCoord.w.
fad36a6b28 HLSL: Deal with partially filled 16-byte word in cbuffers.
dd1f53ff15 HLSL: Fix bug in is_packing_standard for cbuffer.
4c7944bb42 Merge pull request #1446 from kakashidinho/master
ab8eb70af1 Fix #1445: MSL: Enclose args when convert distance(a,b) to abs(a-b)
82d1c43e40 Merge pull request #1441 from cdavis5e/msl-tesc-composite-out
3347b1076d MSL: Fix handling of matrices and structs in the output control point array.
c333445ada Merge pull request #1436 from KhronosGroup/fix-1408
8a1843ab20 Add some test cases for complex type aliasing scenario.
eb580d6656 Ensure that we use primary alias type when emitting flattened members.
aac6885950 GLSL: Be more aggressive about using type_alias.
038b0bf238 Only rewrite type aliases for the base type.
7778792aec Merge pull request #1434 from KhronosGroup/glsl-force-flattened-io
57c93d44ac GLSL: Add option to force flattening IO blocks.
f5e9f4a172 Merge pull request #1432 from ponitka/hlsl-sample-mask
ba58f78395 Adding BuiltInSampleMask in HLSL
0376576d2d Merge pull request #1429 from ponitka/master
18f23c47d9 Enabling setting a fixed sampleMask in Metal fragment shaders.
934825a6a2 Merge pull request #1294 from cdavis5e/msl-multi-patch-workgroup
688c5fcbda MSL: Add support for processing more than one patch per workgroup.
3dcc23a5b3 Merge pull request #1431 from dj2/roll-07-22
ac08a89cf0 Merge pull request #1430 from cdavis5e/msl-refactoring
c4f3d4ae29 Roll GLSLang, SPIRV-Headers and SPIRV-Tools.
884bc6df65 MSL: Factor creating a uint type into its own method.
5e13f7fdf2 MSL: Factor a really gnarly condition into its own method.
6575e451f5 Merge pull request #1423 from KhronosGroup/msvc-2013-fix
36c999ae3f MSVC 2013: Fix silently broken builds.
39ce5b46de Merge pull request #1421 from troughton/patch-3
b74a84e4cb MSL: Ensure OpStore source operands are marked for inclusion in function arguments
559b21c6c9 Merge pull request #1420 from dj2/roll-07-06
63fbdaca93 Roll deps.
3b366db7f1 Merge pull request #1416 from KhronosGroup/fix-1415
711300baed MSL: Do not emit swizzled writes in packing fixups.
fa5b206d97 MSL: Workaround broken vector -> scalar access chain in MSL.
fab75792a9 Merge pull request #1419 from KhronosGroup/msl-input-attachment-index-fallback
e1600d4df8 MSL: Use input attachment index directly for resource index fallback.
c465cd5004 Merge pull request #1417 from KhronosGroup/fix-351
2ac8f51b06 GLSL: Support I/O flattening with arrays as final type.
2d43103a55 GLSL: Support multi-level struct flattening for I/O.
d573a95a9c Run format_all.sh.
8f716947c2 test: Use --hlsl-dx9-compatible when attempting to compile SM 3.0 shaders.
2894b40868 Merge pull request #1412 from KhronosGroup/fix-1411
70f17142de GLSL: Fix nested legacy switch workarounds.
b1082c10af Merge pull request #1410 from KhronosGroup/fix-1406
42096ca4a1 Merge pull request #1409 from KhronosGroup/fix-1405
4d79d634f5 GLSL: Implement switch on ESSL 1.0.
bae76d7915 GLSL: Use for-loop fallback instead of do/while for legacy ESSL.
3afbfdb090 Implement context-sensitive expression read tracking.
05188aca69 Fix bug with control dependent expression tracking.
2e7a562583 Merge pull request #1404 from KhronosGroup/fix-1402
eb0f0323d3 HLSL: Workaround FXC bugs with degenerate switch blocks.
f9ae06512e Merge pull request #1401 from dj2/roll-deps-22
9eb615c63b Merge pull request #1400 from KhronosGroup/fix-1399
0abc017501 Roll deps and update tests.
f9da366ae6 MSL: Remove the old VertexAttr API.
7edaea87cf Merge pull request #1398 from Kangz/fix-deprecation
6add77aa97 Merge pull request #1397 from KhronosGroup/fix-1396
8aee532f56 Fix placement of SPIRV_CROSS_DEPRECATED.
f141521ebe Fix duplicated initialization for loop variables with initializers.
d7976b7b24 Merge pull request #1395 from KhronosGroup/fix-1394
ace4d25222 MSL: Add test case for constructing struct with non-value-type array.
7314f51a32 MSL: Deal with loading non-value-type arrays.
02db4c1f16 MSL: Add tests for array copies in and out of buffers.
03d4bcea68 MSL: Improve handling of array types in buffer objects.
11832b6e14 Clean up some deprecation warnings when building with Makefile.
5e509b159a Remove unused member in MSLShaderInput.
a64484f62b Merge pull request #1392 from cdavis5e/msl-frag-input-vecsize
5281d9997e MSL: Fix up input variables' vector lengths in all stages.
7073ed2edb Merge pull request #1393 from KhronosGroup/fix-1391
d13dc0ce47 HLSL: Fix texProj in legacy HLSL.
9e3df69d4e Merge pull request #1390 from rdb/master
031cbaa5a2 GLSL: Require GL_ARB_draw_instanced for gl_InstanceID in GLSL < 1.40
92fcd7d2b0 Merge pull request #1389 from KhronosGroup/sparse-clamp
f383cc98f2 GLSL: Handle the rest of GL_ARB_sparse_texture_clamp.
bbefea2b02 Merge pull request #1388 from KhronosGroup/uint-sparse-residency-query
857e1c445c GLSL: Support uint code for sparse residency query.
553a7f959b Merge pull request #1385 from KhronosGroup/fix-1237
cbe0cca73b Refactor texture fetch function generation.
b73c047faf Merge pull request #1387 from Lichtso/master
1f5875e23e Fix missing switch cases in Y'CbCr conversion
3ce81c0025 Merge pull request #1384 from KhronosGroup/fix-1380
757c10bbe4 Merge pull request #1383 from KhronosGroup/fix-1381
275974e062 GLSL: Implement sparse feedback.
6600793884 MSL: Remove obsolete MSLVertexAttr members.
2d5200650a HLSL: Add native support for 16-bit types.
d385bf096f Merge pull request #1378 from bbernhar/issue_410
32bead81c8 Prefer set/binding API
999a7b5256 Merge pull request #1379 from KhronosGroup/fix-1377
165392a2b0 Document all CLI options.
d31bc0247e Do not mask writes to remapped variables in all cases.
17bccc9f7e HLSL: Add option to treat certain SSBO bindings as UAV, even with readonly.
61cddd6307 Merge pull request #1376 from KhronosGroup/fix-1374
58dad82fcb Handle physical pointers in reflection API.
f992548434 Merge pull request #1372 from KhronosGroup/gl-draw-parameters
ef247e75ec GLSL: Improve support for GL_ARB_shader_draw_parameters in desktop GLSL.
ec558bc98e Merge pull request #1371 from dj2/roll-deps-21
3d01d1bf50 Roll SPIRV-Tools, SPIRV-Headers and GLSLang.
287e93ff80 Merge pull request #1370 from dj2/roll_deps_20
29ad40e93e Merge pull request #1369 from KhronosGroup/more-rt-tests
8bf916f575 Roll dependencies
b4dd0b6fb1 GLSL: Add more test shaders for hit attribute types.
66ec3e3e54 GLSL: Support ray payloads and hit attributes declared as Block.
271ad33380 GLSL: Add some more focused RT test shaders.
3c43f055df Merge pull request #1366 from KhronosGroup/fix-1365
f3a362b1aa HLSL: Implement image queries for UAV images.
d638d2df9c Merge pull request #1363 from KhronosGroup/rt-gl-instance-id
86380acf4d Support gl_InstanceID in RT shaders.
b7823ec389 Merge pull request #1361 from KhronosGroup/msl-single-element-array-refinement
107ab7c2b7 MSL: Avoid packed arrays in more cases.
de3698f0e0 Add missing reference files from PR merge.
b8ba89a1ac Merge branch 'master' of git://github.com/kakashidinho/SPIRV-Cross
9ddfe6db6d Fix #1359: MSL: If the packed type is scalar, don't emit "pack_" prefix.
92f7d36c72 Merge pull request #1356 from KhronosGroup/fix-1354
0ebb88cc39 MSL: Redirect member indices when buffer has been sorted by Offset.
137dbeb7f1 Merge pull request #1355 from Kangz/fix-microsoft-enum-value
a3a590a82e Fix -Wmicrosoft-enum-value
7e0295abf8 Merge pull request #1353 from zoddicus/updateSPIRVHeaders
76658247ac Update SPIR-V Headers to 1.5 rev 3
471990d4dc Merge pull request #1349 from KhronosGroup/fix-1348
35a9b793d6 Work around odd deadlock in test_shaders.py in --parallel mode.
d7d630a0b7 Merge pull request #1347 from KhronosGroup/fix-1343
4330b046be Merge pull request #1346 from KhronosGroup/fix-1340
9b7140e2ba Implement OpAtomicLoad/OpAtomicStore.
cbaaa02af9 Merge pull request #1345 from apayen/master
6ef47d6657 MSL: Fix case where subpassInput is passed to leaf functions.
4edfe96739 Fixed recursion in combined_decoration_for_member Members in nested structs were not properly iterated on, and as a result, flags like row major for matrices could be not propagated properly.
7ba0f8f087 Merge pull request #1342 from dj2/roll
171c646474 Roll GLSLang, SPIRV-Tools and SPIRV-Headers.
1ad1662a2b Merge pull request #1339 from KhronosGroup/fix-1338
5e5d1c27ce GLSL: Support f16x2 <-> f32 bitcast.
c58839bfd4 Merge pull request #1336 from KhronosGroup/fix-1333
bf289c37a2 Merge pull request #1337 from KhronosGroup/nonuniform-propagation-fix
bdb343ea06 Be a bit more careful what nonuniform state is propagated.
6b0e558169 Handle RayQueryKHR type.
78b4d9379b Update SPIR-V headers.
b2e934b53f Merge pull request #1328 from devshgraphicsprogramming/patch-1
5cb0f0a640 Merge pull request #1335 from KhronosGroup/fix-1325
127224d816 Fix issue #1327
58548e25a2 Merge pull request #1334 from KhronosGroup/fix-1332
7b9cba7424 HLSL: Add parens in unpackUint2x32 for clarity.
e4e4791c4e HLSL: Only allow 64-bit integers in SM 6.0.
a396744f89 Ensure unpack/pack2x32 tests are compatible with test suite.
55dfbead2f GLSL/HLSL: Support packUint2x32 and unpackUint2x32
f8592ecdfc MSL: Deal correctly with initializers on Private variables.
3fb86e4385 Merge pull request #1331 from KhronosGroup/fix-1321
17ad62eea4 MSL: Support edge case with DX layout in scalar block layout.
f38cbeb814 Merge pull request #1330 from KhronosGroup/fix-1320
ebf463674d MSL: Allow removing clip distance user varyings.
aa5fbc004b Merge pull request #1329 from godlikepanos/master
b3109b8ad0 Reflection: Add specialization constant name
90198199df Merge pull request #1324 from cdavis5e/msl-disabled-builtin-names
96f7008aa8 MSL: Force disabled fragment builtins to have the right name.
fbc560782c Merge pull request #1323 from cdavis5e/msl-disable-frag-only
495e48de44 MSL: Only disable output variables in fragment shaders.
54658d6255 Merge pull request #1319 from cdavis5e/msl-frag-outputs
b29f83c383 MSL: Add options to control emission of fragment outputs.
fcbc590937 Merge pull request #1316 from Malacath-92/master
4560ee24fd Improve compatibility with clang-cl
a1d9b474b5 Merge pull request #1314 from KhronosGroup/fix-1313
c7b75a8fe6 MSL: Do not use base expression with PhysicalTypeID OpCompositeExtract.
6637610b16 Merge pull request #1309 from KhronosGroup/fix-1305
941cceedb4 Expose a query if samplers or images are comparison resources.
b691b7d1e3 Do not add NonWritable/NonReadable decorations for regular images.
14f24d71ab Merge pull request #1308 from KhronosGroup/fix-1306
cfcd84319b Merge pull request #1310 from KhronosGroup/msl-force-declare-implicit-builtins
d9d3359ffb MSL: Deal with cases where builtin is implicitly needed, declared, but unused.
01cee74b02 Merge pull request #1307 from troughton/patch-1
28bf9057df HLSL: Add support for treating NonWritable UAV texture as SRV instead.
4cf736d753 MSL: mark BuiltInFragCoord as implicitly used for subpass reads
e58e8d5dbe Merge pull request #1303 from KhronosGroup/fix-1302
3cb6aeb480 MSL: Fix access chain for deep struct hierarchy on array of buffers.
84ec99c531 Merge pull request #1301 from dj2/roll_deps
32307df73a Roll GLSLang, SPIRV-Tools and SPIRV-Headers
9b3c5e12be Merge pull request #1299 from KhronosGroup/fix-1298
b8905bbd95 Add support for forcefully zero-initialized variables.
871c85d7f0 Merge pull request #1297 from KhronosGroup/fix-1295
04e877df12 GLSL: Implement GL_EXT_shader_framebuffer_fetch.
c2655ab291 Run format_all.sh.
c3d216c011 Merge pull request #1296 from KhronosGroup/fix-1292
05004a57ea GLSL/HLSL: Fix nonuniform qualifier for SSBO atomics.
a3d3c80dd7 GLSL/HLSL: Implement nonuniform qualifier for image atomics.
65aa0c35d6 include/spirv_cross: Fix typo.
7d42fd7f7b Merge pull request #1290 from KhronosGroup/fix-1289
185551bfaf HLSL: Do not emit globallycoherent for SRV ByteAddressBuffer.
d19f30a90e Merge pull request #1287 from KhronosGroup/read-write-decoration-tweaks
95cd20f1c7 Add test for disable-storage-image-qualifier-deduction.
c27e1efbf1 HLSL: Add option to always treat SSBO as UAV, even with readonly.
01968c4486 Add option to disable storage image qualifier deduction.
3ebc83da46 Remove old hack which forces NonWritable/NonReadable.
9deb6ffbba Merge pull request #1285 from KhronosGroup/vulkan-semantics-shorthand
3f2de0d5d3 Add -V alias for --vulkan-semantics.
c5f7b55756 Merge pull request #1284 from KhronosGroup/fix-1282
16796e92be MSL: Add C API for force native arrays.
d91e134500 MSL: Add native array test for composite array initialization.
30343f3e95 MSL: Reintroduce workaround for constant arrays being passed by value.
20b28f72fa MSL: Reinstate workaround for returning arrays.
c9d4f9cd74 MSL: Add a workaround path to force native arrays for everything.
f19fdb94d7 Merge pull request #1283 from dj2/roll
7ec16b64c8 Roll GLSLang, SPIRV-Tools and SPIRV-Headers
dffd33dd9d Merge pull request #1280 from KhronosGroup/fix-1278
92a4294c57 Reject SPIR-V modules with garbage ID bound.
c53b34765d Merge pull request #1277 from KhronosGroup/fix-1276
e81c1b1d98 HLSL: Declare undef variables as static.
7ac5c38838 Merge pull request #1275 from KhronosGroup/fix-1274
cec0502ba5 Remove old memory_scope flag from iOS barriers.
6b2add8e2c Merge pull request #1272 from KhronosGroup/fix-1271
6f5cb00148 Use GNUInstallDirs for include path as well.
cb0aca91ef Merge pull request #1273 from orbea/cmake
8b90526911 cmake: Don't hardcode the pkg-config file.
74544caa16 cmake: Use GNUInstallDirs.
d67c3393da CMake: Avoid warning when parent project uses VERSION in project().
68bf0f824c Merge pull request #1270 from KhronosGroup/fix-1266
dfffbb1cf3 Compile fix on older compilers.
655312cb47 GLSL: Support GL_ARB_enchanced_layouts for XFB.
306cb31bad Merge pull request #1239 from cdavis5e/msl-inline-uniform-blocks
ae6c05f6f4 MSL: Move inline uniform blocks to the end of the argument buffer.
fedbc35315 MSL: Support inline uniform blocks in argument buffers.
f9376058ce Merge pull request #1269 from KhronosGroup/fix-1267
8bbb5fb763 Make SmallVector noexcept.
883de24f79 Merge pull request #1268 from barath121/patch-1
eac76d9473 Typo at line 324
f9818f0804 Update license headers to 2020.
7a411258af Run format_all.sh.
af787a8a79 Merge pull request #1264 from KhronosGroup/msl-argument-buffer-persist
4054d650cf Merge pull request #1263 from KhronosGroup/fix-1232
c3bd136df1 MSL: Add support for force-activating IAB resources.
f79c1e2fed Deal with illegal names in types as well.
79700d5412 Merge pull request #1262 from KhronosGroup/json-reflection-improvements
57b70225ef Merge pull request #1261 from KhronosGroup/fix-379
762c87a7bb Reflection: Add array stride/matrix stride reflection.
18e24c3ca2 Reflection: Emit reflection information for array size literalness.
55fe6050fe GLSL: Implement geometry shader passthrough extension.
172e39f039 Merge pull request #1257 from KhronosGroup/fix-1236
74107a04d1 Merge pull request #1256 from KhronosGroup/fix-1252
cc153f8d7f HLSL: Add a resource remapping API similar to MSL.
2bbb012e9c MSL: Deal with sign on wave min/max.
88ddeec49a HLSL: Deal with casting for WaveActiveMin/Max.
5253da9e63 GLSL: Deal with sign in subgroup Min/Max operations.
34ba8ea4f2 Merge pull request #1255 from KhronosGroup/fix-1254
c256525c7b Run format_all.sh.
1cbd71b354 HLSL: Fix bug when reading and writing structs from SSBO.
151ff1e870 HLSL: Implement stores for complex composites in ByteAddressBuffers.
ca9398c122 HLSL: Su…

* Build fix with new SPIRV-Cross

* WiiU build fix with new SPIRV-Cross
This commit is contained in:
warmenhoven 2023-01-15 03:01:06 -05:00 committed by GitHub
parent b8bcce98c3
commit f347c2d192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2649 changed files with 173043 additions and 13159 deletions

View File

@ -1,3 +1,6 @@
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
# The style used for all options not specifically set in the configuration.
BasedOnStyle: LLVM

View File

@ -0,0 +1,70 @@
# Copyright 2020-2021 The Khronos Group, Inc.
# SPDX-License-Identifier: Apache-2.0
name: CI
on:
push:
branches: [ main ]
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
name: "Build ${{ matrix.platform }}"
strategy:
matrix:
platform: [windows-latest, ubuntu-18.04, ubuntu-20.04, macos-latest]
env:
PARALLEL: -j 2
runs-on: "${{ matrix.platform }}"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Pull glslang / SPIRV-Tools
shell: bash
working-directory: ${{github.workspace}}
run: ./checkout_glslang_spirv_tools.sh
- name: Build glslang / SPIRV-Tools
shell: bash
working-directory: ${{github.workspace}}
run: ./build_glslang_spirv_tools.sh Release
- name: Configure SPIRV-Cross
shell: bash
run: |
mkdir build
cd build
cmake .. -DSPIRV_CROSS_WERROR=ON -DSPIRV_CROSS_MISC_WARNINGS=ON -DSPIRV_CROSS_SHARED=ON -DCMAKE_INSTALL_PREFIX=output -DCMAKE_BUILD_TYPE=Release -DSPIRV_CROSS_ENABLE_TESTS=ON
- name: Build SPIRV-Cross
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake --build . --config Release
cmake --build . --config Release --target install
- name: Test SPIRV-Cross
shell: bash
working-directory: ${{github.workspace}}/build
run: ctest --verbose -C Release
reuse:
name: "REUSE license check"
runs-on: ubuntu-latest
container: khronosgroup/docker-images:asciidoctor-spec
steps:
- uses: actions/checkout@v2
# REUSE license checker
- name: license-check
run: |
reuse lint

View File

@ -1,3 +1,6 @@
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
*.o
*.d
*.txt
@ -18,3 +21,4 @@
*.vcxproj.user
!CMakeLists.txt
!LICENSES/*.txt

11
deps/SPIRV-Cross/.reuse/dep5 vendored Normal file
View File

@ -0,0 +1,11 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: SPIRV-Cross
Source: https://github.com/KhronosGroup/SPIRV-Cross
Files: shaders*/* reference/* tests-other/*
Copyright: 2016-2021 The Khronos Group, Inc.
License: Apache-2.0
Files: spirv.h spirv.hpp GLSL.std.450.h
Copyright: 2016-2021 The Khronos Group, Inc.
License: MIT

View File

@ -1,72 +0,0 @@
language:
- cpp
- python
python: 3.7
matrix:
include:
- os: linux
dist: trusty
compiler: gcc
env:
- GENERATOR="Unix Makefiles"
- ARTIFACT=gcc-trusty-64bit
- os: linux
dist: trusty
compiler: clang
env:
- GENERATOR="Unix Makefiles"
- ARTIFACT=clang-trusty-64bit
- os: osx
compiler: clang
osx_image: xcode10
env:
- GENERATOR="Unix Makefiles"
- ARTIFACT=clang-macos-64bit
- os: windows
before_install:
- choco install python3
- export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
env:
- GENERATOR="Visual Studio 15 2017"
- ARTIFACT=vs2017-32bit
- os: windows
before_install:
- choco install python3
- export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
env:
- GENERATOR="Visual Studio 15 2017 Win64"
- ARTIFACT=vs2017-64bit
before_script:
- "./checkout_glslang_spirv_tools.sh"
script:
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then PYTHON3=$(which python); fi
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then PYTHON3=$(which python3); fi
- "./build_glslang_spirv_tools.sh Release"
- mkdir build
- cd build
- cmake .. -DSPIRV_CROSS_SHARED=ON -DCMAKE_INSTALL_PREFIX=output -DCMAKE_BUILD_TYPE=Release -G "${GENERATOR}" -DPYTHON_EXECUTABLE:FILEPATH="${PYTHON3}" -DSPIRV_CROSS_ENABLE_TESTS=ON
- cmake --build . --config Release
- cmake --build . --config Release --target install
- ctest --verbose -C Release
- cd ..
before_deploy:
- REV=${ARTIFACT}-$(git rev-parse --short=10 HEAD)
- cd build/output
- tar cf spirv-cross-${REV}.tar *
- gzip spirv-cross-${REV}.tar
- cd ../..
- export FILE_TO_UPLOAD=build/output/spirv-cross-${REV}.tar.gz
deploy:
provider: releases
api_key:
secure: c7YEOyzhE19TFo76UnbLWk/kikRQxsHsOxzkOqN6Q2aL8joNRw5kmcG84rGd+Rf6isX62cykCzA6qHkyJCv9QTIzcyXnLju17rLvgib7cXDcseaq8x4mFvet2yUxCglthDpFY2M2LB0Aqws71lPeYIrKXa6hCFEh8jO3AWxnaor7O3RYfNZylM9d33HgH6KLT3sDx/cukwBstmKeg7EG9OUnrSvairkPW0W2+jlq3SXPlq/WeVhf8hQs3Yg0BluExGbmLOwe9EaeUpeGuJMyHRxXypnToQv1/KwoScKpap5tYxdNWiwRGZ4lYcmKrjAYVvilTioh654oX5LQpn34mE/oe8Ko9AaATkSaoiisRFp6meWtnB39oFBoL5Yn15DqLQpRXPr1AJsnBXSGAac3aDBO1j4MIqTHmYlYlfRw3n2ZsBaFaTZnv++438SNQ54nkivyoDTIWjoOmYa9+K4mQc3415RDdQmjZTJM+lu+GAlMmNBTVbfNvrbU55Usu9Lo6BZJKKdUMvdBB78kJ5FHvcBlL+eMgmk1pABQY0IZROCt7NztHcv1UmAxoWNxveSFs5glydPNNjNS8bogc4dzBGYG0KMmILbBHihVbY2toA1M9CMdDHdp+LucfDMmzECmYSEmlx0h8win+Jjb74/qpOhaXuUZ0NnzVgCOyeUYuMQ=
file: "${FILE_TO_UPLOAD}"
skip_cleanup: true
on:
tags: true

View File

@ -1,4 +1,5 @@
# Copyright 2016 Google Inc.
# Copyright 2016-2021 Google Inc.
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -12,11 +13,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 2.8)
#
# At your option, you may choose to accept this material under either:
# 1. The Apache License, Version 2.0, found at <http://www.apache.org/licenses/LICENSE-2.0>, or
# 2. The MIT License, found at <http://opensource.org/licenses/MIT>.
#
cmake_minimum_required(VERSION 3.0)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
# Avoid a warning if parent project sets VERSION in project().
if (${CMAKE_VERSION} VERSION_GREATER "3.0.1")
cmake_policy(SET CMP0048 NEW)
endif()
project(SPIRV-Cross LANGUAGES CXX C)
enable_testing()
include(GNUInstallDirs)
option(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS "Instead of throwing exceptions assert" OFF)
option(SPIRV_CROSS_SHARED "Build the C API as a single shared library." OFF)
option(SPIRV_CROSS_STATIC "Build the C and C++ API as static libraries." ON)
@ -39,6 +55,13 @@ option(SPIRV_CROSS_SANITIZE_UNDEFINED "Sanitize undefined" OFF)
option(SPIRV_CROSS_NAMESPACE_OVERRIDE "" "Override the namespace used in the C++ API.")
option(SPIRV_CROSS_FORCE_STL_TYPES "Force use of STL types instead of STL replacements in certain places. Might reduce performance." OFF)
option(SPIRV_CROSS_SKIP_INSTALL "Skips installation targets." OFF)
option(SPIRV_CROSS_WERROR "Fail build on warnings." OFF)
option(SPIRV_CROSS_MISC_WARNINGS "Misc warnings useful for Travis runs." OFF)
option(SPIRV_CROSS_FORCE_PIC "Force position-independent code for all targets." OFF)
if(${CMAKE_GENERATOR} MATCHES "Makefile")
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
message(FATAL_ERROR "Build out of tree to avoid overwriting Makefile")
@ -49,7 +72,7 @@ set(spirv-compiler-options "")
set(spirv-compiler-defines "")
set(spirv-cross-link-flags "")
message(STATUS "Finding Git version for SPIRV-Cross.")
message(STATUS "SPIRV-Cross: Finding Git version for SPIRV-Cross.")
set(spirv-cross-build-version "unknown")
find_package(Git)
if (GIT_FOUND)
@ -60,24 +83,39 @@ if (GIT_FOUND)
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "Git hash: ${spirv-cross-build-version}")
message(STATUS "SPIRV-Cross: Git hash: ${spirv-cross-build-version}")
else()
message(STATUS "Git not found, using unknown build version.")
message(STATUS "SPIRV-Cross: Git not found, using unknown build version.")
endif()
string(TIMESTAMP spirv-cross-timestamp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/gitversion.in.h ${CMAKE_CURRENT_BINARY_DIR}/gitversion.h @ONLY)
if(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)
if (SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)
set(spirv-compiler-defines ${spirv-compiler-defines} SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)
if (NOT MSVC)
set(spirv-compiler-options ${spirv-compiler-options} -fno-exceptions)
endif()
endif()
if(SPIRV_CROSS_FORCE_STL_TYPES)
if (SPIRV_CROSS_FORCE_STL_TYPES)
set(spirv-compiler-defines ${spirv-compiler-defines} SPIRV_CROSS_FORCE_STL_TYPES)
endif()
if (CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang"))
set(spirv-compiler-options ${spirv-compiler-options} -Wall -Wextra -Werror -Wshadow)
if (WIN32)
set(CMAKE_DEBUG_POSTFIX "d")
endif()
if (CMAKE_COMPILER_IS_GNUCXX OR ((${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") AND NOT MSVC))
set(spirv-compiler-options ${spirv-compiler-options} -Wall -Wextra -Wshadow -Wno-deprecated-declarations)
if (SPIRV_CROSS_MISC_WARNINGS)
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
set(spirv-compiler-options ${spirv-compiler-options} -Wshorten-64-to-32)
endif()
endif()
if (SPIRV_CROSS_WERROR)
set(spirv-compiler-options ${spirv-compiler-options} -Werror)
endif()
if (SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)
set(spirv-compiler-options ${spirv-compiler-options} -fno-exceptions)
@ -103,7 +141,8 @@ if (CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang"))
set(spirv-cross-link-flags "${spirv-cross-link-flags} -fsanitize=thread")
endif()
elseif (MSVC)
set(spirv-compiler-options ${spirv-compiler-options} /wd4267)
# AppVeyor spuriously fails in debug build on older MSVC without /bigobj.
set(spirv-compiler-options ${spirv-compiler-options} /wd4267 /wd4996 $<$<CONFIG:DEBUG>:/bigobj>)
endif()
macro(extract_headers out_abs file_list)
@ -130,9 +169,12 @@ macro(spirv_cross_add_library name config_name library_type)
extract_headers(hdrs "${ARGN}")
target_include_directories(${name} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include/spirv_cross>)
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/spirv_cross>)
set_target_properties(${name} PROPERTIES
PUBLIC_HEADERS "${hdrs}")
if (SPIRV_CROSS_FORCE_PIC)
set_target_properties(${name} PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
target_compile_options(${name} PRIVATE ${spirv-compiler-options})
target_compile_definitions(${name} PRIVATE ${spirv-compiler-defines})
if (SPIRV_CROSS_NAMESPACE_OVERRIDE)
@ -142,15 +184,18 @@ macro(spirv_cross_add_library name config_name library_type)
target_compile_definitions(${name} PRIVATE SPIRV_CROSS_NAMESPACE_OVERRIDE=${SPIRV_CROSS_NAMESPACE_OVERRIDE})
endif()
endif()
install(TARGETS ${name}
if (NOT SPIRV_CROSS_SKIP_INSTALL)
install(TARGETS ${name}
EXPORT ${config_name}Config
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include/spirv_cross)
install(FILES ${hdrs} DESTINATION include/spirv_cross)
install(EXPORT ${config_name}Config DESTINATION share/${config_name}/cmake)
export(TARGETS ${name} FILE ${config_name}Config.cmake)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/spirv_cross)
install(FILES ${hdrs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/spirv_cross)
install(EXPORT ${config_name}Config DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${config_name}/cmake)
export(TARGETS ${name} FILE ${config_name}Config.cmake)
endif()
endmacro()
set(spirv-cross-core-sources
@ -287,17 +332,18 @@ if (SPIRV_CROSS_STATIC)
endif()
set(spirv-cross-abi-major 0)
set(spirv-cross-abi-minor 16)
set(spirv-cross-abi-minor 54)
set(spirv-cross-abi-patch 0)
if (SPIRV_CROSS_SHARED)
set(SPIRV_CROSS_VERSION ${spirv-cross-abi-major}.${spirv-cross-abi-minor}.${spirv-cross-abi-patch})
set(SPIRV_CROSS_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib)
set(SPIRV_CROSS_INSTALL_INC_DIR ${CMAKE_INSTALL_PREFIX}/include/spirv_cross)
configure_file(
if (NOT SPIRV_CROSS_SKIP_INSTALL)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/pkg-config/spirv-cross-c-shared.pc.in
${CMAKE_CURRENT_BINARY_DIR}/spirv-cross-c-shared.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/spirv-cross-c-shared.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pkgconfig)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/spirv-cross-c-shared.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
spirv_cross_add_library(spirv-cross-c-shared spirv_cross_c_shared SHARED
${spirv-cross-core-sources}
@ -395,7 +441,9 @@ if (SPIRV_CROSS_CLI)
target_include_directories(spirv-cross PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_compile_definitions(spirv-cross PRIVATE ${spirv-compiler-defines} HAVE_SPIRV_CROSS_GIT_VERSION)
set_target_properties(spirv-cross PROPERTIES LINK_FLAGS "${spirv-cross-link-flags}")
install(TARGETS spirv-cross RUNTIME DESTINATION bin)
if (NOT SPIRV_CROSS_SKIP_INSTALL)
install(TARGETS spirv-cross DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
target_link_libraries(spirv-cross PRIVATE
spirv-cross-glsl
spirv-cross-hlsl
@ -427,14 +475,14 @@ if (SPIRV_CROSS_CLI)
if ((${spirv-cross-glslang} MATCHES "NOTFOUND") OR (${spirv-cross-spirv-as} MATCHES "NOTFOUND") OR (${spirv-cross-spirv-val} MATCHES "NOTFOUND") OR (${spirv-cross-spirv-opt} MATCHES "NOTFOUND"))
set(SPIRV_CROSS_ENABLE_TESTS OFF)
message("Could not find glslang or SPIRV-Tools build under external/. Run ./checkout_glslang_spirv_tools.sh and ./build_glslang_spirv_tools.sh. Testing will be disabled.")
message("SPIRV-Cross: Testing will be disabled for SPIRV-Cross. Could not find glslang or SPIRV-Tools build under external/. To enable testing, run ./checkout_glslang_spirv_tools.sh and ./build_glslang_spirv_tools.sh first.")
else()
set(SPIRV_CROSS_ENABLE_TESTS ON)
message("Found glslang and SPIRV-Tools. Enabling test suite.")
message("Found glslangValidator in: ${spirv-cross-glslang}.")
message("Found spirv-as in: ${spirv-cross-spirv-as}.")
message("Found spirv-val in: ${spirv-cross-spirv-val}.")
message("Found spirv-opt in: ${spirv-cross-spirv-opt}.")
message("SPIRV-Cross: Found glslang and SPIRV-Tools. Enabling test suite.")
message("SPIRV-Cross: Found glslangValidator in: ${spirv-cross-glslang}.")
message("SPIRV-Cross: Found spirv-as in: ${spirv-cross-spirv-as}.")
message("SPIRV-Cross: Found spirv-val in: ${spirv-cross-spirv-val}.")
message("SPIRV-Cross: Found spirv-opt in: ${spirv-cross-spirv-opt}.")
endif()
set(spirv-cross-externals
@ -461,6 +509,18 @@ if (SPIRV_CROSS_CLI)
target_link_libraries(spirv-cross-msl-resource-binding-test spirv-cross-c)
set_target_properties(spirv-cross-msl-resource-binding-test PROPERTIES LINK_FLAGS "${spirv-cross-link-flags}")
add_executable(spirv-cross-hlsl-resource-binding-test tests-other/hlsl_resource_bindings.cpp)
target_link_libraries(spirv-cross-hlsl-resource-binding-test spirv-cross-c)
set_target_properties(spirv-cross-hlsl-resource-binding-test PROPERTIES LINK_FLAGS "${spirv-cross-link-flags}")
add_executable(spirv-cross-msl-ycbcr-conversion-test tests-other/msl_ycbcr_conversion_test.cpp)
target_link_libraries(spirv-cross-msl-ycbcr-conversion-test spirv-cross-c)
set_target_properties(spirv-cross-msl-ycbcr-conversion-test PROPERTIES LINK_FLAGS "${spirv-cross-link-flags}")
add_executable(spirv-cross-typed-id-test tests-other/typed_id_test.cpp)
target_link_libraries(spirv-cross-typed-id-test spirv-cross-core)
set_target_properties(spirv-cross-typed-id-test PROPERTIES LINK_FLAGS "${spirv-cross-link-flags}")
if (CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang"))
target_compile_options(spirv-cross-c-api-test PRIVATE -std=c89 -Wall -Wextra)
endif()
@ -475,6 +535,14 @@ if (SPIRV_CROSS_CLI)
COMMAND $<TARGET_FILE:spirv-cross-msl-constexpr-test> ${CMAKE_CURRENT_SOURCE_DIR}/tests-other/msl_constexpr_test.spv)
add_test(NAME spirv-cross-msl-resource-binding-test
COMMAND $<TARGET_FILE:spirv-cross-msl-resource-binding-test> ${CMAKE_CURRENT_SOURCE_DIR}/tests-other/msl_resource_binding.spv)
add_test(NAME spirv-cross-hlsl-resource-binding-test
COMMAND $<TARGET_FILE:spirv-cross-hlsl-resource-binding-test> ${CMAKE_CURRENT_SOURCE_DIR}/tests-other/hlsl_resource_binding.spv)
add_test(NAME spirv-cross-msl-ycbcr-conversion-test
COMMAND $<TARGET_FILE:spirv-cross-msl-ycbcr-conversion-test> ${CMAKE_CURRENT_SOURCE_DIR}/tests-other/msl_ycbcr_conversion_test.spv)
add_test(NAME spirv-cross-msl-ycbcr-conversion-test-2
COMMAND $<TARGET_FILE:spirv-cross-msl-ycbcr-conversion-test> ${CMAKE_CURRENT_SOURCE_DIR}/tests-other/msl_ycbcr_conversion_test_2.spv)
add_test(NAME spirv-cross-typed-id-test
COMMAND $<TARGET_FILE:spirv-cross-typed-id-test>)
add_test(NAME spirv-cross-test
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --parallel
${spirv-cross-externals}
@ -525,9 +593,24 @@ if (SPIRV_CROSS_CLI)
${spirv-cross-externals}
${CMAKE_CURRENT_SOURCE_DIR}/shaders-reflection
WORKING_DIRECTORY $<TARGET_FILE_DIR:spirv-cross>)
add_test(NAME spirv-cross-test-ue4
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --msl --parallel
${spirv-cross-externals}
${CMAKE_CURRENT_SOURCE_DIR}/shaders-ue4
WORKING_DIRECTORY $<TARGET_FILE_DIR:spirv-cross>)
add_test(NAME spirv-cross-test-ue4-opt
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --msl --opt --parallel
${spirv-cross-externals}
${CMAKE_CURRENT_SOURCE_DIR}/shaders-ue4
WORKING_DIRECTORY $<TARGET_FILE_DIR:spirv-cross>)
add_test(NAME spirv-cross-test-ue4-no-opt
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --msl --parallel
${spirv-cross-externals}
${CMAKE_CURRENT_SOURCE_DIR}/shaders-ue4-no-opt
WORKING_DIRECTORY $<TARGET_FILE_DIR:spirv-cross>)
endif()
elseif(NOT ${PYTHONINTERP_FOUND})
message(WARNING "Testing disabled. Could not find python3. If you have python3 installed try running "
message(WARNING "SPIRV-Cross: Testing disabled. Could not find python3. If you have python3 installed try running "
"cmake with -DPYTHON_EXECUTABLE:FILEPATH=/path/to/python3 to help it find the executable")
endif()
endif()

11
deps/SPIRV-Cross/CODE_OF_CONDUCT.adoc vendored Normal file
View File

@ -0,0 +1,11 @@
// Copyright (c) 2016-2020 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0
= Code of Conduct
A reminder that this issue tracker is managed by the Khronos Group.
Interactions here should follow the
https://www.khronos.org/developers/code-of-conduct[Khronos Code of Conduct],
which prohibits aggressive or derogatory language. Please keep the
discussion friendly and civil.

View File

@ -1 +0,0 @@
A reminder that this issue tracker is managed by the Khronos Group. Interactions here should follow the Khronos Code of Conduct (https://www.khronos.org/developers/code-of-conduct), which prohibits aggressive or derogatory language. Please keep the discussion friendly and civil.

View File

@ -1,27 +1,10 @@
/*
** Copyright (c) 2014-2016 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and/or associated documentation files (the "Materials"),
** to deal in the Materials without restriction, including without limitation
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
** and/or sell copies of the Materials, and to permit persons to whom the
** Materials are furnished to do so, subject to the following conditions:
**
** The above copyright notice and this permission notice shall be included in
** all copies or substantial portions of the Materials.
**
** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
** IN THE MATERIALS.
* Copyright 2014-2016,2021 The Khronos Group, Inc.
* SPDX-License-Identifier: MIT
*
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
* STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
* HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
*/
#ifndef GLSLstd450_H

208
deps/SPIRV-Cross/LICENSES/Apache-2.0.txt vendored Normal file
View File

@ -0,0 +1,208 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION,
AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution
as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct
or indirect, to cause the direction or management of such entity, whether
by contract or otherwise, or (ii) ownership of fifty percent (50%) or more
of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions
granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled object
code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that
is included in or attached to the work (an example is provided in the Appendix
below).
"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative
Works shall not include works that remain separable from, or merely link (or
bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative
Works thereof, that is intentionally submitted to Licensor for inclusion in
the Work by the copyright owner or by an individual or Legal Entity authorized
to submit on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication
sent to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor
for the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently incorporated
within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this
License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
Derivative Works of, publicly display, publicly perform, sublicense, and distribute
the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License,
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, offer to sell, sell, import, and otherwise
transfer the Work, where such license applies only to those patent claims
licensable by such Contributor that are necessarily infringed by their Contribution(s)
alone or by combination of their Contribution(s) with the Work to which such
Contribution(s) was submitted. If You institute patent litigation against
any entity (including a cross-claim or counterclaim in a lawsuit) alleging
that the Work or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses granted to You
under this License for that Work shall terminate as of the date such litigation
is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or
Derivative Works thereof in any medium, with or without modifications, and
in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy
of this License; and
(b) You must cause any modified files to carry prominent notices stating that
You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source
form of the Work, excluding those notices that do not pertain to any part
of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution,
then any Derivative Works that You distribute must include a readable copy
of the attribution notices contained within such NOTICE file, excluding those
notices that do not pertain to any part of the Derivative Works, in at least
one of the following places: within a NOTICE text file distributed as part
of the Derivative Works; within the Source form or documentation, if provided
along with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works
that You distribute, alongside or as an addendum to the NOTICE text from the
Work, provided that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction,
or distribution of Your modifications, or for any such Derivative Works as
a whole, provided Your use, reproduction, and distribution of the Work otherwise
complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any
Contribution intentionally submitted for inclusion in the Work by You to the
Licensor shall be under the terms and conditions of this License, without
any additional terms or conditions. Notwithstanding the above, nothing herein
shall supersede or modify the terms of any separate license agreement you
may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names,
trademarks, service marks, or product names of the Licensor, except as required
for reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to
in writing, Licensor provides the Work (and each Contributor provides its
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied, including, without limitation, any warranties
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness
of using or redistributing the Work and assume any risks associated with Your
exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether
in tort (including negligence), contract, or otherwise, unless required by
applicable law (such as deliberate and grossly negligent acts) or agreed to
in writing, shall any Contributor be liable to You for damages, including
any direct, indirect, special, incidental, or consequential damages of any
character arising as a result of this License or out of the use or inability
to use the Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all other commercial
damages or losses), even if such Contributor has been advised of the possibility
of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work
or Derivative Works thereof, You may choose to offer, and charge a fee for,
acceptance of support, warranty, indemnity, or other liability obligations
and/or rights consistent with this License. However, in accepting such obligations,
You may act only on Your own behalf and on Your sole responsibility, not on
behalf of any other Contributor, and only if You agree to indemnify, defend,
and hold each Contributor harmless for any liability incurred by, or claims
asserted against, such Contributor by reason of your accepting any such warranty
or additional liability. END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own identifying
information. (Don't include the brackets!) The text should be enclosed in
the appropriate comment syntax for the file format. We also recommend that
a file or class name and description of purpose be included on the same "printed
page" as the copyright notice for easier identification within third-party
archives.
Copyright [yyyy] [name of copyright owner]
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.

324
deps/SPIRV-Cross/LICENSES/CC-BY-4.0.txt vendored Normal file
View File

@ -0,0 +1,324 @@
Creative Commons Attribution 4.0 International Creative Commons Corporation
("Creative Commons") is not a law firm and does not provide legal services
or legal advice. Distribution of Creative Commons public licenses does not
create a lawyer-client or other relationship. Creative Commons makes its licenses
and related information available on an "as-is" basis. Creative Commons gives
no warranties regarding its licenses, any material licensed under their terms
and conditions, or any related information. Creative Commons disclaims all
liability for damages resulting from their use to the fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions
that creators and other rights holders may use to share original works of
authorship and other material subject to copyright and certain other rights
specified in the public license below. The following considerations are for
informational purposes only, are not exhaustive, and do not form part of our
licenses.
Considerations for licensors: Our public licenses are intended for use by
those authorized to give the public permission to use material in ways otherwise
restricted by copyright and certain other rights. Our licenses are irrevocable.
Licensors should read and understand the terms and conditions of the license
they choose before applying it. Licensors should also secure all rights necessary
before applying our licenses so that the public can reuse the material as
expected. Licensors should clearly mark any material not subject to the license.
This includes other CC-licensed material, or material used under an exception
or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public licenses, a licensor
grants the public permission to use the licensed material under specified
terms and conditions. If the licensor's permission is not necessary for any
reasonfor example, because of any applicable exception or limitation to copyrightthen
that use is not regulated by the license. Our licenses grant only permissions
under copyright and certain other rights that a licensor has authority to
grant. Use of the licensed material may still be restricted for other reasons,
including because others have copyright or other rights in the material. A
licensor may make special requests, such as asking that all changes be marked
or described. Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations for the public
: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution
4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to
be bound by the terms and conditions of this Creative Commons Attribution
4.0 International Public License ("Public License"). To the extent this Public
License may be interpreted as a contract, You are granted the Licensed Rights
in consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the Licensor
receives from making the Licensed Material available under these terms and
conditions.
Section 1 Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights
that is derived from or based upon the Licensed Material and in which the
Licensed Material is translated, altered, arranged, transformed, or otherwise
modified in a manner requiring permission under the Copyright and Similar
Rights held by the Licensor. For purposes of this Public License, where the
Licensed Material is a musical work, performance, or sound recording, Adapted
Material is always produced where the Licensed Material is synched in timed
relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar
Rights in Your contributions to Adapted Material in accordance with the terms
and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights closely
related to copyright including, without limitation, performance, broadcast,
sound recording, and Sui Generis Database Rights, without regard to how the
rights are labeled or categorized. For purposes of this Public License, the
rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
d. Effective Technological Measures means those measures that, in the absence
of proper authority, may not be circumvented under laws fulfilling obligations
under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996,
and/or similar international agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or any other
exception or limitation to Copyright and Similar Rights that applies to Your
use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database, or other
material to which the Licensor applied this Public License.
g. Licensed Rights means the rights granted to You subject to the terms and
conditions of this Public License, which are limited to all Copyright and
Similar Rights that apply to Your use of the Licensed Material and that the
Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights under this
Public License.
i. Share means to provide material to the public by any means or process that
requires permission under the Licensed Rights, such as reproduction, public
display, public performance, distribution, dissemination, communication, or
importation, and to make material available to the public including in ways
that members of the public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright resulting
from Directive 96/9/EC of the European Parliament and of the Council of 11
March 1996 on the legal protection of databases, as amended and/or succeeded,
as well as other essentially equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights under
this Public License. Your has a corresponding meaning.
Section 2 Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor
hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive,
irrevocable license to exercise the Licensed Rights in the Licensed Material
to:
A. reproduce and Share the Licensed Material, in whole or in part; and
B. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions
and Limitations apply to Your use, this Public License does not apply, and
You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes
You to exercise the Licensed Rights in all media and formats whether now known
or hereafter created, and to make technical modifications necessary to do
so. The Licensor waives and/or agrees not to assert any right or authority
to forbid You from making technical modifications necessary to exercise the
Licensed Rights, including technical modifications necessary to circumvent
Effective Technological Measures. For purposes of this Public License, simply
making modifications authorized by this Section 2(a)(4) never produces Adapted
Material.
5. Downstream recipients.
A. Offer from the Licensor Licensed Material. Every recipient of the Licensed
Material automatically receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this Public License.
B. No downstream restrictions. You may not offer or impose any additional
or different terms or conditions on, or apply any Effective Technological
Measures to, the Licensed Material if doing so restricts exercise of the Licensed
Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed
as permission to assert or imply that You are, or that Your use of the Licensed
Material is, connected with, or sponsored, endorsed, or granted official status
by, the Licensor or others designated to receive attribution as provided in
Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this
Public License, nor are publicity, privacy, and/or other similar personality
rights; however, to the extent possible, the Licensor waives and/or agrees
not to assert any such rights held by the Licensor to the limited extent necessary
to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties
from You for the exercise of the Licensed Rights, whether directly or through
a collecting society under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly reserves any right
to collect such royalties.
Section 3 License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following
conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed
Material:
i. identification of the creator(s) of the Licensed Material and any others
designated to receive attribution, in any reasonable manner requested by the
Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication
of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and
include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner
based on the medium, means, and context in which You Share the Licensed Material.
For example, it may be reasonable to satisfy the conditions by providing a
URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required
by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You apply
must not prevent recipients of the Adapted Material from complying with this
Public License.
Section 4 Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to
Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract,
reuse, reproduce, and Share all or a substantial portion of the contents of
the database;
b. if You include all or a substantial portion of the database contents in
a database in which You have Sui Generis Database Rights, then the database
in which You have Sui Generis Database Rights (but not its individual contents)
is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or
a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace
Your obligations under this Public License where the Licensed Rights include
other Copyright and Similar Rights.
Section 5 Disclaimer of Warranties and Limitation of Liability.
a. Unless otherwise separately undertaken by the Licensor, to the extent possible,
the Licensor offers the Licensed Material as-is and as-available, and makes
no representations or warranties of any kind concerning the Licensed Material,
whether express, implied, statutory, or other. This includes, without limitation,
warranties of title, merchantability, fitness for a particular purpose, non-infringement,
absence of latent or other defects, accuracy, or the presence or absence of
errors, whether or not known or discoverable. Where disclaimers of warranties
are not allowed in full or in part, this disclaimer may not apply to You.
b. To the extent possible, in no event will the Licensor be liable to You
on any legal theory (including, without limitation, negligence) or otherwise
for any direct, special, indirect, incidental, consequential, punitive, exemplary,
or other losses, costs, expenses, or damages arising out of this Public License
or use of the Licensed Material, even if the Licensor has been advised of
the possibility of such losses, costs, expenses, or damages. Where a limitation
of liability is not allowed in full or in part, this limitation may not apply
to You.
c. The disclaimer of warranties and limitation of liability provided above
shall be interpreted in a manner that, to the extent possible, most closely
approximates an absolute disclaimer and waiver of all liability.
Section 6 Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights
licensed here. However, if You fail to comply with this Public License, then
Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section
6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured
within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
c. For the avoidance of doubt, this Section 6(b) does not affect any right
the Licensor may have to seek remedies for Your violations of this Public
License.
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material
under separate terms or conditions or stop distributing the Licensed Material
at any time; however, doing so will not terminate this Public License.
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or
conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed
Material not stated herein are separate from and independent of the terms
and conditions of this Public License.
Section 8 Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not
be interpreted to, reduce, limit, restrict, or impose conditions on any use
of the Licensed Material that could lawfully be made without permission under
this Public License.
b. To the extent possible, if any provision of this Public License is deemed
unenforceable, it shall be automatically reformed to the minimum extent necessary
to make it enforceable. If the provision cannot be reformed, it shall be severed
from this Public License without affecting the enforceability of the remaining
terms and conditions.
c. No term or condition of this Public License will be waived and no failure
to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation
upon, or waiver of, any privileges and immunities that apply to the Licensor
or You, including from the legal processes of any jurisdiction or authority.
Creative Commons is not a party to its public licenses. Notwithstanding, Creative
Commons may elect to apply one of its public licenses to material it publishes
and in those instances will be considered the "Licensor." The text of the
Creative Commons public licenses is dedicated to the public domain under the
CC0 Public Domain Dedication. Except for the limited purpose of indicating
that material is shared under a Creative Commons public license or as otherwise
permitted by the Creative Commons policies published at creativecommons.org/policies,
Creative Commons does not authorize the use of the trademark "Creative Commons"
or any other trademark or logo of Creative Commons without its prior written
consent including, without limitation, in connection with any unauthorized
modifications to any of its public licenses or any other arrangements, understandings,
or agreements concerning use of licensed material. For the avoidance of doubt,
this paragraph does not form part of the public licenses.
Creative Commons may be contacted at creativecommons.org.

19
deps/SPIRV-Cross/LICENSES/MIT.txt vendored Normal file
View File

@ -0,0 +1,19 @@
MIT License Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,3 +1,6 @@
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
TARGET := spirv-cross
SOURCES := $(wildcard spirv_*.cpp)
@ -10,7 +13,7 @@ STATIC_LIB := lib$(TARGET).a
DEPS := $(OBJECTS:.o=.d) $(CLI_OBJECTS:.o=.d)
CXXFLAGS += -std=c++11 -Wall -Wextra -Wshadow
CXXFLAGS += -std=c++11 -Wall -Wextra -Wshadow -Wno-deprecated-declarations
ifeq ($(DEBUG), 1)
CXXFLAGS += -O0 -g

72
deps/SPIRV-Cross/Package.swift vendored Normal file
View File

@ -0,0 +1,72 @@
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
// Copyright 2016-2021 The Khronos Group Inc.
// SPDX-License-Identifier: Apache-2.0
import PackageDescription
let package = Package(
name: "SPIRV-Cross",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "SPIRV-Cross",
targets: ["SPIRV-Cross"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "SPIRV-Cross",
dependencies: [],
path: ".",
exclude: ["CMakeLists.txt",
"CODE_OF_CONDUCT.adoc",
"LICENSE",
"LICENSES",
"Makefile",
"README.md",
"appveyor.yml",
"build_glslang_spirv_tools.sh",
"checkout_glslang_spirv_tools.sh",
"cmake",
"format_all.sh",
"gn",
"main.cpp",
"pkg-config",
"reference",
"samples",
"shaders",
"shaders-hlsl",
"shaders-hlsl-no-opt",
"shaders-msl",
"shaders-msl-no-opt",
"shaders-no-opt",
"shaders-other",
"shaders-reflection",
"shaders-ue4",
"shaders-ue4-no-opt",
"test_shaders.py",
"test_shaders.sh",
"tests-other",
"update_test_shaders.sh"],
sources: ["spirv_cfg.cpp",
"spirv_cpp.cpp",
"spirv_cross.cpp",
"spirv_cross_c.cpp",
"spirv_cross_parsed_ir.cpp",
"spirv_cross_util.cpp",
"spirv_glsl.cpp",
"spirv_hlsl.cpp",
"spirv_msl.cpp",
"spirv_parser.cpp",
"spirv_reflect.cpp"],
publicHeadersPath: "."),
],
cxxLanguageStandard: .cxx14
)

View File

@ -1,17 +1,22 @@
<!--
Copyright 2020-2021 The Khronos Group, Inc.
SPDX-License-Identifier: CC-BY-4.0
-->
# SPIRV-Cross
SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages.
[![Build Status](https://travis-ci.org/KhronosGroup/SPIRV-Cross.svg?branch=master)](https://travis-ci.org/KhronosGroup/SPIRV-Cross)
[![Build Status](https://ci.appveyor.com/api/projects/status/github/KhronosGroup/SPIRV-Cross?svg=true&branch=master)](https://ci.appveyor.com/project/HansKristian-Work/SPIRV-Cross)
[![CI](https://github.com/KhronosGroup/SPIRV-Cross/actions/workflows/main.yml/badge.svg)](https://github.com/KhronosGroup/SPIRV-Cross/actions/workflows/main.yml)
[![Build Status](https://ci.appveyor.com/api/projects/status/github/KhronosGroup/SPIRV-Cross?svg=true&branch=main)](https://ci.appveyor.com/project/HansKristian-Work/SPIRV-Cross)
## Features
- Convert SPIR-V to readable, usable and efficient GLSL
- Convert SPIR-V to readable, usable and efficient Metal Shading Language (MSL)
- Convert SPIR-V to readable, usable and efficient HLSL
- Convert SPIR-V to a JSON reflection format
- Convert SPIR-V to debuggable C++ [DEPRECATED]
- Convert SPIR-V to a JSON reflection format [EXPERIMENTAL]
- Reflection API to simplify the creation of Vulkan pipeline layouts
- Reflection API to modify and tweak OpDecorations
- Supports "all" of vertex, fragment, tessellation, geometry and compute shaders.
@ -26,6 +31,10 @@ However, most missing features are expected to be "trivial" improvements at this
SPIRV-Cross has been tested on Linux, iOS/OSX, Windows and Android. CMake is the main build system.
### NOTE: main branch rename
On 2023-01-12, `master` was renamed to `main` as per Khronos policy.
### Linux and macOS
Building with CMake is recommended, as it is the only build system which is tested in continuous integration.
@ -52,6 +61,20 @@ The make and CMake build flavors offer the option to treat exceptions as asserti
You can use `-DSPIRV_CROSS_STATIC=ON/OFF` `-DSPIRV_CROSS_SHARED=ON/OFF` `-DSPIRV_CROSS_CLI=ON/OFF` to control which modules are built (and installed).
### Installing SPIRV-Cross (vcpkg)
Alternatively, you can build and install SPIRV-Cross using [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
```
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install spirv-cross
```
The SPIRV-Cross port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
## Usage
### Using the C++ API
@ -99,7 +122,7 @@ int main()
spirv_cross::CompilerGLSL::Options options;
options.version = 310;
options.es = true;
glsl.set_options(options);
glsl.set_common_options(options);
// Compile to GLSL, ready to give to GL driver.
std::string source = glsl.compile();
@ -161,12 +184,12 @@ for (i = 0; i < count; i++)
}
// Modify options.
spvc_compiler_create_compiler_options(context, &options);
spvc_compiler_create_compiler_options(compiler_glsl, &options);
spvc_compiler_options_set_uint(options, SPVC_COMPILER_OPTION_GLSL_VERSION, 330);
spvc_compiler_options_set_bool(options, SPVC_COMPILER_OPTION_GLSL_ES, SPVC_FALSE);
spvc_compiler_install_compiler_options(compiler_glsl, options);
spvc_compiler_compile(compiler, &result);
spvc_compiler_compile(compiler_glsl, &result);
printf("Cross-compiled source: %s\n", result);
// Frees all memory we allocated so far.
@ -321,7 +344,7 @@ compiler.set_name(varying_resource.base_type_id, "VertexFragmentLinkage");
```
Some platform may require identical variable name for both vertex outputs and fragment inputs. (for example MacOSX)
to rename varaible base on location, please add
to rename variable base on location, please add
```
--rename-interface-variable <in|out> <location> <new_variable_name>
```
@ -376,10 +399,28 @@ for (auto &remap : compiler->get_combined_image_samplers())
If your target is Vulkan GLSL, `--vulkan-semantics` will emit separate image samplers as you'd expect.
The command line client calls `Compiler::build_combined_image_samplers` automatically, but if you're calling the library, you'll need to do this yourself.
#### Descriptor sets (Vulkan GLSL) for backends which do not support them (HLSL/GLSL/Metal)
#### Descriptor sets (Vulkan GLSL) for backends which do not support them (pre HLSL 5.1 / GLSL)
Descriptor sets are unique to Vulkan, so make sure that descriptor set + binding is remapped to a flat binding scheme (set always 0), so that other APIs can make sense of the bindings.
This can be done with `Compiler::set_decoration(id, spv::DecorationDescriptorSet)`.
This can be done with `Compiler::set_decoration(id, spv::DecorationDescriptorSet)`. For other backends like MSL and HLSL, descriptor sets
can be used, with some minor caveats, see below.
##### MSL 2.0+
Metal supports indirect argument buffers (--msl-argument-buffers). In this case, descriptor sets become argument buffers,
and bindings are mapped to [[id(N)]] within the argument buffer. One quirk is that arrays of resources consume multiple ids,
where Vulkan does not. This can be worked around either from shader authoring stage
or remapping bindings as needed to avoid the overlap.
There is also a rich API to declare remapping schemes which is intended to work like
the pipeline layout in Vulkan. See `CompilerMSL::add_msl_resource_binding`. Remapping combined image samplers for example
must be split into two bindings in MSL, so it's possible to declare an id for the texture and sampler binding separately.
##### HLSL - SM 5.1+
In SM 5.1+, descriptor set bindings are interpreted as register spaces directly. In HLSL however, arrays of resources consume
multiple binding slots where Vulkan does not, so there might be overlap if the SPIR-V was not authored with this in mind.
This can be worked around either from shader authoring stage (don't assign overlapping bindings)
or remap bindings in SPIRV-Cross as needed to avoid the overlap.
#### Linking by name for targets which do not support explicit locations (legacy GLSL/ESSL)
@ -402,6 +443,29 @@ Y-flipping of gl_Position and similar is also supported.
The use of this is discouraged, because relying on vertex shader Y-flipping tends to get quite messy.
To enable this, set `CompilerGLSL::Options.vertex.flip_vert_y` or `--flip-vert-y` in CLI.
#### Reserved identifiers
When cross-compiling, certain identifiers are considered to be reserved by the implementation.
Code generated by SPIRV-Cross cannot emit these identifiers as they are reserved and used for various internal purposes,
and such variables will typically show up as `_RESERVED_IDENTIFIER_FIXUP_`
or some similar name to make it more obvious that an identifier has been renamed.
Reflection output will follow the exact name specified in the SPIR-V module. It might not be a valid identifier in the C sense,
as it may contain non-alphanumeric/non-underscore characters.
Reserved identifiers currently assumed by the implementation are (in pseudo-regex):
- _$digit+, e.g. `_100`, `_2`
- _$digit+_.+, e.g. `_100_tmp`, `_2_foobar`. `_2Bar` is **not** reserved.
- gl_- prefix
- spv- prefix
- SPIRV_Cross prefix. This prefix is generally used for interface variables where app needs to provide data for workaround purposes.
This identifier will not be rewritten, but be aware of potential collisions.
- Double underscores (reserved by all target languages).
Members of structs also have a reserved identifier:
- _m$digit+$END, e.g. `_m20` and `_m40` are reserved, but not `_m40Foobar`.
## Contributing
Contributions to SPIRV-Cross are welcome. See Testing and Licensing sections for details.
@ -416,9 +480,6 @@ All pull requests should ensure that test output does not change unexpectedly. T
```
./checkout_glslang_spirv_tools.sh # Checks out glslang and SPIRV-Tools at a fixed revision which matches the reference output.
# NOTE: Some users have reported problems cloning from git:// paths. To use https:// instead pass in
# $ PROTOCOL=https ./checkout_glslang_spirv_tools.sh
# instead.
./build_glslang_spirv_tools.sh # Builds glslang and SPIRV-Tools.
./test_shaders.sh # Runs over all changes and makes sure that there are no deltas compared to reference files.
```
@ -442,7 +503,7 @@ to update the reference files and include these changes as part of the pull requ
Always make sure you are running the correct version of glslangValidator as well as SPIRV-Tools when updating reference files.
See `checkout_glslang_spirv_tools.sh` which revisions are currently expected. The revisions change regularly.
In short, the master branch should always be able to run `./test_shaders.py shaders` and friends without failure.
In short, the main branch should always be able to run `./test_shaders.py shaders` and friends without failure.
SPIRV-Cross uses Travis CI to test all pull requests, so it is not strictly needed to perform testing yourself if you have problems running it locally.
A pull request which does not pass testing on Travis will not be accepted however.

View File

@ -1,3 +1,5 @@
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
environment:
matrix:

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
PROFILE=Release

View File

@ -1,14 +1,11 @@
#!/bin/bash
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
GLSLANG_REV=e291f7a09f6733f6634fe077a228056fabee881e
SPIRV_TOOLS_REV=89fe836fe22c3e5c2a062ebeade012e2c2f0839b
SPIRV_HEADERS_REV=c4f8f65792d4bf2657ca751904c511bbcf2ac77b
if [ -z $PROTOCOL ]; then
PROTOCOL=git
fi
echo "Using protocol \"$PROTOCOL\" for checking out repositories. If this is problematic, try PROTOCOL=https $0."
GLSLANG_REV=06a7078ce74ab5c7801a165b8145859678831fb8
SPIRV_TOOLS_REV=f62e121b0df5374d1f043d1fbda98467406af0b1
SPIRV_HEADERS_REV=d13b52222c39a7e9a401b44646f0ca3a640fbd47
PROTOCOL=https
if [ -d external/glslang ]; then
echo "Updating glslang to revision $GLSLANG_REV."
@ -41,7 +38,7 @@ fi
if [ -d external/spirv-headers ]; then
cd external/spirv-headers
git pull origin master
git fetch origin
git checkout $SPIRV_HEADERS_REV
cd ../..
else

View File

@ -1,3 +1,6 @@
// Copyright 2016-2021 The Khronos Group Inc.
// SPDX-License-Identifier: Apache-2.0
#ifndef SPIRV_CROSS_GIT_VERSION_H_
#define SPIRV_CROSS_GIT_VERSION_H_

View File

@ -1,4 +1,6 @@
#!/bin/bash
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
#for file in spirv_*.{cpp,hpp} include/spirv_cross/*.{hpp,h} samples/cpp/*.cpp main.cpp
for file in spirv_*.{cpp,hpp} main.cpp

68
deps/SPIRV-Cross/gn/BUILD.gn vendored Normal file
View File

@ -0,0 +1,68 @@
# Copyright (C) 2019 Google, Inc.
# SPDX-License-Identifier: Apache-2.0
#
# 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.
#
config("spirv_cross_public") {
include_dirs = [ ".." ]
defines = [ "SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" ]
}
source_set("spirv_cross_sources") {
public_configs = [ ":spirv_cross_public" ]
sources = [
"../GLSL.std.450.h",
"../spirv.hpp",
"../spirv_cfg.cpp",
"../spirv_cfg.hpp",
"../spirv_common.hpp",
"../spirv_cross.cpp",
"../spirv_cross.hpp",
"../spirv_cross_containers.hpp",
"../spirv_cross_error_handling.hpp",
"../spirv_cross_parsed_ir.cpp",
"../spirv_cross_parsed_ir.hpp",
"../spirv_cross_util.cpp",
"../spirv_cross_util.hpp",
"../spirv_glsl.cpp",
"../spirv_glsl.hpp",
"../spirv_hlsl.cpp",
"../spirv_hlsl.hpp",
"../spirv_msl.cpp",
"../spirv_msl.hpp",
"../spirv_parser.cpp",
"../spirv_parser.hpp",
"../spirv_reflect.cpp",
"../spirv_reflect.hpp",
]
if (!is_win) {
cflags = [ "-fno-exceptions" ]
}
if (is_clang) {
cflags_cc = [
"-Wno-extra-semi",
"-Wno-ignored-qualifiers",
"-Wno-implicit-fallthrough",
"-Wno-inconsistent-missing-override",
"-Wno-missing-field-initializers",
"-Wno-newline-eof",
"-Wno-sign-compare",
"-Wno-unused-variable",
]
}
}

View File

@ -1,5 +1,6 @@
/*
* Copyright 2015-2017 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,5 +1,6 @@
/*
* Copyright 2015-2017 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,5 +1,6 @@
/*
* Copyright 2015-2017 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,5 +1,6 @@
/*
* Copyright 2015-2017 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@ -1,5 +1,6 @@
/*
* Copyright 2015-2017 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -85,7 +86,7 @@ struct sampler2DBase : spirv_cross_sampler_2d
std::vector<spirv_cross_miplevel> mips;
spirv_cross_format format;
spirv_cross_wrap wrap_s;
spirv_cross_format wrap_t;
spirv_cross_wrap wrap_t;
spirv_cross_filter min_filter;
spirv_cross_filter mag_filter;
spirv_cross_mipfilter mip_filter;

View File

@ -1,5 +1,6 @@
/*
* Copyright 2015-2017 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,11 @@
# Copyright 2020-2021 Hans-Kristian Arntzen
# SPDX-License-Identifier: Apache-2.0
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@SPIRV_CROSS_INSTALL_LIB_DIR@
sharedlibdir=@SPIRV_CROSS_INSTALL_LIB_DIR@
includedir=@SPIRV_CROSS_INSTALL_INC_DIR@
exec_prefix=${prefix}
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
sharedlibdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/spirv_cross
Name: spirv-cross-c-shared
Description: C API for SPIRV-Cross

View File

@ -0,0 +1,20 @@
RWByteAddressBuffer _5 : register(u0);
RWByteAddressBuffer _6 : register(u1);
void comp_main()
{
_6.Store4(0, uint4(bool4(int(_5.Load4(16).x) < int4(_5.Load4(0)).x, int(_5.Load4(16).y) < int4(_5.Load4(0)).y, int(_5.Load4(16).z) < int4(_5.Load4(0)).z, int(_5.Load4(16).w) < int4(_5.Load4(0)).w)));
_6.Store4(0, uint4(bool4(int(_5.Load4(16).x) <= int4(_5.Load4(0)).x, int(_5.Load4(16).y) <= int4(_5.Load4(0)).y, int(_5.Load4(16).z) <= int4(_5.Load4(0)).z, int(_5.Load4(16).w) <= int4(_5.Load4(0)).w)));
_6.Store4(0, uint4(bool4(_5.Load4(16).x < uint(int4(_5.Load4(0)).x), _5.Load4(16).y < uint(int4(_5.Load4(0)).y), _5.Load4(16).z < uint(int4(_5.Load4(0)).z), _5.Load4(16).w < uint(int4(_5.Load4(0)).w))));
_6.Store4(0, uint4(bool4(_5.Load4(16).x <= uint(int4(_5.Load4(0)).x), _5.Load4(16).y <= uint(int4(_5.Load4(0)).y), _5.Load4(16).z <= uint(int4(_5.Load4(0)).z), _5.Load4(16).w <= uint(int4(_5.Load4(0)).w))));
_6.Store4(0, uint4(bool4(int(_5.Load4(16).x) > int4(_5.Load4(0)).x, int(_5.Load4(16).y) > int4(_5.Load4(0)).y, int(_5.Load4(16).z) > int4(_5.Load4(0)).z, int(_5.Load4(16).w) > int4(_5.Load4(0)).w)));
_6.Store4(0, uint4(bool4(int(_5.Load4(16).x) >= int4(_5.Load4(0)).x, int(_5.Load4(16).y) >= int4(_5.Load4(0)).y, int(_5.Load4(16).z) >= int4(_5.Load4(0)).z, int(_5.Load4(16).w) >= int4(_5.Load4(0)).w)));
_6.Store4(0, uint4(bool4(_5.Load4(16).x > uint(int4(_5.Load4(0)).x), _5.Load4(16).y > uint(int4(_5.Load4(0)).y), _5.Load4(16).z > uint(int4(_5.Load4(0)).z), _5.Load4(16).w > uint(int4(_5.Load4(0)).w))));
_6.Store4(0, uint4(bool4(_5.Load4(16).x >= uint(int4(_5.Load4(0)).x), _5.Load4(16).y >= uint(int4(_5.Load4(0)).y), _5.Load4(16).z >= uint(int4(_5.Load4(0)).z), _5.Load4(16).w >= uint(int4(_5.Load4(0)).w))));
}
[numthreads(1, 1, 1)]
void main()
{
comp_main();
}

View File

@ -4,22 +4,16 @@ struct A
int b;
};
struct A_1
{
int a;
int b;
};
RWByteAddressBuffer C1 : register(u1);
cbuffer C2 : register(b2)
{
A_1 C2_1_Data[1024] : packoffset(c0);
A C2_1_Data[1024] : packoffset(c0);
};
RWByteAddressBuffer C3 : register(u0);
cbuffer B : register(b3)
{
A_1 C4_Data[1024] : packoffset(c0);
A C4_Data[1024] : packoffset(c0);
};

View File

@ -3,18 +3,27 @@ RWByteAddressBuffer foo : register(u1);
void comp_main()
{
[unroll]
for (int _135 = 0; _135 < 16; )
{
bar.Store4(_135 * 16 + 0, asuint(asfloat(foo.Load4(_135 * 16 + 0))));
_135++;
continue;
}
bar.Store4(0, asuint(asfloat(foo.Load4(0))));
bar.Store4(16, asuint(asfloat(foo.Load4(16))));
bar.Store4(32, asuint(asfloat(foo.Load4(32))));
bar.Store4(48, asuint(asfloat(foo.Load4(48))));
bar.Store4(64, asuint(asfloat(foo.Load4(64))));
bar.Store4(80, asuint(asfloat(foo.Load4(80))));
bar.Store4(96, asuint(asfloat(foo.Load4(96))));
bar.Store4(112, asuint(asfloat(foo.Load4(112))));
bar.Store4(128, asuint(asfloat(foo.Load4(128))));
bar.Store4(144, asuint(asfloat(foo.Load4(144))));
bar.Store4(160, asuint(asfloat(foo.Load4(160))));
bar.Store4(176, asuint(asfloat(foo.Load4(176))));
bar.Store4(192, asuint(asfloat(foo.Load4(192))));
bar.Store4(208, asuint(asfloat(foo.Load4(208))));
bar.Store4(224, asuint(asfloat(foo.Load4(224))));
bar.Store4(240, asuint(asfloat(foo.Load4(240))));
[loop]
for (int _136 = 0; _136 < 16; )
for (int _137 = 0; _137 < 16; )
{
bar.Store4((15 - _136) * 16 + 0, asuint(asfloat(foo.Load4(_136 * 16 + 0))));
_136++;
bar.Store4((15 - _137) * 16 + 0, asuint(asfloat(foo.Load4(_137 * 16 + 0))));
_137++;
continue;
}
[branch]

View File

@ -0,0 +1,30 @@
RWByteAddressBuffer _4 : register(u0);
void comp_main()
{
_4.Store(0, asuint(min(asfloat(_4.Load(48)), asfloat(_4.Load(96)))));
_4.Store2(8, asuint(min(asfloat(_4.Load2(56)), asfloat(_4.Load2(104)))));
_4.Store3(16, asuint(min(asfloat(_4.Load3(64)), asfloat(_4.Load3(112)))));
_4.Store4(32, asuint(min(asfloat(_4.Load4(80)), asfloat(_4.Load4(128)))));
_4.Store(0, asuint(max(asfloat(_4.Load(48)), asfloat(_4.Load(96)))));
_4.Store2(8, asuint(max(asfloat(_4.Load2(56)), asfloat(_4.Load2(104)))));
_4.Store3(16, asuint(max(asfloat(_4.Load3(64)), asfloat(_4.Load3(112)))));
_4.Store4(32, asuint(max(asfloat(_4.Load4(80)), asfloat(_4.Load4(128)))));
_4.Store(0, asuint(clamp(asfloat(_4.Load(0)), asfloat(_4.Load(48)), asfloat(_4.Load(96)))));
_4.Store2(8, asuint(clamp(asfloat(_4.Load2(8)), asfloat(_4.Load2(56)), asfloat(_4.Load2(104)))));
_4.Store3(16, asuint(clamp(asfloat(_4.Load3(16)), asfloat(_4.Load3(64)), asfloat(_4.Load3(112)))));
_4.Store4(32, asuint(clamp(asfloat(_4.Load4(32)), asfloat(_4.Load4(80)), asfloat(_4.Load4(128)))));
for (int _139 = 0; _139 < 2; )
{
_4.Store2(8, asuint(min(asfloat(_4.Load2(56)), asfloat(_4.Load2(104)))));
_4.Store(0, asuint(clamp(asfloat(_4.Load(0)), asfloat(_4.Load(56)), asfloat(_4.Load(60)))));
_139++;
continue;
}
}
[numthreads(1, 1, 1)]
void main()
{
comp_main();
}

View File

@ -8,7 +8,7 @@ struct SPIRV_Cross_Output
int2 Size : SV_Target0;
};
uint2 SPIRV_Cross_textureSize(Texture2D<float4> Tex, uint Level, out uint Param)
uint2 spvTextureSize(Texture2D<float4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(Level, ret.x, ret.y, Param);
@ -19,7 +19,7 @@ void frag_main()
{
uint _19_dummy_parameter;
uint _20_dummy_parameter;
Size = int2(SPIRV_Cross_textureSize(uTexture, uint(0), _19_dummy_parameter)) + int2(SPIRV_Cross_textureSize(uTexture, uint(1), _20_dummy_parameter));
Size = int2(spvTextureSize(uTexture, uint(0), _19_dummy_parameter)) + int2(spvTextureSize(uTexture, uint(1), _20_dummy_parameter));
}
SPIRV_Cross_Output main()

View File

@ -7,7 +7,7 @@ struct SPIRV_Cross_Output
void frag_main()
{
FragColor = float3(asfloat(0x7f800000u), asfloat(0xff800000u), asfloat(0x7fc00000u));
FragColor = float3(asfloat(0x7f800000u /* inf */), asfloat(0xff800000u /* -inf */), asfloat(0x7fc00000u /* nan */));
}
SPIRV_Cross_Output main()

View File

@ -14,14 +14,12 @@ struct SPIRV_Cross_Output
#line 8 "test.frag"
void frag_main()
{
float _80;
#line 8 "test.frag"
FragColor = 1.0f;
#line 9 "test.frag"
FragColor = 2.0f;
#line 10 "test.frag"
_80 = vColor;
if (_80 < 0.0f)
if (vColor < 0.0f)
{
#line 12 "test.frag"
FragColor = 3.0f;
@ -31,16 +29,19 @@ void frag_main()
#line 16 "test.frag"
FragColor = 4.0f;
}
for (int _126 = 0; float(_126) < (40.0f + _80); )
#line 19 "test.frag"
for (int _127 = 0; float(_127) < (40.0f + vColor); )
{
#line 21 "test.frag"
FragColor += 0.20000000298023223876953125f;
#line 22 "test.frag"
FragColor += 0.300000011920928955078125f;
_126 += (int(_80) + 5);
#line 19 "test.frag"
_127 += (int(vColor) + 5);
continue;
}
switch (int(_80))
#line 25 "test.frag"
switch (int(vColor))
{
case 0:
{
@ -66,7 +67,8 @@ void frag_main()
}
for (;;)
{
FragColor += (10.0f + _80);
#line 42 "test.frag"
FragColor += (10.0f + vColor);
#line 43 "test.frag"
if (FragColor < 100.0f)
{
@ -76,6 +78,7 @@ void frag_main()
break;
}
}
#line 48 "test.frag"
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)

View File

@ -0,0 +1,19 @@
static float4 FragColor;
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
};
void frag_main()
{
FragColor = float4(18.0f, 52.0f, 1.0f, 1.0f);
}
SPIRV_Cross_Output main()
{
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}

View File

@ -55,6 +55,7 @@ void frag_main()
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
gl_FragCoord = stage_input.gl_FragCoord;
gl_FragCoord.w = 1.0 / gl_FragCoord.w;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.o_color = o_color;

View File

@ -22,6 +22,7 @@ void frag_main()
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
gl_FragCoord = stage_input.gl_FragCoord;
gl_FragCoord.w = 1.0 / gl_FragCoord.w;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;

View File

@ -8,10 +8,7 @@ static const int _20 = (_7 + 2);
#endif
static const uint _8 = SPIRV_CROSS_CONSTANT_ID_202;
static const uint _25 = (_8 % 5u);
#ifndef SPIRV_CROSS_CONSTANT_ID_0
#define SPIRV_CROSS_CONSTANT_ID_0 int4(20, 30, _20, _20)
#endif
static const int4 _30 = SPIRV_CROSS_CONSTANT_ID_0;
static const int4 _30 = int4(20, 30, _20, _20);
static const int2 _32 = int2(_30.y, _30.x);
static const int _33 = _30.y;
@ -28,9 +25,8 @@ void vert_main()
{
float4 _63 = 0.0f.xxxx;
_63.y = float(_20);
float4 _66 = _63;
_66.z = float(_25);
float4 _52 = _66 + float4(_30);
_63.z = float(_25);
float4 _52 = _63 + float4(_30);
float2 _56 = _52.xy + float2(_32);
gl_Position = float4(_56.x, _56.y, _52.z, _52.w);
_4 = _33;

View File

@ -0,0 +1,108 @@
struct Baz
{
float c;
};
struct Bar
{
float d[2][4];
Baz baz[2];
};
struct Foo
{
column_major float2x2 a;
float2 b;
Bar c[5];
};
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _31 : register(u0);
void comp_main()
{
Foo _36;
_36.a = asfloat(uint2x2(_31.Load(0), _31.Load(8), _31.Load(4), _31.Load(12)));
_36.b = asfloat(_31.Load2(16));
[unroll]
for (int _4ident = 0; _4ident < 5; _4ident++)
{
[unroll]
for (int _5ident = 0; _5ident < 2; _5ident++)
{
[unroll]
for (int _6ident = 0; _6ident < 4; _6ident++)
{
_36.c[_4ident].d[_5ident][_6ident] = asfloat(_31.Load(_6ident * 4 + _5ident * 16 + _4ident * 40 + 24));
}
}
[unroll]
for (int _7ident = 0; _7ident < 2; _7ident++)
{
_36.c[_4ident].baz[_7ident].c = asfloat(_31.Load(_7ident * 4 + _4ident * 40 + 56));
}
}
float2x2 _234 = float2x2(_36.a[0] + 1.0f.xx, _36.a[1] + 1.0f.xx);
_31.Store(224, asuint(_234[0].x));
_31.Store(228, asuint(_234[1].x));
_31.Store(232, asuint(_234[0].y));
_31.Store(236, asuint(_234[1].y));
_31.Store2(240, asuint(_36.b + 2.0f.xx));
_31.Store(248, asuint(_36.c[0].d[0][0]));
_31.Store(252, asuint(_36.c[0].d[0][1]));
_31.Store(256, asuint(_36.c[0].d[0][2]));
_31.Store(260, asuint(_36.c[0].d[0][3]));
_31.Store(264, asuint(_36.c[0].d[1][0]));
_31.Store(268, asuint(_36.c[0].d[1][1]));
_31.Store(272, asuint(_36.c[0].d[1][2]));
_31.Store(276, asuint(_36.c[0].d[1][3]));
_31.Store(280, asuint(_36.c[0].baz[0].c));
_31.Store(284, asuint(_36.c[0].baz[1].c));
_31.Store(288, asuint(_36.c[1].d[0][0]));
_31.Store(292, asuint(_36.c[1].d[0][1]));
_31.Store(296, asuint(_36.c[1].d[0][2]));
_31.Store(300, asuint(_36.c[1].d[0][3]));
_31.Store(304, asuint(_36.c[1].d[1][0]));
_31.Store(308, asuint(_36.c[1].d[1][1]));
_31.Store(312, asuint(_36.c[1].d[1][2]));
_31.Store(316, asuint(_36.c[1].d[1][3]));
_31.Store(320, asuint(_36.c[1].baz[0].c));
_31.Store(324, asuint(_36.c[1].baz[1].c));
_31.Store(328, asuint(_36.c[2].d[0][0]));
_31.Store(332, asuint(_36.c[2].d[0][1]));
_31.Store(336, asuint(_36.c[2].d[0][2]));
_31.Store(340, asuint(_36.c[2].d[0][3]));
_31.Store(344, asuint(_36.c[2].d[1][0]));
_31.Store(348, asuint(_36.c[2].d[1][1]));
_31.Store(352, asuint(_36.c[2].d[1][2]));
_31.Store(356, asuint(_36.c[2].d[1][3]));
_31.Store(360, asuint(_36.c[2].baz[0].c));
_31.Store(364, asuint(_36.c[2].baz[1].c));
_31.Store(368, asuint(_36.c[3].d[0][0]));
_31.Store(372, asuint(_36.c[3].d[0][1]));
_31.Store(376, asuint(_36.c[3].d[0][2]));
_31.Store(380, asuint(_36.c[3].d[0][3]));
_31.Store(384, asuint(_36.c[3].d[1][0]));
_31.Store(388, asuint(_36.c[3].d[1][1] + 5.0f));
_31.Store(392, asuint(_36.c[3].d[1][2]));
_31.Store(396, asuint(_36.c[3].d[1][3]));
_31.Store(400, asuint(_36.c[3].baz[0].c));
_31.Store(404, asuint(_36.c[3].baz[1].c));
_31.Store(408, asuint(_36.c[4].d[0][0]));
_31.Store(412, asuint(_36.c[4].d[0][1]));
_31.Store(416, asuint(_36.c[4].d[0][2]));
_31.Store(420, asuint(_36.c[4].d[0][3]));
_31.Store(424, asuint(_36.c[4].d[1][0]));
_31.Store(428, asuint(_36.c[4].d[1][1]));
_31.Store(432, asuint(_36.c[4].d[1][2]));
_31.Store(436, asuint(_36.c[4].d[1][3]));
_31.Store(440, asuint(_36.c[4].baz[0].c));
_31.Store(444, asuint(_36.c[4].baz[1].c));
}
[numthreads(1, 1, 1)]
void main()
{
comp_main();
}

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer wo : register(u1);
ByteAddressBuffer ro : register(t0);

View File

@ -0,0 +1,23 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer wo : register(u1);
RWByteAddressBuffer ro : register(u0);
static uint3 gl_GlobalInvocationID;
struct SPIRV_Cross_Input
{
uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
};
void comp_main()
{
wo.Store4(gl_GlobalInvocationID.x * 64 + 272, asuint(asfloat(ro.Load4(gl_GlobalInvocationID.x * 64 + 160))));
wo.Store4(gl_GlobalInvocationID.x * 16 + 480, asuint(asfloat(ro.Load4(gl_GlobalInvocationID.x * 16 + 480))));
}
[numthreads(1, 1, 1)]
void main(SPIRV_Cross_Input stage_input)
{
gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
comp_main();
}

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer WriteOnly : register(u2);
ByteAddressBuffer ReadOnly : register(t0);
RWByteAddressBuffer ReadWrite : register(u1);

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer ssbo : register(u2);
RWTexture2D<uint> uImage : register(u0);
RWTexture2D<int> iImage : register(u1);

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
globallycoherent RWByteAddressBuffer _29 : register(u3);
ByteAddressBuffer _33 : register(t2);
RWTexture2D<float> uImageIn : register(u0);

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWTexture2D<float> uImageInF : register(u0);
RWTexture2D<float> uImageOutF : register(u1);
RWTexture2D<int> uImageInI : register(u2);

View File

@ -0,0 +1,66 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
Texture2D<float4> uImageInF : register(t0);
RWTexture2D<float> uImageOutF : register(u1);
Texture2D<int4> uImageInI : register(t2);
RWTexture2D<int> uImageOutI : register(u3);
Texture2D<uint4> uImageInU : register(t4);
RWTexture2D<uint> uImageOutU : register(u5);
Buffer<float4> uImageInBuffer : register(t6);
RWBuffer<float> uImageOutBuffer : register(u7);
Texture2D<float4> uImageInF2 : register(t8);
RWTexture2D<float2> uImageOutF2 : register(u9);
Texture2D<int4> uImageInI2 : register(t10);
RWTexture2D<int2> uImageOutI2 : register(u11);
Texture2D<uint4> uImageInU2 : register(t12);
RWTexture2D<uint2> uImageOutU2 : register(u13);
Buffer<float4> uImageInBuffer2 : register(t14);
RWBuffer<float2> uImageOutBuffer2 : register(u15);
Texture2D<float4> uImageInF4 : register(t16);
RWTexture2D<float4> uImageOutF4 : register(u17);
Texture2D<int4> uImageInI4 : register(t18);
RWTexture2D<int4> uImageOutI4 : register(u19);
Texture2D<uint4> uImageInU4 : register(t20);
RWTexture2D<uint4> uImageOutU4 : register(u21);
Buffer<float4> uImageInBuffer4 : register(t22);
RWBuffer<float4> uImageOutBuffer4 : register(u23);
RWTexture2D<float4> uImageNoFmtF : register(u24);
RWTexture2D<uint4> uImageNoFmtU : register(u25);
RWTexture2D<int4> uImageNoFmtI : register(u26);
static uint3 gl_GlobalInvocationID;
struct SPIRV_Cross_Input
{
uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
};
void comp_main()
{
int2 _23 = int2(gl_GlobalInvocationID.xy);
uImageOutF[_23] = uImageInF[_23].x;
uImageOutI[_23] = uImageInI[_23].x;
uImageOutU[_23] = uImageInU[_23].x;
int _74 = int(gl_GlobalInvocationID.x);
uImageOutBuffer[_74] = uImageInBuffer[_74].x;
uImageOutF2[_23] = uImageInF2[_23].xy;
uImageOutI2[_23] = uImageInI2[_23].xy;
uImageOutU2[_23] = uImageInU2[_23].xy;
float4 _135 = uImageInBuffer2[_74];
uImageOutBuffer2[_74] = _135.xy;
uImageOutF4[_23] = uImageInF4[_23];
int4 _165 = uImageInI4[_23];
uImageOutI4[_23] = _165;
uint4 _180 = uImageInU4[_23];
uImageOutU4[_23] = _180;
uImageOutBuffer4[_74] = uImageInBuffer4[_74];
uImageNoFmtF[_23] = _135;
uImageNoFmtU[_23] = _180;
uImageNoFmtI[_23] = _165;
}
[numthreads(1, 1, 1)]
void main(SPIRV_Cross_Input stage_input)
{
gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
comp_main();
}

View File

@ -1,9 +1,11 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _15 : register(u0);
ByteAddressBuffer _20 : register(t1);
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
// adjoint and dividing by the determinant. The contents of the matrix are changed.
float2x2 SPIRV_Cross_Inverse(float2x2 m)
float2x2 spvInverse(float2x2 m)
{
float2x2 adj; // The adjoint matrix (inverse after dividing by determinant)
@ -23,29 +25,29 @@ float2x2 SPIRV_Cross_Inverse(float2x2 m)
}
// Returns the determinant of a 2x2 matrix.
float SPIRV_Cross_Det2x2(float a1, float a2, float b1, float b2)
float spvDet2x2(float a1, float a2, float b1, float b2)
{
return a1 * b2 - b1 * a2;
}
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
// adjoint and dividing by the determinant. The contents of the matrix are changed.
float3x3 SPIRV_Cross_Inverse(float3x3 m)
float3x3 spvInverse(float3x3 m)
{
float3x3 adj; // The adjoint matrix (inverse after dividing by determinant)
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
adj[0][0] = SPIRV_Cross_Det2x2(m[1][1], m[1][2], m[2][1], m[2][2]);
adj[0][1] = -SPIRV_Cross_Det2x2(m[0][1], m[0][2], m[2][1], m[2][2]);
adj[0][2] = SPIRV_Cross_Det2x2(m[0][1], m[0][2], m[1][1], m[1][2]);
adj[0][0] = spvDet2x2(m[1][1], m[1][2], m[2][1], m[2][2]);
adj[0][1] = -spvDet2x2(m[0][1], m[0][2], m[2][1], m[2][2]);
adj[0][2] = spvDet2x2(m[0][1], m[0][2], m[1][1], m[1][2]);
adj[1][0] = -SPIRV_Cross_Det2x2(m[1][0], m[1][2], m[2][0], m[2][2]);
adj[1][1] = SPIRV_Cross_Det2x2(m[0][0], m[0][2], m[2][0], m[2][2]);
adj[1][2] = -SPIRV_Cross_Det2x2(m[0][0], m[0][2], m[1][0], m[1][2]);
adj[1][0] = -spvDet2x2(m[1][0], m[1][2], m[2][0], m[2][2]);
adj[1][1] = spvDet2x2(m[0][0], m[0][2], m[2][0], m[2][2]);
adj[1][2] = -spvDet2x2(m[0][0], m[0][2], m[1][0], m[1][2]);
adj[2][0] = SPIRV_Cross_Det2x2(m[1][0], m[1][1], m[2][0], m[2][1]);
adj[2][1] = -SPIRV_Cross_Det2x2(m[0][0], m[0][1], m[2][0], m[2][1]);
adj[2][2] = SPIRV_Cross_Det2x2(m[0][0], m[0][1], m[1][0], m[1][1]);
adj[2][0] = spvDet2x2(m[1][0], m[1][1], m[2][0], m[2][1]);
adj[2][1] = -spvDet2x2(m[0][0], m[0][1], m[2][0], m[2][1]);
adj[2][2] = spvDet2x2(m[0][0], m[0][1], m[1][0], m[1][1]);
// Calculate the determinant as a combination of the cofactors of the first row.
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]);
@ -56,37 +58,37 @@ float3x3 SPIRV_Cross_Inverse(float3x3 m)
}
// Returns the determinant of a 3x3 matrix.
float SPIRV_Cross_Det3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3)
float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3)
{
return a1 * SPIRV_Cross_Det2x2(b2, b3, c2, c3) - b1 * SPIRV_Cross_Det2x2(a2, a3, c2, c3) + c1 * SPIRV_Cross_Det2x2(a2, a3, b2, b3);
return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * spvDet2x2(a2, a3, b2, b3);
}
// Returns the inverse of a matrix, by using the algorithm of calculating the classical
// adjoint and dividing by the determinant. The contents of the matrix are changed.
float4x4 SPIRV_Cross_Inverse(float4x4 m)
float4x4 spvInverse(float4x4 m)
{
float4x4 adj; // The adjoint matrix (inverse after dividing by determinant)
// Create the transpose of the cofactors, as the classical adjoint of the matrix.
adj[0][0] = SPIRV_Cross_Det3x3(m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
adj[0][1] = -SPIRV_Cross_Det3x3(m[0][1], m[0][2], m[0][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
adj[0][2] = SPIRV_Cross_Det3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[3][1], m[3][2], m[3][3]);
adj[0][3] = -SPIRV_Cross_Det3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3]);
adj[0][0] = spvDet3x3(m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
adj[0][1] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]);
adj[0][2] = spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[3][1], m[3][2], m[3][3]);
adj[0][3] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3]);
adj[1][0] = -SPIRV_Cross_Det3x3(m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
adj[1][1] = SPIRV_Cross_Det3x3(m[0][0], m[0][2], m[0][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
adj[1][2] = -SPIRV_Cross_Det3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[3][0], m[3][2], m[3][3]);
adj[1][3] = SPIRV_Cross_Det3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3]);
adj[1][0] = -spvDet3x3(m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
adj[1][1] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]);
adj[1][2] = -spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[3][0], m[3][2], m[3][3]);
adj[1][3] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3]);
adj[2][0] = SPIRV_Cross_Det3x3(m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
adj[2][1] = -SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
adj[2][2] = SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[3][0], m[3][1], m[3][3]);
adj[2][3] = -SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3]);
adj[2][0] = spvDet3x3(m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
adj[2][1] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]);
adj[2][2] = spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[3][0], m[3][1], m[3][3]);
adj[2][3] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3]);
adj[3][0] = -SPIRV_Cross_Det3x3(m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
adj[3][1] = SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
adj[3][2] = -SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[3][0], m[3][1], m[3][2]);
adj[3][3] = SPIRV_Cross_Det3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2]);
adj[3][0] = -spvDet3x3(m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
adj[3][1] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]);
adj[3][2] = -spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[3][0], m[3][1], m[3][2]);
adj[3][3] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2]);
// Calculate the determinant as a combination of the cofactors of the first row.
float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]) + (adj[0][3] * m[3][0]);
@ -99,16 +101,16 @@ float4x4 SPIRV_Cross_Inverse(float4x4 m)
void comp_main()
{
float2x2 _23 = asfloat(uint2x2(_20.Load2(0), _20.Load2(8)));
float2x2 _24 = SPIRV_Cross_Inverse(_23);
float2x2 _24 = spvInverse(_23);
_15.Store2(0, asuint(_24[0]));
_15.Store2(8, asuint(_24[1]));
float3x3 _29 = asfloat(uint3x3(_20.Load3(16), _20.Load3(32), _20.Load3(48)));
float3x3 _30 = SPIRV_Cross_Inverse(_29);
float3x3 _30 = spvInverse(_29);
_15.Store3(16, asuint(_30[0]));
_15.Store3(32, asuint(_30[1]));
_15.Store3(48, asuint(_30[2]));
float4x4 _35 = asfloat(uint4x4(_20.Load4(64), _20.Load4(80), _20.Load4(96), _20.Load4(112)));
float4x4 _36 = SPIRV_Cross_Inverse(_35);
float4x4 _36 = spvInverse(_35);
_15.Store4(64, asuint(_36[0]));
_15.Store4(80, asuint(_36[1]));
_15.Store4(96, asuint(_36[2]));

View File

@ -1,5 +1,7 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _10 : register(u0);
cbuffer SPIRV_Cross_NumWorkgroups : register(b0)
cbuffer SPIRV_Cross_NumWorkgroups
{
uint3 SPIRV_Cross_NumWorkgroups_1_count : packoffset(c0);
};

View File

@ -1,5 +1,7 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _10 : register(u0);
cbuffer SPIRV_Cross_NumWorkgroups : register(b0)
cbuffer SPIRV_Cross_NumWorkgroups
{
uint3 SPIRV_Cross_NumWorkgroups_1_count : packoffset(c0);
};

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _21 : register(u0);
ByteAddressBuffer _26 : register(t1);

View File

@ -0,0 +1,242 @@
static float3x4 _362;
static float4x3 _364;
RWByteAddressBuffer _17 : register(u0);
uniform RaytracingAccelerationStructure rtas : register(t1);
static RayQuery<RAY_FLAG_NONE> rayQuery;
void comp_main()
{
RayDesc _1ident = {0.0f.xxx, 0.0f, float3(1.0f, 0.0f, 0.0f), 9999.0f};
rayQuery.TraceRayInline(rtas, 0u, 255u, _1ident);
float3x4 _361;
float4x3 _363;
_363 = _364;
_361 = _362;
float3x4 _387;
float4x3 _398;
for (;;)
{
bool _67 = rayQuery.Proceed();
if (_67)
{
uint _71 = rayQuery.CandidateType();
switch (_71)
{
case 0u:
{
rayQuery.Abort();
float4x3 _79 = rayQuery.CandidateObjectToWorld4x3();
rayQuery.CommitNonOpaqueTriangleHit();
bool _87 = rayQuery.CommittedTriangleFrontFace();
if (_87)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
float2 _92 = rayQuery.CommittedTriangleBarycentrics();
if (_92.x == 0.0f)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
int _98 = rayQuery.CommittedInstanceID();
if (_98 > 0)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
int _103 = rayQuery.CommittedInstanceIndex();
if (_103 > 0)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
float3 _108 = rayQuery.CommittedObjectRayDirection();
if (_108.x > 0.0f)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
float3 _114 = rayQuery.CommittedObjectRayOrigin();
if (_114.x > 0.0f)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
int _120 = rayQuery.CommittedPrimitiveIndex();
if (_120 > 0)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
float _125 = rayQuery.CommittedRayT();
if (_125 > 0.0f)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
uint _130 = rayQuery.CommittedInstanceContributionToHitGroupIndex();
if (_130 > 0u)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
_398 = _79;
_387 = transpose(_79);
break;
}
case 1u:
{
float4x3 _136 = rayQuery.CandidateObjectToWorld4x3();
bool _139 = rayQuery.CandidateProceduralPrimitiveNonOpaque();
if (_139)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
rayQuery.CommitProceduralPrimitiveHit(144);
rayQuery.Abort();
_398 = _136;
_387 = transpose(_136);
break;
}
default:
{
_398 = _363;
_387 = _361;
break;
}
}
_363 = _398;
_361 = _387;
continue;
}
else
{
break;
}
}
if (_361[0].x == _363[0].x)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
uint _157 = rayQuery.CommittedStatus();
float3x4 _365;
float4x3 _376;
switch (_157)
{
case 0u:
{
float4x3 _163 = rayQuery.CandidateWorldToObject4x3();
_376 = _163;
_365 = transpose(_163);
break;
}
case 1u:
{
float4x3 _167 = rayQuery.CommittedWorldToObject4x3();
bool _170 = rayQuery.CommittedTriangleFrontFace();
if (_170)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
float2 _174 = rayQuery.CommittedTriangleBarycentrics();
if (_174.y == 0.0f)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
_376 = _167;
_365 = transpose(_167);
break;
}
case 2u:
{
int _182 = rayQuery.CommittedGeometryIndex();
if (_182 > 0)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
int _187 = rayQuery.CommittedInstanceIndex();
if (_187 > 0)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
int _192 = rayQuery.CommittedInstanceID();
if (_192 > 0)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
float3 _197 = rayQuery.CommittedObjectRayDirection();
if (_197.z > 0.0f)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
float3 _204 = rayQuery.CommittedObjectRayOrigin();
if (_204.x > 0.0f)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
int _210 = rayQuery.CommittedPrimitiveIndex();
if (_210 > 0)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
float _215 = rayQuery.CommittedRayT();
if (_215 > 0.0f)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
_376 = _363;
_365 = _361;
break;
}
default:
{
_376 = _363;
_365 = _361;
break;
}
}
if (_365[0].x == _376[0].x)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
uint _230 = rayQuery.RayFlags();
if (_230 > 256u)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
float _236 = rayQuery.RayTMin();
if (_236 > 0.0f)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
float3 _242 = rayQuery.WorldRayOrigin();
float3 _244 = rayQuery.WorldRayDirection();
if (_242.x == _244.z)
{
_17.Store(0, 0u);
_17.Store(4, 0u);
}
}
[numthreads(1, 1, 1)]
void main()
{
comp_main();
}

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _11 : register(u0);
void comp_main()

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _28 : register(u0);
cbuffer UBO : register(b1)
{
@ -8,57 +10,57 @@ cbuffer UBO : register(b1)
void comp_main()
{
float4x4 _253 = asfloat(uint4x4(_28.Load(64), _28.Load(80), _28.Load(96), _28.Load(112), _28.Load(68), _28.Load(84), _28.Load(100), _28.Load(116), _28.Load(72), _28.Load(88), _28.Load(104), _28.Load(120), _28.Load(76), _28.Load(92), _28.Load(108), _28.Load(124)));
_28.Store4(0, asuint(_253[0]));
_28.Store4(16, asuint(_253[1]));
_28.Store4(32, asuint(_253[2]));
_28.Store4(48, asuint(_253[3]));
float2x2 _256 = asfloat(uint2x2(_28.Load(144), _28.Load(152), _28.Load(148), _28.Load(156)));
_28.Store2(128, asuint(_256[0]));
_28.Store2(136, asuint(_256[1]));
float2x3 _259 = asfloat(uint2x3(_28.Load(192), _28.Load(200), _28.Load(208), _28.Load(196), _28.Load(204), _28.Load(212)));
_28.Store3(160, asuint(_259[0]));
_28.Store3(176, asuint(_259[1]));
float3x2 _262 = asfloat(uint3x2(_28.Load(240), _28.Load(256), _28.Load(244), _28.Load(260), _28.Load(248), _28.Load(264)));
_28.Store2(216, asuint(_262[0]));
_28.Store2(224, asuint(_262[1]));
_28.Store2(232, asuint(_262[2]));
float4x4 _265 = asfloat(uint4x4(_28.Load4(0), _28.Load4(16), _28.Load4(32), _28.Load4(48)));
_28.Store(64, asuint(_265[0].x));
_28.Store(68, asuint(_265[1].x));
_28.Store(72, asuint(_265[2].x));
_28.Store(76, asuint(_265[3].x));
_28.Store(80, asuint(_265[0].y));
_28.Store(84, asuint(_265[1].y));
_28.Store(88, asuint(_265[2].y));
_28.Store(92, asuint(_265[3].y));
_28.Store(96, asuint(_265[0].z));
_28.Store(100, asuint(_265[1].z));
_28.Store(104, asuint(_265[2].z));
_28.Store(108, asuint(_265[3].z));
_28.Store(112, asuint(_265[0].w));
_28.Store(116, asuint(_265[1].w));
_28.Store(120, asuint(_265[2].w));
_28.Store(124, asuint(_265[3].w));
float2x2 _268 = asfloat(uint2x2(_28.Load2(128), _28.Load2(136)));
_28.Store(144, asuint(_268[0].x));
_28.Store(148, asuint(_268[1].x));
_28.Store(152, asuint(_268[0].y));
_28.Store(156, asuint(_268[1].y));
float2x3 _271 = asfloat(uint2x3(_28.Load3(160), _28.Load3(176)));
_28.Store(192, asuint(_271[0].x));
_28.Store(196, asuint(_271[1].x));
_28.Store(200, asuint(_271[0].y));
_28.Store(204, asuint(_271[1].y));
_28.Store(208, asuint(_271[0].z));
_28.Store(212, asuint(_271[1].z));
float3x2 _274 = asfloat(uint3x2(_28.Load2(216), _28.Load2(224), _28.Load2(232)));
_28.Store(240, asuint(_274[0].x));
_28.Store(244, asuint(_274[1].x));
_28.Store(248, asuint(_274[2].x));
_28.Store(256, asuint(_274[0].y));
_28.Store(260, asuint(_274[1].y));
_28.Store(264, asuint(_274[2].y));
float4x4 _258 = asfloat(uint4x4(_28.Load(64), _28.Load(80), _28.Load(96), _28.Load(112), _28.Load(68), _28.Load(84), _28.Load(100), _28.Load(116), _28.Load(72), _28.Load(88), _28.Load(104), _28.Load(120), _28.Load(76), _28.Load(92), _28.Load(108), _28.Load(124)));
_28.Store4(0, asuint(_258[0]));
_28.Store4(16, asuint(_258[1]));
_28.Store4(32, asuint(_258[2]));
_28.Store4(48, asuint(_258[3]));
float2x2 _261 = asfloat(uint2x2(_28.Load(144), _28.Load(152), _28.Load(148), _28.Load(156)));
_28.Store2(128, asuint(_261[0]));
_28.Store2(136, asuint(_261[1]));
float2x3 _264 = asfloat(uint2x3(_28.Load(192), _28.Load(200), _28.Load(208), _28.Load(196), _28.Load(204), _28.Load(212)));
_28.Store3(160, asuint(_264[0]));
_28.Store3(176, asuint(_264[1]));
float3x2 _267 = asfloat(uint3x2(_28.Load(240), _28.Load(256), _28.Load(244), _28.Load(260), _28.Load(248), _28.Load(264)));
_28.Store2(216, asuint(_267[0]));
_28.Store2(224, asuint(_267[1]));
_28.Store2(232, asuint(_267[2]));
float4x4 _271 = asfloat(uint4x4(_28.Load4(0), _28.Load4(16), _28.Load4(32), _28.Load4(48)));
_28.Store(64, asuint(_271[0].x));
_28.Store(68, asuint(_271[1].x));
_28.Store(72, asuint(_271[2].x));
_28.Store(76, asuint(_271[3].x));
_28.Store(80, asuint(_271[0].y));
_28.Store(84, asuint(_271[1].y));
_28.Store(88, asuint(_271[2].y));
_28.Store(92, asuint(_271[3].y));
_28.Store(96, asuint(_271[0].z));
_28.Store(100, asuint(_271[1].z));
_28.Store(104, asuint(_271[2].z));
_28.Store(108, asuint(_271[3].z));
_28.Store(112, asuint(_271[0].w));
_28.Store(116, asuint(_271[1].w));
_28.Store(120, asuint(_271[2].w));
_28.Store(124, asuint(_271[3].w));
float2x2 _274 = asfloat(uint2x2(_28.Load2(128), _28.Load2(136)));
_28.Store(144, asuint(_274[0].x));
_28.Store(148, asuint(_274[1].x));
_28.Store(152, asuint(_274[0].y));
_28.Store(156, asuint(_274[1].y));
float2x3 _277 = asfloat(uint2x3(_28.Load3(160), _28.Load3(176)));
_28.Store(192, asuint(_277[0].x));
_28.Store(196, asuint(_277[1].x));
_28.Store(200, asuint(_277[0].y));
_28.Store(204, asuint(_277[1].y));
_28.Store(208, asuint(_277[0].z));
_28.Store(212, asuint(_277[1].z));
float3x2 _280 = asfloat(uint3x2(_28.Load2(216), _28.Load2(224), _28.Load2(232)));
_28.Store(240, asuint(_280[0].x));
_28.Store(244, asuint(_280[1].x));
_28.Store(248, asuint(_280[2].x));
_28.Store(256, asuint(_280[0].y));
_28.Store(260, asuint(_280[1].y));
_28.Store(264, asuint(_280[2].y));
_28.Store(_68_index0 * 4 + _68_index1 * 16 + 64, asuint(1.0f));
_28.Store(_68_index0 * 4 + _68_index1 * 8 + 144, asuint(2.0f));
_28.Store(_68_index0 * 4 + _68_index1 * 8 + 192, asuint(3.0f));

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _9 : register(u0);
void comp_main()

View File

@ -28,6 +28,7 @@ static const int d = (c + 50);
#define SPIRV_CROSS_CONSTANT_ID_3 400
#endif
static const int e = SPIRV_CROSS_CONSTANT_ID_3;
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _22 : register(u0);

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
RWByteAddressBuffer _11 : register(u1);
void comp_main()

View File

@ -1,3 +1,5 @@
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
void comp_main()
{
}

View File

@ -1,67 +0,0 @@
RWByteAddressBuffer _9 : register(u0, space0);
static uint4 gl_SubgroupEqMask;
static uint4 gl_SubgroupGeMask;
static uint4 gl_SubgroupGtMask;
static uint4 gl_SubgroupLeMask;
static uint4 gl_SubgroupLtMask;
void comp_main()
{
_9.Store(0, asuint(float(WaveGetLaneCount())));
_9.Store(0, asuint(float(WaveGetLaneIndex())));
_9.Store(0, asuint(float4(gl_SubgroupEqMask).x));
_9.Store(0, asuint(float4(gl_SubgroupGeMask).x));
_9.Store(0, asuint(float4(gl_SubgroupGtMask).x));
_9.Store(0, asuint(float4(gl_SubgroupLeMask).x));
_9.Store(0, asuint(float4(gl_SubgroupLtMask).x));
uint4 _75 = WaveActiveBallot(true);
float4 _88 = WaveActiveSum(20.0f.xxxx);
int4 _94 = WaveActiveSum(int4(20, 20, 20, 20));
float4 _96 = WaveActiveProduct(20.0f.xxxx);
int4 _98 = WaveActiveProduct(int4(20, 20, 20, 20));
float4 _127 = WavePrefixProduct(_96) * _96;
int4 _129 = WavePrefixProduct(_98) * _98;
}
[numthreads(1, 1, 1)]
void main()
{
gl_SubgroupEqMask = 1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96));
if (WaveGetLaneIndex() >= 32) gl_SubgroupEqMask.x = 0;
if (WaveGetLaneIndex() >= 64 || WaveGetLaneIndex() < 32) gl_SubgroupEqMask.y = 0;
if (WaveGetLaneIndex() >= 96 || WaveGetLaneIndex() < 64) gl_SubgroupEqMask.z = 0;
if (WaveGetLaneIndex() < 96) gl_SubgroupEqMask.w = 0;
gl_SubgroupGeMask = ~((1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u);
if (WaveGetLaneIndex() >= 32) gl_SubgroupGeMask.x = 0u;
if (WaveGetLaneIndex() >= 64) gl_SubgroupGeMask.y = 0u;
if (WaveGetLaneIndex() >= 96) gl_SubgroupGeMask.z = 0u;
if (WaveGetLaneIndex() < 32) gl_SubgroupGeMask.y = ~0u;
if (WaveGetLaneIndex() < 64) gl_SubgroupGeMask.z = ~0u;
if (WaveGetLaneIndex() < 96) gl_SubgroupGeMask.w = ~0u;
uint gt_lane_index = WaveGetLaneIndex() + 1;
gl_SubgroupGtMask = ~((1u << (gt_lane_index - uint4(0, 32, 64, 96))) - 1u);
if (gt_lane_index >= 32) gl_SubgroupGtMask.x = 0u;
if (gt_lane_index >= 64) gl_SubgroupGtMask.y = 0u;
if (gt_lane_index >= 96) gl_SubgroupGtMask.z = 0u;
if (gt_lane_index >= 128) gl_SubgroupGtMask.w = 0u;
if (gt_lane_index < 32) gl_SubgroupGtMask.y = ~0u;
if (gt_lane_index < 64) gl_SubgroupGtMask.z = ~0u;
if (gt_lane_index < 96) gl_SubgroupGtMask.w = ~0u;
uint le_lane_index = WaveGetLaneIndex() + 1;
gl_SubgroupLeMask = (1u << (le_lane_index - uint4(0, 32, 64, 96))) - 1u;
if (le_lane_index >= 32) gl_SubgroupLeMask.x = ~0u;
if (le_lane_index >= 64) gl_SubgroupLeMask.y = ~0u;
if (le_lane_index >= 96) gl_SubgroupLeMask.z = ~0u;
if (le_lane_index >= 128) gl_SubgroupLeMask.w = ~0u;
if (le_lane_index < 32) gl_SubgroupLeMask.y = 0u;
if (le_lane_index < 64) gl_SubgroupLeMask.z = 0u;
if (le_lane_index < 96) gl_SubgroupLeMask.w = 0u;
gl_SubgroupLtMask = (1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u;
if (WaveGetLaneIndex() >= 32) gl_SubgroupLtMask.x = ~0u;
if (WaveGetLaneIndex() >= 64) gl_SubgroupLtMask.y = ~0u;
if (WaveGetLaneIndex() >= 96) gl_SubgroupLtMask.z = ~0u;
if (WaveGetLaneIndex() < 32) gl_SubgroupLtMask.y = 0u;
if (WaveGetLaneIndex() < 64) gl_SubgroupLtMask.z = 0u;
if (WaveGetLaneIndex() < 96) gl_SubgroupLtMask.w = 0u;
comp_main();
}

View File

@ -0,0 +1,28 @@
uniform float4 UBO[56];
static float4 gl_Position;
static float4 aVertex;
struct SPIRV_Cross_Input
{
float4 aVertex : TEXCOORD0;
};
struct SPIRV_Cross_Output
{
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = (mul(aVertex, float4x4(UBO[40], UBO[41], UBO[42], UBO[43])) + UBO[55]) + ((UBO[50] + UBO[45]) + UBO[54].x.xxxx);
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
aVertex = stage_input.aVertex;
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
return stage_output;
}

View File

@ -0,0 +1,35 @@
uniform float4 UBO[4];
static float4 gl_Position;
static float4 aVertex;
static float3 vNormal;
static float3 aNormal;
struct SPIRV_Cross_Input
{
float4 aVertex : TEXCOORD0;
float3 aNormal : TEXCOORD1;
};
struct SPIRV_Cross_Output
{
float3 vNormal : TEXCOORD0;
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = mul(aVertex, float4x4(UBO[0], UBO[1], UBO[2], UBO[3]));
vNormal = aNormal;
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
aVertex = stage_input.aVertex;
aNormal = stage_input.aNormal;
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.vNormal = vNormal;
return stage_output;
}

View File

@ -0,0 +1,50 @@
struct Light
{
float3 Position;
float Radius;
float4 Color;
};
uniform float4 UBO[12];
static float4 gl_Position;
static float4 aVertex;
static float4 vColor;
static float3 aNormal;
struct SPIRV_Cross_Input
{
float4 aVertex : TEXCOORD0;
float3 aNormal : TEXCOORD1;
};
struct SPIRV_Cross_Output
{
float4 vColor : TEXCOORD0;
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = mul(aVertex, float4x4(UBO[0], UBO[1], UBO[2], UBO[3]));
vColor = 0.0f.xxxx;
for (int _96 = 0; _96 < 4; )
{
Light _51 = {UBO[_96 * 2 + 4].xyz, UBO[_96 * 2 + 4].w, UBO[_96 * 2 + 5]};
float3 _68 = aVertex.xyz - _51.Position;
vColor += ((UBO[_96 * 2 + 5] * clamp(1.0f - (length(_68) / _51.Radius), 0.0f, 1.0f)) * dot(aNormal, normalize(_68)));
_96++;
continue;
}
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
aVertex = stage_input.aVertex;
aNormal = stage_input.aNormal;
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.vColor = vColor;
return stage_output;
}

View File

@ -0,0 +1,49 @@
struct Light
{
float3 Position;
float Radius;
float4 Color;
};
uniform float4 UBO[12];
static float4 gl_Position;
static float4 aVertex;
static float4 vColor;
static float3 aNormal;
struct SPIRV_Cross_Input
{
float4 aVertex : TEXCOORD0;
float3 aNormal : TEXCOORD1;
};
struct SPIRV_Cross_Output
{
float4 vColor : TEXCOORD0;
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = mul(aVertex, float4x4(UBO[0], UBO[1], UBO[2], UBO[3]));
vColor = 0.0f.xxxx;
for (int _82 = 0; _82 < 4; )
{
float3 _54 = aVertex.xyz - UBO[_82 * 2 + 4].xyz;
vColor += ((UBO[_82 * 2 + 5] * clamp(1.0f - (length(_54) / UBO[_82 * 2 + 4].w), 0.0f, 1.0f)) * dot(aNormal, normalize(_54)));
_82++;
continue;
}
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
aVertex = stage_input.aVertex;
aNormal = stage_input.aNormal;
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.vColor = vColor;
return stage_output;
}

View File

@ -0,0 +1,29 @@
uniform float4 UBO[4];
static float3 FragColor;
static float3 vNormal;
struct SPIRV_Cross_Input
{
nointerpolation float3 vNormal : TEXCOORD0;
};
struct SPIRV_Cross_Output
{
float3 FragColor : SV_Target0;
};
void frag_main()
{
float4x4 _19 = float4x4(UBO[0], UBO[1], UBO[2], UBO[3]);
FragColor = mul(vNormal, float3x3(_19[0].xyz, _19[1].xyz, _19[2].xyz));
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
vNormal = stage_input.vNormal;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}

View File

@ -0,0 +1,41 @@
uniform float4 UBO[14];
static float4 gl_Position;
static float4 oA;
static float4 oB;
static float4 oC;
static float4 oD;
static float4 oE;
struct SPIRV_Cross_Output
{
float4 oA : TEXCOORD0;
float4 oB : TEXCOORD1;
float4 oC : TEXCOORD2;
float4 oD : TEXCOORD3;
float4 oE : TEXCOORD4;
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = 0.0f.xxxx;
oA = UBO[1];
oB = float4(UBO[4].y, UBO[5].y, UBO[6].y, UBO[7].y);
oC = UBO[9];
oD = float4(UBO[10].x, UBO[11].x, UBO[12].x, UBO[13].x);
oE = float4(UBO[1].z, UBO[6].y, UBO[9].z, UBO[12].y);
}
SPIRV_Cross_Output main()
{
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.oA = oA;
stage_output.oB = oB;
stage_output.oC = oC;
stage_output.oD = oD;
stage_output.oE = oE;
return stage_output;
}

View File

@ -0,0 +1,28 @@
uniform float4 UBO[15];
static float4 gl_Position;
static int2 aIndex;
struct SPIRV_Cross_Input
{
int2 aIndex : TEXCOORD0;
};
struct SPIRV_Cross_Output
{
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = UBO[aIndex.x * 5 + aIndex.y * 1 + 0];
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
aIndex = stage_input.aIndex;
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
return stage_output;
}

View File

@ -0,0 +1,35 @@
uniform float4 PushMe[6];
static float4 gl_Position;
static float4 Pos;
static float2 vRot;
static float2 Rot;
struct SPIRV_Cross_Input
{
float2 Rot : TEXCOORD0;
float4 Pos : TEXCOORD1;
};
struct SPIRV_Cross_Output
{
float2 vRot : TEXCOORD0;
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = mul(Pos, float4x4(PushMe[0], PushMe[1], PushMe[2], PushMe[3]));
vRot = mul(Rot, float2x2(PushMe[4].xy, PushMe[4].zw)) + PushMe[5].z.xx;
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
Pos = stage_input.Pos;
Rot = stage_input.Rot;
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.vRot = vRot;
return stage_output;
}

View File

@ -0,0 +1,28 @@
uniform float4 UBO[12];
static float4 gl_Position;
static float4 aVertex;
struct SPIRV_Cross_Input
{
float4 aVertex : TEXCOORD0;
};
struct SPIRV_Cross_Output
{
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = mul(aVertex, float4x4(UBO[0], UBO[1], UBO[2], UBO[3])) + mul(aVertex, transpose(float4x4(UBO[4], UBO[5], UBO[6], UBO[7])));
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
aVertex = stage_input.aVertex;
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
return stage_output;
}

View File

@ -0,0 +1,44 @@
struct Light
{
float3 Position;
float Radius;
float4 Color;
};
uniform float4 UBO[6];
static float4 gl_Position;
static float4 aVertex;
static float4 vColor;
static float3 aNormal;
struct SPIRV_Cross_Input
{
float4 aVertex : TEXCOORD0;
float3 aNormal : TEXCOORD1;
};
struct SPIRV_Cross_Output
{
float4 vColor : TEXCOORD0;
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = mul(aVertex, float4x4(UBO[0], UBO[1], UBO[2], UBO[3]));
vColor = 0.0f.xxxx;
float3 _39 = aVertex.xyz - UBO[4].xyz;
vColor += ((UBO[5] * clamp(1.0f - (length(_39) / UBO[4].w), 0.0f, 1.0f)) * dot(aNormal, normalize(_39)));
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
aVertex = stage_input.aVertex;
aNormal = stage_input.aNormal;
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.vColor = vColor;
return stage_output;
}

View File

@ -0,0 +1,43 @@
struct Foo
{
column_major float3x4 MVP0;
column_major float3x4 MVP1;
};
uniform float4 UBO[8];
static float4 v0;
static float4 v1;
static float3 V0;
static float3 V1;
struct SPIRV_Cross_Input
{
float4 v0 : TEXCOORD0;
float4 v1 : TEXCOORD1;
};
struct SPIRV_Cross_Output
{
float3 V0 : TEXCOORD0;
float3 V1 : TEXCOORD1;
};
void vert_main()
{
Foo _19 = {transpose(float4x3(UBO[0].xyz, UBO[1].xyz, UBO[2].xyz, UBO[3].xyz)), transpose(float4x3(UBO[4].xyz, UBO[5].xyz, UBO[6].xyz, UBO[7].xyz))};
Foo _20 = _19;
V0 = mul(_20.MVP0, v0);
V1 = mul(_20.MVP1, v1);
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
v0 = stage_input.v0;
v1 = stage_input.v1;
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.V0 = V0;
stage_output.V1 = V1;
return stage_output;
}

View File

@ -0,0 +1,45 @@
uniform float4 UBO[8];
static float4 gl_Position;
static float4 oA;
static float4 oB;
static float4 oC;
static float4 oD;
static float4 oE;
static float4 oF;
struct SPIRV_Cross_Output
{
float4 oA : TEXCOORD0;
float4 oB : TEXCOORD1;
float4 oC : TEXCOORD2;
float4 oD : TEXCOORD3;
float4 oE : TEXCOORD4;
float4 oF : TEXCOORD5;
float4 gl_Position : SV_Position;
};
void vert_main()
{
gl_Position = 0.0f.xxxx;
oA = UBO[0];
oB = float4(UBO[1].xy, UBO[1].zw);
oC = float4(UBO[2].x, UBO[3].xyz);
oD = float4(UBO[4].xyz, UBO[4].w);
oE = float4(UBO[5].x, UBO[5].y, UBO[5].z, UBO[5].w);
oF = float4(UBO[6].x, UBO[6].zw, UBO[7].x);
}
SPIRV_Cross_Output main()
{
vert_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_Position = gl_Position;
stage_output.oA = oA;
stage_output.oB = oB;
stage_output.oC = oC;
stage_output.oD = oD;
stage_output.oE = oE;
stage_output.oF = oF;
return stage_output;
}

View File

@ -0,0 +1,23 @@
uniform int4 UBO1[2];
uniform uint4 UBO2[2];
uniform float4 UBO0[2];
static float4 FragColor;
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
};
void frag_main()
{
FragColor = ((((float4(UBO1[0]) + float4(UBO1[1])) + float4(UBO2[0])) + float4(UBO2[1])) + UBO0[0]) + UBO0[1];
}
SPIRV_Cross_Output main()
{
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}

View File

@ -1,12 +1,6 @@
static const float _17[5] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f };
static float4 FragColor;
static float4 v0;
struct SPIRV_Cross_Input
{
float4 v0 : TEXCOORD0;
};
struct SPIRV_Cross_Output
{
@ -24,9 +18,8 @@ void frag_main()
}
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
SPIRV_Cross_Output main()
{
v0 = stage_input.v0;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;

View File

@ -24,6 +24,7 @@ void frag_main()
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
gl_FragCoord = stage_input.gl_FragCoord;
gl_FragCoord.w = 1.0 / gl_FragCoord.w;
vColor = stage_input.vColor;
frag_main();
SPIRV_Cross_Output stage_output;

View File

@ -1,3 +1,5 @@
static bool _47;
static float2 value;
static float4 FragColor;
@ -11,8 +13,6 @@ struct SPIRV_Cross_Output
float4 FragColor : SV_Target0;
};
bool _47;
void frag_main()
{
bool2 _25 = bool2(value.x == 0.0f, _47);

View File

@ -28,6 +28,7 @@ void frag_main()
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
gl_FragCoord = stage_input.gl_FragCoord;
gl_FragCoord.w = 1.0 / gl_FragCoord.w;
vIn = stage_input.vIn;
vIn2 = stage_input.vIn2;
frag_main();

View File

@ -28,6 +28,7 @@ void frag_main()
float4 _47 = ddy_fine(vInput);
float4 _50 = fwidth(vInput);
float _56_tmp = uSampler.CalculateLevelOfDetail(_uSampler_sampler, vInput.zw);
float2 _56 = _56_tmp.xx;
if (vInput.y > 10.0f)
{
FragColor += _23;
@ -40,7 +41,7 @@ void frag_main()
FragColor += _44;
FragColor += _47;
FragColor += _50;
FragColor += float2(_56_tmp, _56_tmp).xyxy;
FragColor += _56.xyxy;
}
}

View File

@ -0,0 +1,9 @@
void frag_main()
{
discard;
}
void main()
{
frag_main();
}

View File

@ -15,21 +15,21 @@ struct SPIRV_Cross_Output
uint FP16Out : SV_Target1;
};
uint SPIRV_Cross_packHalf2x16(float2 value)
uint spvPackHalf2x16(float2 value)
{
uint2 Packed = f32tof16(value);
return Packed.x | (Packed.y << 16);
}
float2 SPIRV_Cross_unpackHalf2x16(uint value)
float2 spvUnpackHalf2x16(uint value)
{
return f16tof32(uint2(value & 0xffff, value >> 16));
}
void frag_main()
{
FP32Out = SPIRV_Cross_unpackHalf2x16(FP16);
FP16Out = SPIRV_Cross_packHalf2x16(FP32);
FP32Out = spvUnpackHalf2x16(FP16);
FP16Out = spvPackHalf2x16(FP32);
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)

View File

@ -1,45 +0,0 @@
static min16float4 v4;
static min16float3 v3;
static min16float v1;
static min16float2 v2;
static float o1;
static float2 o2;
static float3 o3;
static float4 o4;
struct SPIRV_Cross_Input
{
min16float v1 : TEXCOORD0;
min16float2 v2 : TEXCOORD1;
min16float3 v3 : TEXCOORD2;
min16float4 v4 : TEXCOORD3;
};
struct SPIRV_Cross_Output
{
float o1 : SV_Target0;
float2 o2 : SV_Target1;
float3 o3 : SV_Target2;
float4 o4 : SV_Target3;
};
void frag_main()
{
min16float4 _324;
min16float4 _387 = modf(v4, _324);
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
v4 = stage_input.v4;
v3 = stage_input.v3;
v1 = stage_input.v1;
v2 = stage_input.v2;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.o1 = o1;
stage_output.o2 = o2;
stage_output.o3 = o3;
stage_output.o4 = o4;
return stage_output;
}

View File

@ -0,0 +1,8 @@
void frag_main()
{
}
void main()
{
frag_main();
}

View File

@ -0,0 +1,8 @@
void frag_main()
{
}
void main()
{
frag_main();
}

View File

@ -24,6 +24,7 @@ void frag_main()
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
gl_FragCoord = stage_input.gl_FragCoord;
gl_FragCoord.w = 1.0 / gl_FragCoord.w;
gl_SampleID = stage_input.gl_SampleID;
frag_main();
SPIRV_Cross_Output stage_output;

View File

@ -22,6 +22,7 @@ void frag_main()
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
gl_FragCoord = stage_input.gl_FragCoord;
gl_FragCoord.w = 1.0 / gl_FragCoord.w;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;

View File

@ -1,13 +1,18 @@
static float4 FragColor;
struct VertexOut
{
float4 a : TEXCOORD1;
float4 b : TEXCOORD2;
float4 a;
float4 b;
};
static float4 FragColor;
static VertexOut _12;
struct SPIRV_Cross_Input
{
float4 VertexOut_a : TEXCOORD1;
float4 VertexOut_b : TEXCOORD2;
};
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
@ -18,9 +23,10 @@ void frag_main()
FragColor = _12.a + _12.b;
}
SPIRV_Cross_Output main(in VertexOut stage_input_12)
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
_12 = stage_input_12;
_12.a = stage_input.VertexOut_a;
_12.b = stage_input.VertexOut_b;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;

View File

@ -0,0 +1,32 @@
uniform sampler2D uSampler;
static float4 FragColor;
static float2 vUV;
struct SPIRV_Cross_Input
{
float2 vUV : TEXCOORD0;
};
struct SPIRV_Cross_Output
{
float4 FragColor : COLOR0;
};
void frag_main()
{
float3 _23 = float3(vUV, 5.0f);
FragColor = tex2Dproj(uSampler, float4(_23.xy, 0.0, _23.z));
FragColor += tex2Dbias(uSampler, float4(vUV, 0.0, 3.0f));
FragColor += tex2Dlod(uSampler, float4(vUV, 0.0, 2.0f));
FragColor += tex2Dgrad(uSampler, vUV, 4.0f.xx, 5.0f.xx);
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
vUV = stage_input.vUV;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = float4(FragColor);
return stage_output;
}

View File

@ -1,16 +1,8 @@
static float4 vColor;
struct SPIRV_Cross_Input
{
float4 vColor : TEXCOORD0;
};
void frag_main()
{
}
void main(SPIRV_Cross_Input stage_input)
void main()
{
vColor = stage_input.vColor;
frag_main();
}

View File

@ -3,12 +3,15 @@ struct UBO_1_1
float4 v[64];
};
ConstantBuffer<UBO_1_1> ubos[] : register(b0, space3);
ByteAddressBuffer ssbos[] : register(t0, space4);
ConstantBuffer<UBO_1_1> ubos[] : register(b2, space9);
RWByteAddressBuffer ssbos[] : register(u3, space10);
Texture2D<float4> uSamplers[] : register(t0, space0);
SamplerState uSamps[] : register(s0, space2);
Texture2D<float4> uCombinedSamplers[] : register(t0, space1);
SamplerState _uCombinedSamplers_sampler[] : register(s0, space1);
SamplerState uSamps[] : register(s1, space3);
Texture2D<float4> uCombinedSamplers[] : register(t4, space2);
SamplerState _uCombinedSamplers_sampler[] : register(s4, space2);
Texture2DMS<float4> uSamplersMS[] : register(t0, space1);
RWTexture2D<float> uImages[] : register(u5, space7);
RWTexture2D<uint> uImagesU32[] : register(u5, space8);
static int vIndex;
static float4 FragColor;
@ -25,14 +28,76 @@ struct SPIRV_Cross_Output
float4 FragColor : SV_Target0;
};
uint2 spvTextureSize(Texture2D<float4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(Level, ret.x, ret.y, Param);
return ret;
}
uint2 spvTextureSize(Texture2DMS<float4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(ret.x, ret.y, Param);
return ret;
}
uint2 spvImageSize(RWTexture2D<float> Tex, out uint Param)
{
uint2 ret;
Tex.GetDimensions(ret.x, ret.y);
Param = 0u;
return ret;
}
void frag_main()
{
int _22 = vIndex + 10;
int _32 = vIndex + 40;
FragColor = uSamplers[NonUniformResourceIndex(_22)].Sample(uSamps[NonUniformResourceIndex(_32)], vUV);
FragColor = uCombinedSamplers[NonUniformResourceIndex(_22)].Sample(_uCombinedSamplers_sampler[NonUniformResourceIndex(_22)], vUV);
FragColor += ubos[NonUniformResourceIndex(vIndex + 20)].v[_32];
FragColor += asfloat(ssbos[NonUniformResourceIndex(vIndex + 50)].Load4((vIndex + 60) * 16 + 0));
int _49 = _22;
FragColor = uCombinedSamplers[NonUniformResourceIndex(_49)].Sample(_uCombinedSamplers_sampler[NonUniformResourceIndex(_49)], vUV);
int _65 = vIndex + 20;
int _69 = _32;
FragColor += ubos[NonUniformResourceIndex(_65)].v[_69];
int _83 = vIndex + 50;
int _88 = vIndex + 60;
FragColor += asfloat(ssbos[NonUniformResourceIndex(_83)].Load4(_88 * 16 + 16));
int _100 = vIndex + 70;
ssbos[NonUniformResourceIndex(_88)].Store4(_100 * 16 + 16, asuint(20.0f.xxxx));
int2 _111 = int2(vUV);
FragColor = uSamplers[NonUniformResourceIndex(_49)].Load(int3(_111, 0));
int _116 = vIndex + 100;
uint _122;
ssbos[_116].InterlockedAdd(0, 100u, _122);
float _136_tmp = uSamplers[NonUniformResourceIndex(_22)].CalculateLevelOfDetail(uSamps[NonUniformResourceIndex(_32)], vUV);
float2 _136 = _136_tmp.xx;
float _143_tmp = uCombinedSamplers[NonUniformResourceIndex(_49)].CalculateLevelOfDetail(_uCombinedSamplers_sampler[NonUniformResourceIndex(_49)], vUV);
float2 _143 = _143_tmp.xx;
float4 _147 = FragColor;
float2 _149 = _147.xy + (_136 + _143);
FragColor.x = _149.x;
FragColor.y = _149.y;
int _160;
spvTextureSize(uSamplers[NonUniformResourceIndex(_65)], 0u, _160);
FragColor.x += float(int(_160));
int _176;
spvTextureSize(uSamplersMS[NonUniformResourceIndex(_65)], 0u, _176);
FragColor.y += float(int(_176));
uint _187_dummy_parameter;
float4 _189 = FragColor;
float2 _191 = _189.xy + float2(int2(spvTextureSize(uSamplers[NonUniformResourceIndex(_65)], uint(0), _187_dummy_parameter)));
FragColor.x = _191.x;
FragColor.y = _191.y;
FragColor += uImages[NonUniformResourceIndex(_83)][_111].xxxx;
uint _216_dummy_parameter;
float4 _218 = FragColor;
float2 _220 = _218.xy + float2(int2(spvImageSize(uImages[NonUniformResourceIndex(_65)], _216_dummy_parameter)));
FragColor.x = _220.x;
FragColor.y = _220.y;
uImages[NonUniformResourceIndex(_88)][_111] = 50.0f.x;
uint _248;
InterlockedAdd(uImagesU32[NonUniformResourceIndex(_100)][_111], 40u, _248);
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)

View File

@ -0,0 +1,24 @@
RWByteAddressBuffer _9 : register(u6, space0);
globallycoherent RasterizerOrderedByteAddressBuffer _42 : register(u3, space0);
RasterizerOrderedByteAddressBuffer _52 : register(u4, space0);
RWTexture2D<unorm float4> img4 : register(u5, space0);
RasterizerOrderedTexture2D<unorm float4> img : register(u0, space0);
RasterizerOrderedTexture2D<unorm float4> img3 : register(u2, space0);
RasterizerOrderedTexture2D<uint> img2 : register(u1, space0);
void frag_main()
{
_9.Store(0, uint(0));
img4[int2(1, 1)] = float4(1.0f, 0.0f, 0.0f, 1.0f);
img[int2(0, 0)] = img3[int2(0, 0)];
uint _39;
InterlockedAdd(img2[int2(0, 0)], 1u, _39);
_42.Store(0, uint(int(_42.Load(0)) + 42));
uint _55;
_42.InterlockedAnd(4, _52.Load(0), _55);
}
void main()
{
frag_main();
}

View File

@ -17,7 +17,8 @@ struct SPIRV_Cross_Output
void frag_main()
{
float _19_tmp = uSampler.CalculateLevelOfDetail(_uSampler_sampler, vTexCoord);
FragColor = float2(_19_tmp, _19_tmp).xyxy;
float2 _19 = _19_tmp.xx;
FragColor = _19.xyxy;
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)

View File

@ -0,0 +1,21 @@
globallycoherent RWByteAddressBuffer _12 : register(u0);
static float4 FragColor;
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
};
void frag_main()
{
FragColor = asfloat(_12.Load4(0));
}
SPIRV_Cross_Output main()
{
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}

View File

@ -0,0 +1,21 @@
ByteAddressBuffer _12 : register(t0);
static float4 FragColor;
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
};
void frag_main()
{
FragColor = asfloat(_12.Load4(0));
}
SPIRV_Cross_Output main()
{
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}

View File

@ -24,9 +24,10 @@ struct SPIRV_Cross_Output
void frag_main()
{
float4 _80 = vDirRef;
_80.z = vDirRef.w;
FragColor = (((((((uSampler2D.SampleCmp(_uSampler2D_sampler, vUVRef.xy, vUVRef.z, int2(-1, -1)) + uSampler2DArray.SampleCmp(_uSampler2DArray_sampler, vDirRef.xyz, vDirRef.w, int2(-1, -1))) + uSamplerCube.SampleCmp(_uSamplerCube_sampler, vDirRef.xyz, vDirRef.w)) + uSamplerCubeArray.SampleCmp(_uSamplerCubeArray_sampler, vDirRef, 0.5f)) + uSampler2D.SampleCmpLevelZero(_uSampler2D_sampler, vUVRef.xy, vUVRef.z, int2(-1, -1))) + uSampler2DArray.SampleCmpLevelZero(_uSampler2DArray_sampler, vDirRef.xyz, vDirRef.w, int2(-1, -1))) + uSamplerCube.SampleCmpLevelZero(_uSamplerCube_sampler, vDirRef.xyz, vDirRef.w)) + uSampler2D.SampleCmp(_uSampler2D_sampler, _80.xy / _80.z, vDirRef.z / _80.z, int2(1, 1))) + uSampler2D.SampleCmpLevelZero(_uSampler2D_sampler, _80.xy / _80.z, vDirRef.z / _80.z, int2(1, 1));
float4 _33 = vDirRef;
float4 _80 = _33;
_80.z = _33.w;
FragColor = (((((((uSampler2D.SampleCmp(_uSampler2D_sampler, vUVRef.xy, vUVRef.z, int2(-1, -1)) + uSampler2DArray.SampleCmp(_uSampler2DArray_sampler, _33.xyz, _33.w, int2(-1, -1))) + uSamplerCube.SampleCmp(_uSamplerCube_sampler, _33.xyz, _33.w)) + uSamplerCubeArray.SampleCmp(_uSamplerCubeArray_sampler, _33, 0.5f)) + uSampler2D.SampleCmpLevelZero(_uSampler2D_sampler, vUVRef.xy, vUVRef.z, int2(-1, -1))) + uSampler2DArray.SampleCmpLevelZero(_uSampler2DArray_sampler, _33.xyz, _33.w, int2(-1, -1))) + uSamplerCube.SampleCmpLevelZero(_uSamplerCube_sampler, _33.xyz, _33.w)) + uSampler2D.SampleCmp(_uSampler2D_sampler, _80.xy / _80.z, _33.z / _80.z, int2(1, 1))) + uSampler2D.SampleCmpLevelZero(_uSampler2D_sampler, _80.xy / _80.z, _33.z / _80.z, int2(1, 1));
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)

View File

@ -0,0 +1,30 @@
static int gl_SampleMaskIn;
static int gl_SampleMask;
static float4 FragColor;
struct SPIRV_Cross_Input
{
uint gl_SampleMaskIn : SV_Coverage;
};
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
uint gl_SampleMask : SV_Coverage;
};
void frag_main()
{
FragColor = 1.0f.xxxx;
gl_SampleMask = gl_SampleMaskIn;
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
gl_SampleMaskIn = stage_input.gl_SampleMaskIn;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_SampleMask = gl_SampleMask;
stage_output.FragColor = FragColor;
return stage_output;
}

View File

@ -0,0 +1,32 @@
static int gl_SampleID;
static int gl_SampleMaskIn;
static float4 FragColor;
struct SPIRV_Cross_Input
{
uint gl_SampleID : SV_SampleIndex;
uint gl_SampleMaskIn : SV_Coverage;
};
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
};
void frag_main()
{
if ((gl_SampleMaskIn & (1 << gl_SampleID)) != 0)
{
FragColor = 1.0f.xxxx;
}
}
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
{
gl_SampleID = stage_input.gl_SampleID;
gl_SampleMaskIn = stage_input.gl_SampleMaskIn;
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}

View File

@ -0,0 +1,23 @@
static int gl_SampleMask;
static float4 FragColor;
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
uint gl_SampleMask : SV_Coverage;
};
void frag_main()
{
FragColor = 1.0f.xxxx;
gl_SampleMask = 0;
}
SPIRV_Cross_Output main()
{
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.gl_SampleMask = gl_SampleMask;
stage_output.FragColor = FragColor;
return stage_output;
}

View File

@ -24,6 +24,7 @@ void frag_main()
void main(SPIRV_Cross_Input stage_input)
{
gl_FragCoord = stage_input.gl_FragCoord;
gl_FragCoord.w = 1.0 / gl_FragCoord.w;
vTex = stage_input.vTex;
vIndex = stage_input.vIndex;
frag_main();

View File

@ -11,12 +11,12 @@ struct SPIRV_Cross_Output
float FragColor : SV_Target0;
};
float SPIRV_Cross_Reflect(float i, float n)
float spvReflect(float i, float n)
{
return i - 2.0 * dot(n, i) * n;
}
float SPIRV_Cross_Refract(float i, float n, float eta)
float spvRefract(float i, float n, float eta)
{
float NoI = n * i;
float NoI2 = NoI * NoI;
@ -33,8 +33,8 @@ float SPIRV_Cross_Refract(float i, float n, float eta)
void frag_main()
{
FragColor = SPIRV_Cross_Refract(vRefract.x, vRefract.y, vRefract.z);
FragColor += SPIRV_Cross_Reflect(vRefract.x, vRefract.y);
FragColor = spvRefract(vRefract.x, vRefract.y, vRefract.z);
FragColor += spvReflect(vRefract.x, vRefract.y);
FragColor += refract(vRefract.xy, vRefract.yz, vRefract.z).y;
FragColor += reflect(vRefract.xy, vRefract.zy).y;
}

View File

@ -0,0 +1,49 @@
cbuffer UBO : register(b0)
{
int _13_cond : packoffset(c0);
int _13_cond2 : packoffset(c0.y);
};
static float4 FragColor;
struct SPIRV_Cross_Output
{
float4 FragColor : SV_Target0;
};
void frag_main()
{
bool _49;
switch (_13_cond)
{
case 1:
{
if (_13_cond2 < 50)
{
_49 = false;
break;
}
else
{
discard;
}
break; // unreachable workaround
}
default:
{
_49 = true;
break;
}
}
bool4 _45 = _49.xxxx;
FragColor = float4(_45.x ? 10.0f.xxxx.x : 20.0f.xxxx.x, _45.y ? 10.0f.xxxx.y : 20.0f.xxxx.y, _45.z ? 10.0f.xxxx.z : 20.0f.xxxx.z, _45.w ? 10.0f.xxxx.w : 20.0f.xxxx.w);
}
SPIRV_Cross_Output main()
{
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FragColor = FragColor;
return stage_output;
}

Some files were not shown because too many files have changed in this diff Show More