You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
For the (currently unmerged) SpirvType PR, Texture2D (and presumably other built-in types) cannot be used as an argument to an alias template for SpirvType
foo.hlsl:2:1: error: 'Texture2D<vector<float, 4> >' is an object and cannot be used as a type parameter
using Array = vk::SpirvOpaqueType</* OpTypeArray */ 28, SomeType, vk::integral_constant<uint, Length> >;
^
foo.hlsl:5:3: note: in instantiation of template type alias 'Array' requested here
Array<Texture2D, 4> image;
^
There has been a validation error for passing in a built-in type to a
template since the first commit to DXC. This check exists to prevent
instances like this:
```
Texture2D<SamplerState> image;
```
When DXC was first created, users could not create their own templates,
and therefore having a generic check for this did not cause any
problems. However, now that HLSL 2021 allows users to create their own
templates, and inline SPIR-V lets users pass types in to the SpirvType
and SpirvOpaqueType templates in order to reference them, this is
causing problems.
This PR allows the SpirvType and SpirvOpaqueType templates to take
HLSL built-in types as arguments.
Fixesmicrosoft#6498
Description
For the (currently unmerged)
SpirvType
PR,Texture2D
(and presumably other built-in types) cannot be used as an argument to an alias template forSpirvType
Steps to Reproduce
Compile
With the command
Actual Behavior
Error:
Environment
libdxcompiler.so: 1.8(dev;4545-a97b48a5)
(development version of [SPIR-V] Implement SpirvType and SpirvOpaqueType #6156)The text was updated successfully, but these errors were encountered: