diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2024-06-11 07:05:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-11 07:05:46 -0700 |
| commit | df0a201d85eac4c55c1abf15ed0bf9baea0ae971 (patch) | |
| tree | 2ee9aa509fd9da80c9be0d5647c181bde41fa0b3 /tests/diagnostics | |
| parent | 51d358546424646f60f1b214378a366ebb077d03 (diff) | |
Support integer typed textures for GLSL (#4329)
* Support integer typed textures for GLSL
This commit re-enables the ability to sample from an integer typed
texture for GLSL functions while keeping it unavailable for HLSL target.
Diffstat (limited to 'tests/diagnostics')
| -rw-r--r-- | tests/diagnostics/int-texture-sample.slang | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/diagnostics/int-texture-sample.slang b/tests/diagnostics/int-texture-sample.slang index 696e13a60..a6e0eeb16 100644 --- a/tests/diagnostics/int-texture-sample.slang +++ b/tests/diagnostics/int-texture-sample.slang @@ -1,7 +1,14 @@ -//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):-target hlsl -stage compute -entry computeMain -void test(Texture2D<int4> itex, SamplerState s) +Texture2D<int4> t2D; +SamplerState s; + +//TEST_INPUT: ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer +RWStructuredBuffer<int4> outputBuffer; + +void computeMain() { - // CHECK: ([[# @LINE+1]]): error - itex.Sample(s, float2(0.0, 0.0)); + // CHECK: error 41400: {{.*}} HLSL supports only float and half type textures + outputBuffer[0] = t2D.Sample(s, float2(0.0, 0.0)); } + |
