From de454b0e84ae160678698609b4754242159ae566 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Wed, 26 Jun 2024 08:55:54 -0700 Subject: [PATCH] Fix Texture2DMSArray (#4485) * Fix Texture2DMSArray Close #4427 We had the postfix order wrong for the keyword MS. This commit changes the incorrect name Texture2DArrayMS to Texture2DMSArray. --- source/slang/glsl.meta.slang | 2 -- source/slang/hlsl.meta.slang | 2 +- tests/compute/texture-subscript-multisample.slang | 14 +++++++------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/source/slang/glsl.meta.slang b/source/slang/glsl.meta.slang index 7d47a8b3f3..523d9af90e 100644 --- a/source/slang/glsl.meta.slang +++ b/source/slang/glsl.meta.slang @@ -1636,8 +1636,6 @@ public typealias sampler2DMS = Sampler2DMS; public typealias isampler2DMS = Sampler2DMS; public typealias usampler2DMS = Sampler2DMS; -__generic -public typealias Sampler2DMSArray = Sampler2DArrayMS; public typealias sampler2DMSArray = Sampler2DMSArray; public typealias isampler2DMSArray = Sampler2DMSArray; public typealias usampler2DMSArray = Sampler2DMSArray; diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index 94a5208b07..d9e7b9d669 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -3231,7 +3231,7 @@ ${{{{ auto requireString = requireStringBuilder.toString(); }}}} $(requireString) -typealias $(accessPrefix[access])$(textureTypeName)$(shapeTypeNames[shape])$(arrayPostFix[isArray])$(msPostFix[isMS]) = __TextureImpl; +typealias $(accessPrefix[access])$(textureTypeName)$(shapeTypeNames[shape])$(msPostFix[isMS])$(arrayPostFix[isArray]) = __TextureImpl; ${{{{ } }}}} diff --git a/tests/compute/texture-subscript-multisample.slang b/tests/compute/texture-subscript-multisample.slang index 4640a2630d..76ededbda0 100644 --- a/tests/compute/texture-subscript-multisample.slang +++ b/tests/compute/texture-subscript-multisample.slang @@ -12,8 +12,8 @@ //TEST_INPUT: RWTexture2D(format=R8G8B8A8_SINT, size=4, content = zero, sampleCount=two, mipMaps = 1):name outputTexture2DMS RWTexture2DMS outputTexture2DMS; -//TEST_INPUT: RWTexture2D(format=R8G8B8A8_SINT, size=4, content = zero, arrayLength=2, sampleCount=two, mipMaps = 1):name outputTexture2DArrayMS -RWTexture2DArrayMS outputTexture2DArrayMS; +//TEST_INPUT: RWTexture2D(format=R8G8B8A8_SINT, size=4, content = zero, arrayLength=2, sampleCount=two, mipMaps = 1):name outputTexture2DMSArray +RWTexture2DMSArray outputTexture2DMSArray; //TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer RWStructuredBuffer outputBuffer; @@ -26,16 +26,16 @@ void computeMain() outputTexture2DMS[0, 0].xz = int2(1,2); outputTexture2DMS[int2(0, 0), 1].xz = int2(3,4); - outputTexture2DArrayMS[0, 0].xz = int2(1,2); - outputTexture2DArrayMS[int3(0, 0, 1), 1].xz = int2(3,4); + outputTexture2DMSArray[0, 0].xz = int2(1,2); + outputTexture2DMSArray[int3(0, 0, 1), 1].xz = int2(3,4); outputBuffer[0] = uint(true && all(outputTexture2DMS[0, 0] == int4(1, 0, 2, 0)) == true && all(outputTexture2DMS[int2(0, 0), 1] == int4(3, 0, 4, 0)) == true - && all(outputTexture2DArrayMS[0, 0] == int4(1, 0, 2, 0)) == true - && all(outputTexture2DArrayMS[int3(0, 0, 1), 1] == int4(3, 0, 4, 0)) == true + && all(outputTexture2DMSArray[0, 0] == int4(1, 0, 2, 0)) == true + && all(outputTexture2DMSArray[int3(0, 0, 1), 1] == int4(3, 0, 4, 0)) == true ); } -//BUF: 1 \ No newline at end of file +//BUF: 1