glslang/Test/baseResults/hlsl.shift.per-set.frag.out
LoopDawg 08a14422c1 Add per-descriptor-set IO mapping shift values.
This PR adds the ability to provide per-descriptor-set IO mapping shift
values.  If a particular binding does not land into a per-set value,
then it falls back to the prior behavior (global shifts per resource class).

Because there were already 6 copies of many different methods and internal
variables and functions, and this PR would have added 6 more, a new API is
introduced to cut down on replication and present a cleaner interface.
For the global (non-set-specific) API, the old entry points still exist
for backward compatibility, but are phrased internally in terms of the
following.

    // Resource type for IO resolver
    enum TResourceType {
        EResSampler,
        EResTexture,
        EResImage,
        EResUbo,
        EResSsbo,
        EResUav,
        EResCount
    };

Methods on TShader:

    void setShiftBinding(TResourceType res, unsigned int base);
    void setShiftBindingForSet(TResourceType res, unsigned int set, unsigned int base);

The first method replaces the 6 prior entry points of various spellings, which
exist now in depreciated form.  The second provides per-resource-set functionality.
Both accept an enum from the list above.

From the command line, the existing options can accept either a single shift value as
before, or a series of 1 or more [set offset] pairs.  Both can be provided, as in:

    ... --stb 20 --stb 2 25 3 30 ...

which will use the offset 20 for anything except descriptor set 2 (which uses 25) and
3 (which uses 30).
2017-10-19 11:50:30 -06:00

226 lines
13 KiB
Plaintext

hlsl.shift.per-set.frag
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:34 Function Definition: @main( ( temp 4-component vector of float)
0:34 Function Parameters:
0:? Sequence
0:35 't1' (layout( set=1 binding=1) uniform texture1D)
0:36 't2' (layout( set=1 binding=2) uniform texture2D)
0:37 't3' (layout( set=2 binding=1) uniform texture3D)
0:38 direct index (layout( row_major std430) buffer 4-component vector of float)
0:38 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of 4-component vector of float)
0:38 't4' (layout( set=3 binding=1 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of float @data})
0:38 Constant:
0:38 0 (const uint)
0:38 Constant:
0:38 0 (const int)
0:39 indirect index (layout( row_major std430) buffer uint)
0:39 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint)
0:39 't5' (layout( set=3 binding=2 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
0:39 Constant:
0:39 0 (const uint)
0:39 right-shift ( temp int)
0:39 Constant:
0:39 0 (const int)
0:39 Constant:
0:39 2 (const int)
0:40 't6' (layout( set=3 binding=3 rgba32f) uniform textureBuffer)
0:42 's1' (layout( set=1 binding=1) uniform sampler)
0:43 's2' (layout( set=2 binding=2) uniform sampler)
0:45 'u1' (layout( set=1 binding=1 rgba32f) uniform image1D)
0:46 'u2' (layout( set=2 binding=2 rgba32f) uniform image2D)
0:47 'u3' (layout( set=2 binding=3 rgba32f) uniform image3D)
0:49 imageLoad ( temp float)
0:49 'u4' (layout( set=1 binding=4 r32f) uniform imageBuffer)
0:49 Constant:
0:49 0 (const int)
0:50 indirect index (layout( row_major std430) buffer uint)
0:50 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint)
0:50 'u5' (layout( set=2 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
0:50 Constant:
0:50 0 (const uint)
0:50 right-shift ( temp int)
0:50 Constant:
0:50 0 (const int)
0:50 Constant:
0:50 2 (const int)
0:51 direct index (layout( row_major std430) buffer float)
0:51 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of float)
0:51 'u6' (layout( set=3 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:51 Constant:
0:51 0 (const uint)
0:51 Constant:
0:51 0 (const int)
0:52 'u7' (layout( set=4 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:53 'u8' (layout( set=5 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:55 cb1: direct index for structure (layout( row_major std140) uniform int)
0:55 'anon@0' (layout( set=6 binding=1 row_major std140) uniform block{layout( row_major std140) uniform int cb1})
0:55 Constant:
0:55 0 (const uint)
0:56 tb1: direct index for structure (layout( row_major std430) buffer int)
0:56 'anon@1' (layout( binding=7 row_major std430) readonly buffer block{layout( row_major std430) buffer int tb1})
0:56 Constant:
0:56 0 (const uint)
0:58 Branch: Return with expression
0:58 Constant:
0:58 0.000000
0:58 0.000000
0:58 0.000000
0:58 0.000000
0:34 Function Definition: main( ( temp void)
0:34 Function Parameters:
0:? Sequence
0:34 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:34 Function Call: @main( ( temp 4-component vector of float)
0:? Linker Objects
0:? 's1' (layout( set=1 binding=1) uniform sampler)
0:? 's2' (layout( set=2 binding=2) uniform sampler)
0:? 't1' (layout( set=1 binding=1) uniform texture1D)
0:? 't2' (layout( set=1 binding=2) uniform texture2D)
0:? 't3' (layout( set=2 binding=1) uniform texture3D)
0:? 't4' (layout( set=3 binding=1 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of float @data})
0:? 't5' (layout( set=3 binding=2 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
0:? 't6' (layout( set=3 binding=3 rgba32f) uniform textureBuffer)
0:? 'u1' (layout( set=1 binding=1 rgba32f) uniform image1D)
0:? 'u2' (layout( set=2 binding=2 rgba32f) uniform image2D)
0:? 'u3' (layout( set=2 binding=3 rgba32f) uniform image3D)
0:? 'u4' (layout( set=1 binding=4 r32f) uniform imageBuffer)
0:? 'u5' (layout( set=2 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
0:? 'u6' (layout( set=3 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:? 'u7' (layout( set=4 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:? 'u8' (layout( set=5 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:? 'anon@0' (layout( set=6 binding=1 row_major std140) uniform block{layout( row_major std140) uniform int cb1})
0:? 'anon@1' (layout( binding=7 row_major std430) readonly buffer block{layout( row_major std430) buffer int tb1})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
Linked fragment stage:
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:34 Function Definition: @main( ( temp 4-component vector of float)
0:34 Function Parameters:
0:? Sequence
0:35 't1' (layout( set=1 binding=1) uniform texture1D)
0:36 't2' (layout( set=1 binding=2) uniform texture2D)
0:37 't3' (layout( set=2 binding=1) uniform texture3D)
0:38 direct index (layout( row_major std430) buffer 4-component vector of float)
0:38 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of 4-component vector of float)
0:38 't4' (layout( set=3 binding=1 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of float @data})
0:38 Constant:
0:38 0 (const uint)
0:38 Constant:
0:38 0 (const int)
0:39 indirect index (layout( row_major std430) buffer uint)
0:39 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint)
0:39 't5' (layout( set=3 binding=2 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
0:39 Constant:
0:39 0 (const uint)
0:39 right-shift ( temp int)
0:39 Constant:
0:39 0 (const int)
0:39 Constant:
0:39 2 (const int)
0:40 't6' (layout( set=3 binding=3 rgba32f) uniform textureBuffer)
0:42 's1' (layout( set=1 binding=1) uniform sampler)
0:43 's2' (layout( set=2 binding=2) uniform sampler)
0:45 'u1' (layout( set=1 binding=1 rgba32f) uniform image1D)
0:46 'u2' (layout( set=2 binding=2 rgba32f) uniform image2D)
0:47 'u3' (layout( set=2 binding=3 rgba32f) uniform image3D)
0:49 imageLoad ( temp float)
0:49 'u4' (layout( set=1 binding=4 r32f) uniform imageBuffer)
0:49 Constant:
0:49 0 (const int)
0:50 indirect index (layout( row_major std430) buffer uint)
0:50 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint)
0:50 'u5' (layout( set=2 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
0:50 Constant:
0:50 0 (const uint)
0:50 right-shift ( temp int)
0:50 Constant:
0:50 0 (const int)
0:50 Constant:
0:50 2 (const int)
0:51 direct index (layout( row_major std430) buffer float)
0:51 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of float)
0:51 'u6' (layout( set=3 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:51 Constant:
0:51 0 (const uint)
0:51 Constant:
0:51 0 (const int)
0:52 'u7' (layout( set=4 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:53 'u8' (layout( set=5 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:55 cb1: direct index for structure (layout( row_major std140) uniform int)
0:55 'anon@0' (layout( set=6 binding=1 row_major std140) uniform block{layout( row_major std140) uniform int cb1})
0:55 Constant:
0:55 0 (const uint)
0:56 tb1: direct index for structure (layout( row_major std430) buffer int)
0:56 'anon@1' (layout( binding=7 row_major std430) readonly buffer block{layout( row_major std430) buffer int tb1})
0:56 Constant:
0:56 0 (const uint)
0:58 Branch: Return with expression
0:58 Constant:
0:58 0.000000
0:58 0.000000
0:58 0.000000
0:58 0.000000
0:34 Function Definition: main( ( temp void)
0:34 Function Parameters:
0:? Sequence
0:34 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:34 Function Call: @main( ( temp 4-component vector of float)
0:? Linker Objects
0:? 's1' (layout( set=1 binding=1) uniform sampler)
0:? 's2' (layout( set=2 binding=2) uniform sampler)
0:? 't1' (layout( set=1 binding=1) uniform texture1D)
0:? 't2' (layout( set=1 binding=2) uniform texture2D)
0:? 't3' (layout( set=2 binding=1) uniform texture3D)
0:? 't4' (layout( set=3 binding=1 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of float @data})
0:? 't5' (layout( set=3 binding=2 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
0:? 't6' (layout( set=3 binding=3 rgba32f) uniform textureBuffer)
0:? 'u1' (layout( set=1 binding=1 rgba32f) uniform image1D)
0:? 'u2' (layout( set=2 binding=2 rgba32f) uniform image2D)
0:? 'u3' (layout( set=2 binding=3 rgba32f) uniform image3D)
0:? 'u4' (layout( set=1 binding=4 r32f) uniform imageBuffer)
0:? 'u5' (layout( set=2 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
0:? 'u6' (layout( set=3 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:? 'u7' (layout( set=4 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:? 'u8' (layout( set=5 binding=4 row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data})
0:? 'anon@0' (layout( set=6 binding=1 row_major std140) uniform block{layout( row_major std140) uniform int cb1})
0:? 'anon@1' (layout( binding=7 row_major std430) readonly buffer block{layout( row_major std430) buffer int tb1})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
Uniform reflection:
t1: offset -1, type 8b5d, size 1, index -1, binding 21
t2: offset -1, type 8b5e, size 1, index -1, binding 22
t3: offset -1, type 8b5f, size 1, index -1, binding 26
t4.@data: offset 0, type 8b52, size 1, index 0, binding -1
t5.@data: offset 0, type 1405, size 0, index 1, binding -1
t6: offset -1, type 8dc2, size 1, index -1, binding 23
s1: offset -1, type 0, size 1, index -1, binding 11
s2: offset -1, type 0, size 1, index -1, binding 17
u1: offset -1, type 904c, size 1, index -1, binding 31
u2: offset -1, type 904d, size 1, index -1, binding 42
u3: offset -1, type 904e, size 1, index -1, binding 43
u4: offset -1, type 9051, size 1, index -1, binding 34
u5.@data: offset 0, type 1405, size 0, index 2, binding -1
u6.@data: offset 0, type 1406, size 1, index 3, binding -1
cb1: offset 0, type 1404, size 1, index 4, binding -1
tb1: offset 0, type 1404, size 1, index 5, binding -1
Uniform block reflection:
t4: offset -1, type ffffffff, size 0, index -1, binding 21
t5: offset -1, type ffffffff, size 0, index -1, binding 22
u5: offset -1, type ffffffff, size 0, index -1, binding 44
u6: offset -1, type ffffffff, size 0, index -1, binding 34
cb: offset -1, type ffffffff, size 4, index -1, binding 51
tb: offset -1, type ffffffff, size 4, index -1, binding 27
Vertex attribute reflection: