summaryrefslogtreecommitdiffstats
path: root/tests/metal
Commit message (Collapse)AuthorAge
* 8503 wgsl depth texture (#8645)Sami Kiminki (NVIDIA)2025-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add built-in type aliases for DepthTexture* and unify Sampler*Shadow Add the following type aliases: - DepthTexture1D, DepthTexture1DArray - DepthTexture2D, DepthTexture2DArray - DepthTexture2DMS, DepthTexture2DMSArray - DepthTexture3D - DepthTextureCube, DepthTextureCubeArray These match with the type aliases for non-depth textures. Also, unify the Sampler*Shadow type aliases with DepthTexture* ones. This adds the following: - Sampler2DMSShadow - Sampler2DMSArrayShadow and removes the Sampler3DArrayShadow type alias. As a side-effect, the descriptions of Sampler*ArrayShadow type aliases are fixed ("texture-sampler for shadow" ==> "texture-sampler array for shadow"). Update the slang tests to use the newly introduced type aliases instead of the custom type aliases that use _Texture<> directly. Add DepthTexture testing in hlsl-intrinsic/texture/texture-intrinsics. Do this by extracting the test logic of computeMain() in a separate function and parametrize it for non-depth/depth texture types. This adds basic coverage for the following types: - DepthTexture1D - DepthTexture2D - DepthTexture3D - DepthTextureCube - DepthTexture1DArray - DepthTexture2DArray - DepthTextureCubeArray Issue #6166 Issue #8503
* Defer `IRCastStorageToLogicalDeref` in lowerBufferElementType pass. (#8668)Yong He2025-10-10
| | | | | | | | | | | | Fix a regression on metal test. In `lowerBufferElementTypeToStorageType` pass, not only we want to defer an argument that is `CastStorageToLogical` to the callee, but also apply the same defer logic to `CastStorageToLogicalDeref` as well. Because `CastStorageToLogicalDeref` will appear as argumnet if `lowerBufferElementTypeToStorageType` is run before we apply the `in->borrow` transformation pass, which is the case for metal parameter block legalization.
* Fix legalization crash when processing metal parameter blocks. (#8591)Yong He2025-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #7606. When Slang compile for a bindful target, we will run the resource type legalization pass to hoist resource typed struct fields outside of the struct type and define them as global parameters and passing them around via dedicated function parameters. When we compile for a bindless target, we don't run this pass. However, Metal is a hybrid bindful and bindless target. We need to run type legalization for the constant buffer, but skip type legalization for parameter block. The previous attempt to support this behavior is to hack the type legalization pass to return `LegalVal::simple` when it sees a `ParameterBlock<T>`. However, whenever the code is accessing `parameterBlock.someNestedField`, the type of the nested field may get a `LegalType::tuple`, and now we will run into inconsistent scenarios where we have a `LegalVal::simple` on the operand val, and but the legalization logic is expecting that val to be a `LegalType::tuple`. This breaks a lot of assumptions and invariants in the type legalization pass, resulting unstable/fragile behavior. To systematically solve this problem, this change generalizes the existing legalize buffer element type pass to translate `ParameterBlock<Texture2D>` (and similar cases) to `ParameterBlock<Texture2D.Handle>`. So that such parameter block will always be legalized to `LegalType:::simple` during type legalization, and we will never run into any inconsistent cases. This allowed us to get rid of the hacky logic in the type legalization pass to try to workaround the inconsistencies.
* Enhance buffer load specialization pass to specialize past field extracts. ↵Yong He2025-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#8547) This allows us to specialize functions whose argument is a sub element of a constant buffer, instead of being only applicable to entire buffer element. Closes #8421. This change also implements a proper heuristic to determine when to specialize the calls and defer the buffer loads. This PR addresses a pathological case exposed in `slangpy\slangpy\benchmarks\test_benchmark_tensor.py`, which used to take 27ms to finish, and now takes 1.25ms. For example, given: ``` struct Bottom { float bigArray[1024]; [mutating] void setVal(int index, float value) { bigArray[index] = value; } } struct Root { Bottom top[2]; [mutating] void setTopVal(int x, int y, float value) { top[x].setVal(y, value); } } RWStructuredBuffer<Root> sb; [shader("compute")] [numthreads(1, 1, 1)] void compute_main(uint3 tid: SV_DispatchThreadID) { sb[0].setTopVal(1, 2, 100.0f); } ``` We are now able to specialize the call to `setTopVal` into: ``` void compute_main(uint3 tid: SV_DispatchThreadID) { setTopVal_specialized(0, 1, 2, 100.0f); } void setTopVal_specialized(int sbIdx, int x, int y, float value) { Bottom_setVal_specialized(sbIdx, x, y, value); } void Bottom_setVal_specialized(int sbIdx, int x, int y, float value) { sb[sbIdx].top[x].bigArray[y] = value; } ``` And get rid of all unnecessary loads. Achieving this requires a combination of function call specialization and buffer-load-defer pass. The buffer-load-defer pass has been completely rewritten to be more correct and avoid introducing redundant loads. This PR also adds tests to make sure pointers, bindless handles, and loads from structured buffer or constant buffers works as expected.
* Enable metal tests (#8446)James Helferty (NVIDIA)2025-09-30
| | | | | | | | | | | | Enables all tests/metal/ tests that can be easily enabled. These tests were not originally designed as render tests; they are generally being enabled for pipecleaning purposes, and will not be rigorously testing the corresponding funcitonality. Where they cannot be enabled as render tests, and a metallib test wasn't already enabled, a metallib test was enabled instead (where possible). Fixes #7892
* Add SPV_NV_bindless_texture support (#8534)Lujin Wang2025-09-26
| | | | | | | | | | | | | Treat DescriptorHandle as uint64_t instead of uint2. Implement target-specific SPIR-V emission with the bindless texture support. For OpImageTexelPointer, Image must have a type of OpTypePointer with Type OpTypeImage. Fix the issue by using [constref] in __subscript. Add a test coverage for various texture/sampler handle types. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Remove unnecessary Load and Store pair (#8433)Jay Kwak2025-09-24
| | | | | | | | | | | | | | | | | | | | This commit removes unnecessary Load and Store pairs in IR. When the IR is like ``` let %1 = var let %2 = load(%ptr) store(%1 %2) ``` This PR will replace all uses of %1 with %ptr. And the load and store instructions will be removed. But I found that there can be cases where %2 might be still used later in other IRs. For these cases, the removal of load instruction relies on DCE. --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
* render-test: Change D3D12 default to sm_6_5 (#8320)James Helferty (NVIDIA)2025-09-02
| | | | | | | | | Changes default for render-test to sm_6_5. Since sm_6_5 is the new default, remove the -use-dxil option, add -use-dxcb option Remove -use-dxil option from all test cases. Add -use-dxcb to two tests that needed it. Fixes #7611
* Fix Metal 8-bit vector type names: emit char/uchar instead of int8_t/uint8_t ↵Copilot2025-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#8223) The Metal backend was generating incorrect type names for 8-bit vector types, causing compilation failures when targeting Metal. According to the Metal specification, 8-bit vector types should be named `charN` and `ucharN` (e.g., `char2`, `uchar3`) rather than `int8_tN` and `uint8_tN`. ## Problem When compiling Slang code with 8-bit vector types for Metal, the compiler would emit: ```metal uint8_t2 _S8 = uint8_t2(uint8_t(0U), uint8_t(16U)); int8_t3 _S9 = int8_t3(int8_t(0), int8_t(16), int8_t(48)); ``` But the Metal compiler expects: ```metal uchar2 _S8 = uchar2(uint8_t(0U), uint8_t(16U)); char3 _S9 = char3(int8_t(0), int8_t(16), int8_t(48)); ``` This caused errors like: ``` error: unknown type name 'uint8_t2'; did you mean 'uint8_t'? ``` ## Solution Modified `MetalSourceEmitter::emitSimpleTypeImpl()` to emit the correct Metal-specific type names for 8-bit types: - `kIROp_Int8Type` now emits `char` instead of `int8_t` - `kIROp_UInt8Type` now emits `uchar` instead of `uint8_t` This change only affects the Metal backend and ensures that vector types like `int8_t2`, `uint8_t3`, etc. are correctly emitted as `char2`, `uchar3`, etc. ## Testing - Added a new test case `tests/metal/8bit-vector-types.slang` to verify the fix - Re-enabled the previously disabled Metal test in `tests/hlsl-intrinsic/countbits8.slang` - Updated `tests/metal/byte-address-buffer.slang` to expect the correct type names - Verified that existing Metal tests continue to pass Fixes #8211. <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bmillsNV <163073245+bmillsNV@users.noreply.github.com>
* Emit descriptor handle correctly for ParameterBlock<DescriptorHandle> (#8206)Gangzheng Tong2025-08-18
| | | | | | | | In Metal, if `ParameterBlock` contains `DescriptorHandle` directly, it would be emitted as DescriptorHandle literal, which is not valid Metal code, This fix adds a case for `kIROp_DescriptorHandleType` and directs it to the Parent's `emitType` function to handle it.
* Fix constructor overload ambiguity with scalar and vector parameters (#8109)Copilot2025-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | Close #8090. When we do type coerce, we use a cache to store the conversion cost of different type. The key of the cache is defined by struct BasicTypeKey { uint32_t baseType : 8; uint32_t dim1 : 4; uint32_t dim2 : 4; ... } where dim1 and dim2 is used for dimension of vector and matrix. However the dim is only 4 bits, so `vector<int, 16>` will have the same key as `int`, which is wrong. Fix the issue by extending it to 8 bit. Also to make the hash key still within 32 bits, we adjust baseType to 5 bits, and knownConstantBitCount to 6 bits. --------- Co-authored-by: kaizhangNV <kazhang@nvidia.com>
* Prohibit use of buffer.GetDimensions on metal (#8156)James Helferty (NVIDIA)2025-08-15
| | | Fixes #7011
* Handle SV_Barycentrics on metal (#8163)James Helferty (NVIDIA)2025-08-13
| | | Fixes #6785
* Add support for pointer literals in metal (#8040)jarcherNV2025-08-04
| | | | Add support for kIROp_PtrLit types in metal and add a test for null pointer values, which is the only valid value.
* Fix 7441: CUDA boolean vector layout to use 1-byte elements (#7862)Harsh Aggarwal (NVIDIA)2025-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix 7441: CUDA boolean vector layout to use 1-byte elements Boolean vectors (bool1, bool2, bool3, bool4) were incorrectly implemented as integer-based types using 4 bytes per element instead of actual 1-byte boolean elements on CUDA targets. Changes: - Update CUDA prelude to define boolean vectors as structs with bool fields instead of typedef aliases to integer vectors - Implement CUDALayoutRulesImpl::GetVectorLayout to use 1-byte alignment for boolean vectors, matching actual CUDA memory layout behavior - Update make_bool functions to populate struct fields correctly This ensures boolean vectors have the same memory layout as bool[4] arrays: - bool1: 1 byte (was 4 bytes) - bool2: 2 bytes (was 8 bytes) - bool3: 3 bytes (was 12 bytes) - bool4: 4 bytes (was 16 bytes) Fixes memory layout mismatch between Slang reflection API and actual CUDA compilation, achieving 75% memory savings for boolean vector usage. * Fix CI issues - Add and update associated functions and operators * Make boolX same as uchar * Use align construct on struct for boolX * Improve Test case for robust alignment checks * Formatting * Disable selected slangpy tests * add metal check which is slightly different than cuda * Test-1 * Test-2 * Test-3 * Test-4 * ReflectionChange * cleanup and update * _slang_select with plain bool is needed for reverse-loop-checkpoint-test
* Lowering unsupported matrix types for GLSL/WGSL/Metal targets (#7936)venkataram-nv2025-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add emit cases for WGSL and GLSL * Fix compilation warnings Modify short cutting test to reflect change in emit logic Lower matrix for metal as well Add emit matrix logic for metal Fix compiler warning Brace initializer for lowered matrices Fix compiler warnings * Tests for metal * Fix mult, any, and determinant * Fix matrix-matrix multiplication * Fix mat mul to be element-wise * Fix compiler warning * Move makeMatrix to legalization * Move unary and binary arithmetic operator lowering to legalization * Remove emit logic and move final comparison operators to legalization * Handle vector/matrix negation for WGSL * Restore older SPIR-V emit logic * Address PR comments * Revert to zero minus for negation * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Fix Metal invalid as_type cast for 64-bit RWByteAddressBuffer.Store values ↵Gangzheng Tong2025-07-29
| | | | | | | | | | | | | | | | | | | | (#7843) * Fix 64-bit val lowering for metal * Add ByteAddressBuffer load/store 64-bit tests * Handle Store/Load ptr types * Use bitcast for non-pointer typers * format code (#7966) Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Add test for Metal pointer uniform parameter (#7850)Jay Kwak2025-07-24
| | | | | | | | | * Add test for Metal pointer uniform parameter * Update the test to include runtime result * Adding CUDA to the test * Adding -render-features argument-buffer-tier-2
* Fix Metal pointer type emission in entry point parameters (#7759)Jay Kwak2025-07-16
| | | | | | | | | | | | | | * Fix Metal pointer type emission in entry point parameters Add missing default case in Metal emitter's address space switch to preserve pointer types. Previously, unrecognized address spaces would fall through without emitting pointer syntax, causing uint64_t* to become ulong instead of ulong constant*. Fixes #7605, #6174 * Treat AddressSpace::UserPointer as Global in Metal Also adding another test for `uniform` keyword
* Fix metal segfault by check vectorValue before accessing (#7688)Gangzheng Tong2025-07-11
| | | | | | | | | | | | | | | | | | | | | | | | * Check vectorValue before accessing * Fix metal segfault by using IRElementExtract for general vector handling Address review comments by replacing IRMakeVector-specific code with IRElementExtract to handle any vector instruction type (IRIntCast, etc). This makes the code more robust and fixes cases where float2(1,2) creates IRIntCast instead of IRMakeVector. Co-authored-by: Yong He <csyonghe@users.noreply.github.com> * Fix sign comparison warning in metal legalize Cast originalElementCount->getValue() to UInt to avoid comparison between signed and unsigned integers. Co-authored-by: Yong He <csyonghe@users.noreply.github.com> --------- Co-authored-by: Yong He <yonghe@outlook.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Yong He <csyonghe@users.noreply.github.com>
* Don't use access::sample for multisample texture in metal (#7601)Gangzheng Tong2025-07-03
| | | | | | | | | | | | | | * don't use access::sample for multisample texture * Add test case * format code (#7603) Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Fix additional VVL violations (#7377)Gangzheng Tong2025-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix: add sampleCount and mipMaps to st2DMS_f32v4 Fix VUID-VkImageCreateInfo-samples-02257: The Vulkan spec states: If an OpTypeImage has an MS operand 1, its bound image must not have been created with VkImageCreateInfo::samples as VK_SAMPLE_COUNT_1_BIT * Fix VUID-VkShaderModuleCreateInfo-pCode-08740 Rename VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME to VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME * fix: add sampleCount and mipMaps to st2DMS_f32v4 Fix VUID-VkImageCreateInfo-samples-02257: The Vulkan spec states: If an OpTypeImage has an MS operand 1, its bound image must not have been created with VkImageCreateInfo::samples as VK_SAMPLE_COUNT_1_BIT * Fix VUID-VkShaderModuleCreateInfo-pCode-08740 Rename VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME to VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME * Fix VUID-vkCmdDispatch-None-06479 Use correct format for combined depth texture. * Fix VUID-vkCmdDispatch-format-07753 by setting format Parse filtering mode for sampler because the RGBA8* formats do not support linear filtering * Create MS texture type for sample count > 1 * Use different texture formats for depth compare and gather ops * Use clearTexture for init the data for MS textures
* Fix reflection to json issue (#7379)kaizhangNV2025-06-10
| | | | | Apply argument buffer tier2 rule when using parameter block for Metal target. Close #6803.
* Legalise out parameters for vertex shaders on metal (#6943)Ellie Hermaszewska2025-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle pointer types when getting type cast style Closes https://github.com/shader-slang/slang/issues/6025 * Move vertex shader out parameters to return type for Metal Closes https://github.com/shader-slang/slang/issues/6025 * More asserts * Make struct instead of tuple * More layout preservation * Handle same function result * more layout * remove layout * a * more debug code * more debug code * a * layout working * refactored * more tests * more tests * fuse loops * remove unused comments * Correct filecheck usage * debug code * correct name and order of filecheck vars * simplify * Address review comments fix warning * simplify handling of simple vertex shaders
* Fix HLSL ByteAddressBuffer Load* parameter integer type (#7117)Darren Wihandi2025-05-16
| | | | | | | | | * Fix HLSL ByteAddressBuffer Load* parameter integer type * Fix tests * Fix load with alignment function signature clash * Fix LoadAligned tests
* Metal remove void field (#6725)kaizhangNV2025-04-02
| | | | | | | | | | | | | | * Reapply "Eliminate empty struct on metal target (#6603)" (#6711) This reverts commit bc9dc6557fc0cc3a4c0c2ff27e636940e361cf5d. * Remove argument in make_struct call corresponding to void field This is a follow-up of #6543, where we leave the VoidType field as it in make_struct call during legalization pass. So during cleaning_void IR pass, when we remove "VoidType" from struct, we will have to also clean up the argument corresponding to the "VoidType" field.
* Use coopvec supporting dxcompiler.dll and dxil.dll (#6719)Jay Kwak2025-04-01
| | | | | * Use coopvec supporting dxcompiler.dll and dxil.dll * Fix the failing tests
* Revert "Eliminate empty struct on metal target (#6603)" (#6711)Jay Kwak2025-03-31
| | | This reverts commit b3deec2001ea34e20e9a6af8ddf5cf3866cafac0.
* Eliminate empty struct on metal target (#6603)kaizhangNV2025-03-26
| | | | | | | | | | | | | | * Eliminate empty struct on metal target Close 6573. We previously disabled the type legalization for ParameterBlock on Metal, but Metal doesn't allow empty struct in the argument buffer which is mapped from ParameterBlock, so we will need legalizeEmptyTypes on Metal target. * update test * update function name
* Metal fix (#6413)kaizhangNV2025-02-20
| | | | | | | | | | | Partially fix #6378 * Fix invalid access mode for texture_buffer * Fix texture view create issue in metal In newTextureView, levelRange should represent the mipmap level range, while sliceRange should represent the texture layer range for texture array. But the implement inverse those two wrongly.
* Fix depth texture sampling on Metal. (#6168)Yong He2025-01-24
|
* Remove unnecessary parameters from Metal entry point signature (#6131)Darren Wihandi2025-01-22
| | | | | | | | | | | | | | | | | * fix metal entry point global params * address review comments, cleanup and test * remove dead code * undo accidental change * address review comments and cleanup * minor fix and cleanup --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Refactor _Texture to constrain on texel types. (#6115)Yong He2025-01-17
| | | | | | | | | * Refactor _Texture to constrain on texel types. * Fix tests. * Fix. * Disable glsl texture test because rhi can't run it correctly.
* hoist entry point params for wgsl (#6116)Darren Wihandi2025-01-17
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* C-like emitter: Add parenthesis when combining relational and bitwise… (#6070)Anders Leino2025-01-16
| | | | | | | | | | | | | | | | | | | | * C-like emitter: Add redundant parentheses in several cases This is required since the Dawn WGSL compiler requires parentheses even though precedence rules could resolve order of operations. This closes #6005. * Fix tests/metal/byte-address-buffer The output now includes parentheses around shift expressions appearing as operands in bitwise expressions, so update the test accordingly. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
* WGSL: Convert signed vector shift amounts to unsigned (#6023)Anders Leino2025-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | * WGSL: Fixes for signed shift amounts - Handle the case of vector shift amounts - Closes #5985 - Move handling of scalar case from emit to legalization - Add tests for bitshifts. * Move the binary operator legalization function to a common place * Metal: Legalize binary operations Closes #6029. * Fix Metal filecheck test The int shift amounts are now converted to unsigned. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
* Fix Metal type layout reflection for nested parameter blocks. (#6042)Yong He2025-01-10
|
* Add CalculateLevelOfDetail* overloads for comparison samplers (#6018)Darren Wihandi2025-01-09
| | | | | | | | | | | | | * add CalculateLevelOfDetail* intrinsics for comparison samplers * fix dx12 test * fix metallib test * fix merge conflict --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Add SampleCmpLevel intrinsics (#6004)Darren Wihandi2025-01-08
| | | | | | | | | | | | | | | | | | | * add SampleCmpLevel intrinsics * update tests * fix typo * fix broken glsl test * refactor SampleCmpLevelZero * fix metallib test * fix broken test on dx12 --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Fix reflection for metal vector [[id]] location. (#5943)Yong He2025-01-01
|
* Support explicit `[vk::location(n)]` binding on metal/wgsl. (#5907)Yong He2024-12-18
|
* Support matrix negation in metal backend. (#5891)Yong He2024-12-16
|
* Enable WGSL tests that works for Metal related to Semantics (#5816)Jay Kwak2024-12-10
| | | | | | * Enable WGSP tests that works for Metal related to Semantics This commit enables existing tests for WGSL that are enabled for Metal regarding the Semantics.
* Varying inputs and outputs for wgsl (#5669)Ellie Hermaszewska2024-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes https://github.com/shader-slang/slang/issues/5067 New tests, covering what's declared supported in the WGSL support docs - tests/wgsl/semantic-coverage.slang - tests/wgsl/semantic-depth.slang - tests/wgsl/semantic-dispatch-thread-id.slang - tests/wgsl/semantic-group-id.slang - tests/wgsl/semantic-group-index.slang - tests/wgsl/semantic-group-thread-id.slang - tests/wgsl/semantic-instance-id.slang - tests/wgsl/semantic-is-front-face.slang - tests/wgsl/semantic-position.slang - tests/wgsl/semantic-sample-index.slang - tests/wgsl/semantic-vertex-id.slang WGSL enabled existing tests: - tests/compute/compile-time-loop.slang - tests/compute/constexpr.slang - tests/compute/discard-stmt.slang - tests/metal/nested-struct-fragment-input.slang - tests/metal/nested-struct-fragment-output.slang - tests/metal/nested-struct-multi-entry-point-vertex.slang - tests/metal/no-struct-vertex-output.slang - tests/metal/sv_target-complex-1.slang - tests/metal/sv_target-complex-2.slang - tests/bugs/texture2d-gather.hlsl - tests/render/cross-compile-entry-point.slang - tests/render/nointerpolation.hlsl - tests/render/render0.hlsl - tests/render/cross-compile0.hlsl - tests/render/imported-parameters.hlsl - tests/render/unused-discard.hlsl Can't be enabled due to missing wgsl features - tests/compute/texture-sampling.slang Co-authored-by: Yong He <yonghe@outlook.com>
* Fix IntVal unification logic to insert type casts + buffer element lowering ↵Yong He2024-11-06
| | | | | | | regression. (#5508) * Fix IntVal unification logic to insert type casts. * Fix regression.
* Revert uint<->int implicit cast cost to prefer promotion to unsigned. (#5480)Yong He2024-11-02
|
* Cleanup atomic intrinsics. (#5324)Yong He2024-10-17
| | | | | | | | | | | | | | | | | | | * Cleanup atomic intrinsics. * Fix. * Fix glsl. * Remove hacky intrinsic expansion logic for glsl image atomics. * Fix all tests. * Fix. * Add `InterlockedAddF16Emulated`. * Fix glsl intrinsic. * Fix.
* Enable WebGPU tests in CI (#5239)Anders Leino2024-10-15
|
* Metal: Texture write fix (#4952)Dynamitos2024-10-09
|
* Overhaul docgen tool and setup CI to generate stdlib reference. (#5232)Yong He2024-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Overhaul docgen tool and setup CI to generate stdlib reference. * Fix build error. * Write parsed doc for all decls. * fix. * fix callout. * Fix. * Fix comment. * Fix. * Delete obsolete doc tests. * Fix. * Categorize functions and types. * Fix CI. * Update comments.