From 43728fbda5b9af19eded18fe82ca67b66cc6d0f7 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 22 Nov 2024 15:14:48 -0800 Subject: Don't treat StrcturedBuffer as a specializable param. (#5645) * Don't treat StrcturedBuffer as a specializable param. * Fix RHI. --- tests/compute/dynamic-dispatch-13.slang | 1 - tests/compute/dynamic-dispatch-14.slang | 4 +--- tests/compute/dynamic-dispatch-15.slang | 2 +- tests/compute/interface-assoc-type-param.slang | 3 ++- 4 files changed, 4 insertions(+), 6 deletions(-) (limited to 'tests/compute') diff --git a/tests/compute/dynamic-dispatch-13.slang b/tests/compute/dynamic-dispatch-13.slang index 20d78e0ad..eff5218a0 100644 --- a/tests/compute/dynamic-dispatch-13.slang +++ b/tests/compute/dynamic-dispatch-13.slang @@ -17,7 +17,6 @@ interface IInterface RWStructuredBuffer gOutputBuffer; //TEST_INPUT: set gCb = new StructuredBuffer{new MyImpl{1}}; RWStructuredBuffer gCb; -// Add two elements into the structured buffer to prevent specialization. //TEST_INPUT: set gCb1 = new StructuredBuffer{new MyImpl{1}, new MyImpl2{2}}; RWStructuredBuffer gCb1; diff --git a/tests/compute/dynamic-dispatch-14.slang b/tests/compute/dynamic-dispatch-14.slang index 641fe938c..16703aa2a 100644 --- a/tests/compute/dynamic-dispatch-14.slang +++ b/tests/compute/dynamic-dispatch-14.slang @@ -23,12 +23,10 @@ interface IInterface //TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=gOutputBuffer RWStructuredBuffer gOutputBuffer; - -// Specialize gCb1, but not gCb2 //TEST_INPUT: set gCb = new StructuredBuffer{new MyImpl{1}}; RWStructuredBuffer gCb; -//TEST_INPUT: set gCb1 = dynamic new StructuredBuffer{new MyImpl{1}} +//TEST_INPUT: set gCb1 = new StructuredBuffer{new MyImpl{1}} RWStructuredBuffer gCb1; [numthreads(4, 1, 1)] diff --git a/tests/compute/dynamic-dispatch-15.slang b/tests/compute/dynamic-dispatch-15.slang index 2ab169281..46e209a8a 100644 --- a/tests/compute/dynamic-dispatch-15.slang +++ b/tests/compute/dynamic-dispatch-15.slang @@ -14,7 +14,7 @@ interface IInterface //TEST_INPUT:ubuffer(data=[0], stride=4):out,name=gOutputBuffer RWStructuredBuffer gOutputBuffer; -//TEST_INPUT: set gObj = dynamic new StructuredBuffer[new FloatVal{1.0}, new Float4Val{{[2.0, 3.0, 4.0, 5.0]}}, new IntVal{6}, new Int4Val{[7,8,9,10]}]; +//TEST_INPUT: set gObj = new StructuredBuffer[new FloatVal{1.0}, new Float4Val{{[2.0, 3.0, 4.0, 5.0]}}, new IntVal{6}, new Int4Val{[7,8,9,10]}]; RWStructuredBuffer gObj; [numthreads(1, 1, 1)] diff --git a/tests/compute/interface-assoc-type-param.slang b/tests/compute/interface-assoc-type-param.slang index a234d457f..6f7443e1f 100644 --- a/tests/compute/interface-assoc-type-param.slang +++ b/tests/compute/interface-assoc-type-param.slang @@ -16,7 +16,8 @@ interface IEval uint eval(); } -export struct Impl : IInterface +//TEST_INPUT: type_conformance Impl:IInterface = 0 +struct Impl : IInterface { uint val; struct TEval : IEval -- cgit v1.2.3