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

@ -5,55 +5,55 @@ gl_FragCoord origin is upper left
0:40 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth})
0:40 Function Parameters:
0:? Sequence
0:44 imageLoad (global 4-component vector of float)
0:44 imageLoad (temp 4-component vector of float)
0:44 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
0:44 c1: direct index for structure (layout(offset=0 ) uniform int)
0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:44 Constant:
0:44 0 (const uint)
0:45 imageLoad (global 4-component vector of int)
0:45 imageLoad (temp 4-component vector of int)
0:45 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D)
0:45 c1: direct index for structure (layout(offset=0 ) uniform int)
0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:45 Constant:
0:45 0 (const uint)
0:46 imageLoad (global 4-component vector of uint)
0:46 imageLoad (temp 4-component vector of uint)
0:46 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D)
0:46 c1: direct index for structure (layout(offset=0 ) uniform int)
0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:46 Constant:
0:46 0 (const uint)
0:49 imageLoad (global 4-component vector of float)
0:49 imageLoad (temp 4-component vector of float)
0:49 'g_tTex2df4' (layout(rgba32f ) uniform image2D)
0:49 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:49 Constant:
0:49 1 (const uint)
0:50 imageLoad (global 4-component vector of int)
0:50 imageLoad (temp 4-component vector of int)
0:50 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D)
0:50 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:50 Constant:
0:50 1 (const uint)
0:51 imageLoad (global 4-component vector of uint)
0:51 imageLoad (temp 4-component vector of uint)
0:51 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D)
0:51 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:51 Constant:
0:51 1 (const uint)
0:54 imageLoad (global 4-component vector of float)
0:54 imageLoad (temp 4-component vector of float)
0:54 'g_tTex3df4' (layout(rgba32f ) uniform image3D)
0:54 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
0:54 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:54 Constant:
0:54 2 (const uint)
0:55 imageLoad (global 4-component vector of int)
0:55 imageLoad (temp 4-component vector of int)
0:55 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D)
0:55 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
0:55 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:55 Constant:
0:55 2 (const uint)
0:56 imageLoad (global 4-component vector of uint)
0:56 imageLoad (temp 4-component vector of uint)
0:56 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D)
0:56 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
0:56 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
@ -122,55 +122,55 @@ gl_FragCoord origin is upper left
0:40 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth})
0:40 Function Parameters:
0:? Sequence
0:44 imageLoad (global 4-component vector of float)
0:44 imageLoad (temp 4-component vector of float)
0:44 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
0:44 c1: direct index for structure (layout(offset=0 ) uniform int)
0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:44 Constant:
0:44 0 (const uint)
0:45 imageLoad (global 4-component vector of int)
0:45 imageLoad (temp 4-component vector of int)
0:45 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D)
0:45 c1: direct index for structure (layout(offset=0 ) uniform int)
0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:45 Constant:
0:45 0 (const uint)
0:46 imageLoad (global 4-component vector of uint)
0:46 imageLoad (temp 4-component vector of uint)
0:46 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D)
0:46 c1: direct index for structure (layout(offset=0 ) uniform int)
0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:46 Constant:
0:46 0 (const uint)
0:49 imageLoad (global 4-component vector of float)
0:49 imageLoad (temp 4-component vector of float)
0:49 'g_tTex2df4' (layout(rgba32f ) uniform image2D)
0:49 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:49 Constant:
0:49 1 (const uint)
0:50 imageLoad (global 4-component vector of int)
0:50 imageLoad (temp 4-component vector of int)
0:50 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D)
0:50 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:50 Constant:
0:50 1 (const uint)
0:51 imageLoad (global 4-component vector of uint)
0:51 imageLoad (temp 4-component vector of uint)
0:51 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D)
0:51 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:51 Constant:
0:51 1 (const uint)
0:54 imageLoad (global 4-component vector of float)
0:54 imageLoad (temp 4-component vector of float)
0:54 'g_tTex3df4' (layout(rgba32f ) uniform image3D)
0:54 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
0:54 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:54 Constant:
0:54 2 (const uint)
0:55 imageLoad (global 4-component vector of int)
0:55 imageLoad (temp 4-component vector of int)
0:55 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D)
0:55 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
0:55 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
0:55 Constant:
0:55 2 (const uint)
0:56 imageLoad (global 4-component vector of uint)
0:56 imageLoad (temp 4-component vector of uint)
0:56 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D)
0:56 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
0:56 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})