summaryrefslogtreecommitdiffstats
path: root/tests/compute/texture-subscript-cuda.slang
Commit message (Collapse)AuthorAge
* Fix CUDA issues with texture reads and surface writes (#7780)Mukund Keshava2025-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix 1D texture reads in CUDA target Fixes #7570: 1D surface writes don't work The issue was that the Load function for read-only textures (hlsl.meta.slang lines 3629-3656) only supported 2D and 3D textures for CUDA targets, causing 1D texture reads to fall through to <invalid intrinsic>. This affected the srcTexture[tid.x] read operation in the reproduction case. Changes: - Updated static_assert to include SLANG_TEXTURE_1D support - Added tex1DArrayfetch_int<T> for 1D array texture reads - Added tex1Dfetch_int<T> for regular 1D texture reads 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Mukund Keshava <mkeshavaNV@users.noreply.github.com> * Add 1D texture read support for CUDA target - Add tex1Dfetch_int template specializations for float2, float4, uint, uint2, uint4 - Remove TODO comment about 1D PTX not being supported - Enable 1D texture test in texture-subscript-cuda.slang - Fix assembly code issues in original template specializations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Mukund Keshava <mkeshavaNV@users.noreply.github.com> * Update slang-cuda-prelude.h * Fix texture3d ptx issue * undo 1D texture changes * Update hlsl.meta.slang * Update hlsl.meta.slang * Update hlsl.meta.slang * Update hlsl.meta.slang * Extend texture-subscript-cuda.slang test with uint and int format variants Add test cases for newly supported texture formats in CUDA: - 2D textures with uint, uint2, uint4 - 2D textures with int, int2, int4 - 3D textures with uint, uint2, uint4 - 3D textures with int, int2, int4 This ensures the texture subscript operations work correctly for all the format variants added in the CUDA texture fixes. Co-authored-by: Mukund Keshava <mkeshavaNV@users.noreply.github.com> * update expected file --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mukund Keshava <mkeshavaNV@users.noreply.github.com>
* cuda: Add more formats for texture read/write (#7012)Mukund Keshava2025-05-12
| | | | | | | | | | | | | | | | | | * WiP: Add more formats for texture reads * fix test * format code * add float2/float4 versions for 1D and 3D as well * fixed review comment * fix review comments --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
* Add subscript operator support in cuda (#6830)Mukund Keshava2025-04-30
* cuda: Add support for subscript operator This CL adds support for the subscript operator for Read Only textures in cuda. Also adds a test for this. Fixes #6781 * format code * fix review comments * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>