diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-02-01 12:06:06 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-01 12:06:06 -0800 |
| commit | 4583e395ad503b63343a14adaeb621dee8a8da71 (patch) | |
| tree | 8dc7ea0861ee11c5742925785ecb7b312c242599 /source | |
| parent | b6bc0837ba6e7fb42280bf6289f4dab633c88392 (diff) | |
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.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/legalize-types.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<UntypedBufferResourceType>()) + { + return true; + } // TODO: need more comprehensive coverage here |
