From df0a201d85eac4c55c1abf15ed0bf9baea0ae971 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Tue, 11 Jun 2024 07:05:46 -0700 Subject: 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. --- tests/diagnostics/int-texture-sample.slang | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'tests/diagnostics') 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 itex, SamplerState s) +Texture2D t2D; +SamplerState s; + +//TEST_INPUT: ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer +RWStructuredBuffer 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)); } + -- cgit v1.2.3