WIP: HLSL: Buffer types should be unsampled.

RWBuffer objects were generating (properly) unsampled resoures, while
Buffer objects were not.  This fixes that.
This commit is contained in:
steve-lunarg 2017-03-17 13:19:42 -06:00
parent e751bca75c
commit cf2e7275e8
6 changed files with 429 additions and 443 deletions

View file

@ -94,7 +94,7 @@ gl_FragCoord origin is upper left
0:20 Constant:
0:20 0 (const int)
0:? Linker Objects
0:? 'g_tTexbfs' (layout( r32f) uniform samplerBuffer)
0:? 'g_tTexbfs' (layout( r32f) uniform imageBuffer)
0:? 'g_tTex1df4' ( uniform texture1D)
0:? 'color' (layout( location=0) out 4-component vector of float)
0:? 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform int i, layout( offset=4) uniform uint u, layout( offset=8) uniform float f, layout( offset=12) uniform bool b, layout( offset=16) uniform 2-component vector of int i2, layout( offset=24) uniform 2-component vector of uint u2, layout( offset=32) uniform 2-component vector of float f2, layout( offset=40) uniform 2-component vector of bool b2, layout( offset=48) uniform uint upos, layout( offset=52) uniform float fpos})
@ -198,14 +198,14 @@ gl_FragCoord origin is upper left
0:20 Constant:
0:20 0 (const int)
0:? Linker Objects
0:? 'g_tTexbfs' (layout( r32f) uniform samplerBuffer)
0:? 'g_tTexbfs' (layout( r32f) uniform imageBuffer)
0:? 'g_tTex1df4' ( uniform texture1D)
0:? 'color' (layout( location=0) out 4-component vector of float)
0:? 'anon@0' (layout( row_major std140) uniform block{layout( offset=0) uniform int i, layout( offset=4) uniform uint u, layout( offset=8) uniform float f, layout( offset=12) uniform bool b, layout( offset=16) uniform 2-component vector of int i2, layout( offset=24) uniform 2-component vector of uint u2, layout( offset=32) uniform 2-component vector of float f2, layout( offset=40) uniform 2-component vector of bool b2, layout( offset=48) uniform uint upos, layout( offset=52) uniform float fpos})
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 81
// Id's are bound by 80
Capability Shader
Capability Sampled1D
@ -242,7 +242,7 @@ gl_FragCoord origin is upper left
Name 57 "sizeQueryTemp"
Name 66 "ps_output"
Name 74 "color"
Name 80 "g_tTexbfs"
Name 79 "g_tTexbfs"
MemberDecorate 17($Global) 0 Offset 0
MemberDecorate 17($Global) 1 Offset 4
MemberDecorate 17($Global) 2 Offset 8
@ -257,7 +257,7 @@ gl_FragCoord origin is upper left
Decorate 19 DescriptorSet 0
Decorate 31(g_tTex1df4) DescriptorSet 0
Decorate 74(color) Location 0
Decorate 80(g_tTexbfs) DescriptorSet 0
Decorate 79(g_tTexbfs) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -288,10 +288,9 @@ gl_FragCoord origin is upper left
68: TypePointer Function 7(fvec4)
73: TypePointer Output 7(fvec4)
74(color): 73(ptr) Variable Output
77: TypeImage 6(float) Buffer sampled format:R32f
78: TypeSampledImage 77
79: TypePointer UniformConstant 78
80(g_tTexbfs): 79(ptr) Variable UniformConstant
77: TypeImage 6(float) Buffer nonsampled format:R32f
78: TypePointer UniformConstant 77
79(g_tTexbfs): 78(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
75:8(PS_OUTPUT) FunctionCall 10(@main()