HLSL: phase 3a: Add sub-vec4 rwtexture formats (qualifier.layoutFormat)

This PR sets the TQualifier layoutFormat according to the HLSL image type.
For instance:

  RWTexture1D <float2> g_tTex1df2;

becomes ElfRg32f.  Similar on Buffers, e.g, Buffer<float4> mybuffer;

The return type for image and buffer loads is now taken from the storage format.
Also, the qualifier for the return type is now (properly) a temp, not a global.
This commit is contained in:
steve-lunarg
2016-10-10 15:24:57 -06:00
parent f042e407a9
commit 4f2da27aec
22 changed files with 6033 additions and 192 deletions

View File

@@ -6,8 +6,8 @@ Shader version: 450
0:4 'Index' (in uint)
0:? Sequence
0:5 Branch: Return with expression
0:5 textureFetch (global 4-component vector of float)
0:5 'Position' (uniform samplerBuffer)
0:5 textureFetch (temp 4-component vector of float)
0:5 'Position' (layout(rgba32f ) uniform samplerBuffer)
0:5 Convert uint to int (temp int)
0:5 'Index' (in uint)
0:9 Function Definition: RealEntrypoint(u1; (temp 4-component vector of float Position)
@@ -21,7 +21,7 @@ Shader version: 450
0:10 'Index' (in uint VertexIndex)
0:10 Branch: Return
0:? Linker Objects
0:? 'Position' (uniform samplerBuffer)
0:? 'Position' (layout(rgba32f ) uniform samplerBuffer)
0:? '@entryPointOutput' (out 4-component vector of float Position)
0:? 'Index' (in uint VertexIndex)
@@ -36,8 +36,8 @@ Shader version: 450
0:4 'Index' (in uint)
0:? Sequence
0:5 Branch: Return with expression
0:5 textureFetch (global 4-component vector of float)
0:5 'Position' (uniform samplerBuffer)
0:5 textureFetch (temp 4-component vector of float)
0:5 'Position' (layout(rgba32f ) uniform samplerBuffer)
0:5 Convert uint to int (temp int)
0:5 'Index' (in uint)
0:9 Function Definition: RealEntrypoint(u1; (temp 4-component vector of float Position)
@@ -51,7 +51,7 @@ Shader version: 450
0:10 'Index' (in uint VertexIndex)
0:10 Branch: Return
0:? Linker Objects
0:? 'Position' (uniform samplerBuffer)
0:? 'Position' (layout(rgba32f ) uniform samplerBuffer)
0:? '@entryPointOutput' (out 4-component vector of float Position)
0:? 'Index' (in uint VertexIndex)
@@ -81,7 +81,7 @@ Shader version: 450
8: TypeFloat 32
9: TypeVector 8(float) 4
10: TypeFunction 9(fvec4) 7(ptr)
14: TypeImage 8(float) Buffer sampled format:Unknown
14: TypeImage 8(float) Buffer sampled format:Rgba32f
15: TypeSampledImage 14
16: TypePointer UniformConstant 15
17(Position): 16(ptr) Variable UniformConstant