From 4583e395ad503b63343a14adaeb621dee8a8da71 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Thu, 1 Feb 2018 12:06:06 -0800 Subject: Implement type splitting for raw buffers (#393) * Fix render-test to handle raw buffers I don't know if this fix will work for UAVs that are neither structured nor raw, but it fixes the code that currently only really works if every UAV is structured (since it doesn't set a format). * Make type legalization consider raw buffer types The type layout logic was already handling these, but the type splitting logic in legalization was failing to split structure types that contain, e.g., `RWByteAddressBuffer`. A compute test case has been added to confirm the fix. --- source/slang/legalize-types.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') diff --git a/source/slang/legalize-types.cpp b/source/slang/legalize-types.cpp index 76fda18e3..d0cf2ab69 100644 --- a/source/slang/legalize-types.cpp +++ b/source/slang/legalize-types.cpp @@ -91,6 +91,10 @@ static bool isResourceType(Type* type) { return true; } + else if(auto untypedBufferType = type->As()) + { + return true; + } // TODO: need more comprehensive coverage here -- cgit v1.2.3