HLSL: add readonly qualifier to tbuffer, so they end up as SRV
This commit is contained in:
@@ -15,6 +15,7 @@ u4: offset -1, type 9051, size 1, index -1, binding 44
|
||||
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 14
|
||||
@@ -22,6 +23,7 @@ t5: offset -1, type ffffffff, size 0, index -1, binding 15
|
||||
u5: offset -1, type ffffffff, size 0, index -1, binding 45
|
||||
u6: offset -1, type ffffffff, size 0, index -1, binding 46
|
||||
cb: offset -1, type ffffffff, size 4, index -1, binding 51
|
||||
tb: offset -1, type ffffffff, size 4, index -1, binding 17
|
||||
|
||||
Vertex attribute reflection:
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ gl_FragCoord origin is upper left
|
||||
0:31 Constant:
|
||||
0:31 0 (const uint)
|
||||
0:31 v2: direct index for structure (layout( row_major std430) buffer 4-component vector of float)
|
||||
0:31 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
||||
0:31 'anon@1' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
||||
0:31 Constant:
|
||||
0:31 0 (const uint)
|
||||
0:31 v3: direct index for structure (layout( row_major std140) uniform 4-component vector of float)
|
||||
@@ -25,7 +25,7 @@ gl_FragCoord origin is upper left
|
||||
0:31 Constant:
|
||||
0:31 0 (const uint)
|
||||
0:31 v4: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||
0:31 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||
0:31 'anon@3' (layout( binding=8 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||
0:31 Constant:
|
||||
0:31 0 (const uint)
|
||||
0:30 Function Definition: PixelShaderFunction( ( temp void)
|
||||
@@ -40,9 +40,9 @@ gl_FragCoord origin is upper left
|
||||
0:? 'input' ( temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1})
|
||||
0:? 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
||||
0:? 'anon@1' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
||||
0:? 'anon@2' (layout( set=10 binding=2 row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3})
|
||||
0:? 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||
0:? 'anon@3' (layout( binding=8 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
0:? 'input' (layout( location=0) in 4-component vector of float)
|
||||
|
||||
@@ -68,7 +68,7 @@ gl_FragCoord origin is upper left
|
||||
0:31 Constant:
|
||||
0:31 0 (const uint)
|
||||
0:31 v2: direct index for structure (layout( row_major std430) buffer 4-component vector of float)
|
||||
0:31 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
||||
0:31 'anon@1' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
||||
0:31 Constant:
|
||||
0:31 0 (const uint)
|
||||
0:31 v3: direct index for structure (layout( row_major std140) uniform 4-component vector of float)
|
||||
@@ -76,7 +76,7 @@ gl_FragCoord origin is upper left
|
||||
0:31 Constant:
|
||||
0:31 0 (const uint)
|
||||
0:31 v4: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||
0:31 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||
0:31 'anon@3' (layout( binding=8 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||
0:31 Constant:
|
||||
0:31 0 (const uint)
|
||||
0:30 Function Definition: PixelShaderFunction( ( temp void)
|
||||
@@ -91,9 +91,9 @@ gl_FragCoord origin is upper left
|
||||
0:? 'input' ( temp 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1})
|
||||
0:? 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
||||
0:? 'anon@1' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer 4-component vector of float v2})
|
||||
0:? 'anon@2' (layout( set=10 binding=2 row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3})
|
||||
0:? 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||
0:? 'anon@3' (layout( binding=8 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4})
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
0:? 'input' (layout( location=0) in 4-component vector of float)
|
||||
|
||||
@@ -141,6 +141,7 @@ gl_FragCoord origin is upper left
|
||||
MemberDecorate 14 0 Offset 0
|
||||
Decorate 14 Block
|
||||
Decorate 16 DescriptorSet 0
|
||||
MemberDecorate 23 0 NonWritable
|
||||
MemberDecorate 23 0 Offset 0
|
||||
Decorate 23 BufferBlock
|
||||
Decorate 25 DescriptorSet 0
|
||||
@@ -149,24 +150,36 @@ gl_FragCoord origin is upper left
|
||||
Decorate 29(cbufName) Block
|
||||
Decorate 31 DescriptorSet 10
|
||||
Decorate 31 Binding 2
|
||||
MemberDecorate 36(tbufName) 0 NonWritable
|
||||
MemberDecorate 36(tbufName) 0 Offset 16
|
||||
MemberDecorate 36(tbufName) 1 NonWritable
|
||||
MemberDecorate 36(tbufName) 1 Offset 48
|
||||
MemberDecorate 36(tbufName) 2 NonWritable
|
||||
MemberDecorate 36(tbufName) 2 Offset 60
|
||||
MemberDecorate 36(tbufName) 3 NonWritable
|
||||
MemberDecorate 36(tbufName) 3 Offset 64
|
||||
MemberDecorate 36(tbufName) 4 NonWritable
|
||||
MemberDecorate 36(tbufName) 4 Offset 68
|
||||
MemberDecorate 36(tbufName) 5 NonWritable
|
||||
MemberDecorate 36(tbufName) 5 Offset 72
|
||||
MemberDecorate 36(tbufName) 6 NonWritable
|
||||
MemberDecorate 36(tbufName) 6 Offset 76
|
||||
MemberDecorate 36(tbufName) 7 NonWritable
|
||||
MemberDecorate 36(tbufName) 7 Offset 80
|
||||
MemberDecorate 36(tbufName) 8 RowMajor
|
||||
MemberDecorate 36(tbufName) 8 NonWritable
|
||||
MemberDecorate 36(tbufName) 8 Offset 96
|
||||
MemberDecorate 36(tbufName) 8 MatrixStride 16
|
||||
MemberDecorate 36(tbufName) 9 ColMajor
|
||||
MemberDecorate 36(tbufName) 9 NonWritable
|
||||
MemberDecorate 36(tbufName) 9 Offset 160
|
||||
MemberDecorate 36(tbufName) 9 MatrixStride 16
|
||||
MemberDecorate 36(tbufName) 10 RowMajor
|
||||
MemberDecorate 36(tbufName) 10 NonWritable
|
||||
MemberDecorate 36(tbufName) 10 Offset 208
|
||||
MemberDecorate 36(tbufName) 10 MatrixStride 16
|
||||
MemberDecorate 36(tbufName) 11 RowMajor
|
||||
MemberDecorate 36(tbufName) 11 NonWritable
|
||||
MemberDecorate 36(tbufName) 11 Offset 272
|
||||
MemberDecorate 36(tbufName) 11 MatrixStride 16
|
||||
Decorate 36(tbufName) BufferBlock
|
||||
|
||||
@@ -12,23 +12,23 @@ gl_FragCoord origin is upper left
|
||||
0:17 add ( temp 4-component vector of float)
|
||||
0:17 'input' ( in 4-component vector of float)
|
||||
0:17 v1: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||
0:17 'anon@0' (layout( set=3 binding=5 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||
0:17 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||
0:17 Constant:
|
||||
0:17 0 (const uint)
|
||||
0:17 v5: direct index for structure (layout( row_major std430 offset=0) buffer 4-component vector of float)
|
||||
0:17 'anon@1' (layout( row_major std430 push_constant) buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||
0:17 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||
0:17 Constant:
|
||||
0:17 0 (const uint)
|
||||
0:17 v1PostLayout: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||
0:17 'anon@2' (layout( set=4 binding=7 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
||||
0:17 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
||||
0:17 Constant:
|
||||
0:17 0 (const uint)
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( set=3 binding=5 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||
0:? 'anon@1' (layout( row_major std430 push_constant) buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||
0:? 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||
0:? 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||
0:? 'specConst' ( specialization-constant const int)
|
||||
0:? 10 (const int)
|
||||
0:? 'anon@2' (layout( set=4 binding=7 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
||||
0:? 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -48,23 +48,23 @@ gl_FragCoord origin is upper left
|
||||
0:17 add ( temp 4-component vector of float)
|
||||
0:17 'input' ( in 4-component vector of float)
|
||||
0:17 v1: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||
0:17 'anon@0' (layout( set=3 binding=5 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||
0:17 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||
0:17 Constant:
|
||||
0:17 0 (const uint)
|
||||
0:17 v5: direct index for structure (layout( row_major std430 offset=0) buffer 4-component vector of float)
|
||||
0:17 'anon@1' (layout( row_major std430 push_constant) buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||
0:17 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||
0:17 Constant:
|
||||
0:17 0 (const uint)
|
||||
0:17 v1PostLayout: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||
0:17 'anon@2' (layout( set=4 binding=7 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
||||
0:17 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
||||
0:17 Constant:
|
||||
0:17 0 (const uint)
|
||||
0:? Linker Objects
|
||||
0:? 'anon@0' (layout( set=3 binding=5 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||
0:? 'anon@1' (layout( row_major std430 push_constant) buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||
0:? 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||
0:? 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||
0:? 'specConst' ( specialization-constant const int)
|
||||
0:? 10 (const int)
|
||||
0:? 'anon@2' (layout( set=4 binding=7 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
||||
0:? 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
@@ -89,12 +89,15 @@ gl_FragCoord origin is upper left
|
||||
MemberName 30(tbufName2) 0 "v1PostLayout"
|
||||
Name 32 ""
|
||||
Name 38 "specConst"
|
||||
MemberDecorate 14(tbufName) 0 NonWritable
|
||||
MemberDecorate 14(tbufName) 0 Offset 16
|
||||
Decorate 14(tbufName) BufferBlock
|
||||
Decorate 16 DescriptorSet 3
|
||||
Decorate 16 Binding 5
|
||||
MemberDecorate 23(tbufName2) 0 NonWritable
|
||||
MemberDecorate 23(tbufName2) 0 Offset 0
|
||||
Decorate 23(tbufName2) BufferBlock
|
||||
MemberDecorate 30(tbufName2) 0 NonWritable
|
||||
MemberDecorate 30(tbufName2) 0 Offset 16
|
||||
Decorate 30(tbufName2) BufferBlock
|
||||
Decorate 32 DescriptorSet 4
|
||||
|
||||
@@ -24,9 +24,9 @@ cbuffer cb : register(b1) {
|
||||
int cb1;
|
||||
};
|
||||
|
||||
// tbuffer tb : register(t7) {
|
||||
// int tb1;
|
||||
// };
|
||||
tbuffer tb : register(t7) {
|
||||
int tb1;
|
||||
};
|
||||
|
||||
float4 main() : SV_Target0
|
||||
{
|
||||
@@ -47,11 +47,11 @@ float4 main() : SV_Target0
|
||||
u4[0];
|
||||
u5.Load(0);
|
||||
u6[0];
|
||||
u7[0];
|
||||
u8[0];
|
||||
u7;
|
||||
u8;
|
||||
|
||||
cb1;
|
||||
// tb1; TODO: wrong type?
|
||||
tb1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user