tgjones / HlslTools

A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
http://timjones.io/blog/archive/2016/04/25/hlsl-tools-for-visual-studio-v1.0-released
Other
561 stars 97 forks source link

Texture2DArray et al are missing []-indexers #217

Closed strandborg closed 2 years ago

strandborg commented 2 years ago

See title. A quick glance into IntrinsicTypes.cs shows that indexers (the [] accessor) are only defined for Buffer and Texture2D while the HLSL language supports them for all non-cube texture types. For example, the following code shows an error in HLSLTools:

Texture2DArray<float> MyTex;
...
float myVal = MyTex[uint3(1, 2, 3)];

The error displayed is "Type 'Texture2DArray' does not have an indexer '[uint3]'"

tgjones commented 2 years ago

Thanks! I've fixed this.