Commit f36542f4 by John Kessenich

Revert "Merge pull request #779 from steve-lunarg/buffer-unsampled-fix"

This reverts commit 1dd65ca3, reversing changes made to 4960baaf.
parent 84a30c8b
...@@ -95,7 +95,7 @@ gl_FragCoord origin is upper left ...@@ -95,7 +95,7 @@ gl_FragCoord origin is upper left
0:20 0 (const int) 0:20 0 (const int)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int i, uniform uint u, uniform float f, uniform bool b, uniform 2-component vector of int i2, uniform 2-component vector of uint u2, uniform 2-component vector of float f2, uniform 2-component vector of bool b2, uniform uint upos, uniform float fpos}) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int i, uniform uint u, uniform float f, uniform bool b, uniform 2-component vector of int i2, uniform 2-component vector of uint u2, uniform 2-component vector of float f2, uniform 2-component vector of bool b2, uniform uint upos, uniform float fpos})
0:? 'g_tTexbfs' (layout( r32f) readonly uniform imageBuffer) 0:? 'g_tTexbfs' (layout( r32f) uniform samplerBuffer)
0:? 'g_tTex1df4' ( uniform texture1D) 0:? 'g_tTex1df4' ( uniform texture1D)
0:? 'color' (layout( location=0) out 4-component vector of float) 0:? 'color' (layout( location=0) out 4-component vector of float)
...@@ -199,13 +199,13 @@ gl_FragCoord origin is upper left ...@@ -199,13 +199,13 @@ gl_FragCoord origin is upper left
0:20 0 (const int) 0:20 0 (const int)
0:? Linker Objects 0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int i, uniform uint u, uniform float f, uniform bool b, uniform 2-component vector of int i2, uniform 2-component vector of uint u2, uniform 2-component vector of float f2, uniform 2-component vector of bool b2, uniform uint upos, uniform float fpos}) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int i, uniform uint u, uniform float f, uniform bool b, uniform 2-component vector of int i2, uniform 2-component vector of uint u2, uniform 2-component vector of float f2, uniform 2-component vector of bool b2, uniform uint upos, uniform float fpos})
0:? 'g_tTexbfs' (layout( r32f) readonly uniform imageBuffer) 0:? 'g_tTexbfs' (layout( r32f) uniform samplerBuffer)
0:? 'g_tTex1df4' ( uniform texture1D) 0:? 'g_tTex1df4' ( uniform texture1D)
0:? 'color' (layout( location=0) out 4-component vector of float) 0:? 'color' (layout( location=0) out 4-component vector of float)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 80 // Id's are bound by 81
Capability Shader Capability Shader
Capability Sampled1D Capability Sampled1D
...@@ -242,7 +242,7 @@ gl_FragCoord origin is upper left ...@@ -242,7 +242,7 @@ gl_FragCoord origin is upper left
Name 57 "sizeQueryTemp" Name 57 "sizeQueryTemp"
Name 66 "ps_output" Name 66 "ps_output"
Name 74 "color" Name 74 "color"
Name 79 "g_tTexbfs" Name 80 "g_tTexbfs"
MemberDecorate 17($Global) 0 Offset 0 MemberDecorate 17($Global) 0 Offset 0
MemberDecorate 17($Global) 1 Offset 4 MemberDecorate 17($Global) 1 Offset 4
MemberDecorate 17($Global) 2 Offset 8 MemberDecorate 17($Global) 2 Offset 8
...@@ -257,8 +257,7 @@ gl_FragCoord origin is upper left ...@@ -257,8 +257,7 @@ gl_FragCoord origin is upper left
Decorate 19 DescriptorSet 0 Decorate 19 DescriptorSet 0
Decorate 31(g_tTex1df4) DescriptorSet 0 Decorate 31(g_tTex1df4) DescriptorSet 0
Decorate 74(color) Location 0 Decorate 74(color) Location 0
Decorate 79(g_tTexbfs) DescriptorSet 0 Decorate 80(g_tTexbfs) DescriptorSet 0
Decorate 79(g_tTexbfs) NonWritable
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
...@@ -289,9 +288,10 @@ gl_FragCoord origin is upper left ...@@ -289,9 +288,10 @@ gl_FragCoord origin is upper left
68: TypePointer Function 7(fvec4) 68: TypePointer Function 7(fvec4)
73: TypePointer Output 7(fvec4) 73: TypePointer Output 7(fvec4)
74(color): 73(ptr) Variable Output 74(color): 73(ptr) Variable Output
77: TypeImage 6(float) Buffer nonsampled format:R32f 77: TypeImage 6(float) Buffer sampled format:R32f
78: TypePointer UniformConstant 77 78: TypeSampledImage 77
79(g_tTexbfs): 78(ptr) Variable UniformConstant 79: TypePointer UniformConstant 78
80(g_tTexbfs): 79(ptr) Variable UniformConstant
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
75:8(PS_OUTPUT) FunctionCall 10(@main() 75:8(PS_OUTPUT) FunctionCall 10(@main()
......
...@@ -6,8 +6,8 @@ Shader version: 450 ...@@ -6,8 +6,8 @@ Shader version: 450
0:4 'Index' ( in uint) 0:4 'Index' ( in uint)
0:? Sequence 0:? Sequence
0:5 Branch: Return with expression 0:5 Branch: Return with expression
0:5 imageLoad ( temp 4-component vector of float) 0:5 textureFetch ( temp 4-component vector of float)
0:5 'Position' (layout( rgba32f) readonly uniform imageBuffer) 0:5 'Position' (layout( rgba32f) uniform samplerBuffer)
0:5 Convert uint to int ( temp int) 0:5 Convert uint to int ( temp int)
0:5 'Index' ( in uint) 0:5 'Index' ( in uint)
0:9 Function Definition: @RealEntrypoint(u1; ( temp 4-component vector of float) 0:9 Function Definition: @RealEntrypoint(u1; ( temp 4-component vector of float)
...@@ -28,7 +28,7 @@ Shader version: 450 ...@@ -28,7 +28,7 @@ Shader version: 450
0:9 Function Call: @RealEntrypoint(u1; ( temp 4-component vector of float) 0:9 Function Call: @RealEntrypoint(u1; ( temp 4-component vector of float)
0:? 'Index' ( temp uint) 0:? 'Index' ( temp uint)
0:? Linker Objects 0:? Linker Objects
0:? 'Position' (layout( rgba32f) readonly uniform imageBuffer) 0:? 'Position' (layout( rgba32f) uniform samplerBuffer)
0:? '@entryPointOutput' ( out 4-component vector of float Position) 0:? '@entryPointOutput' ( out 4-component vector of float Position)
0:? 'Index' ( in uint VertexIndex) 0:? 'Index' ( in uint VertexIndex)
...@@ -43,8 +43,8 @@ Shader version: 450 ...@@ -43,8 +43,8 @@ Shader version: 450
0:4 'Index' ( in uint) 0:4 'Index' ( in uint)
0:? Sequence 0:? Sequence
0:5 Branch: Return with expression 0:5 Branch: Return with expression
0:5 imageLoad ( temp 4-component vector of float) 0:5 textureFetch ( temp 4-component vector of float)
0:5 'Position' (layout( rgba32f) readonly uniform imageBuffer) 0:5 'Position' (layout( rgba32f) uniform samplerBuffer)
0:5 Convert uint to int ( temp int) 0:5 Convert uint to int ( temp int)
0:5 'Index' ( in uint) 0:5 'Index' ( in uint)
0:9 Function Definition: @RealEntrypoint(u1; ( temp 4-component vector of float) 0:9 Function Definition: @RealEntrypoint(u1; ( temp 4-component vector of float)
...@@ -65,34 +65,33 @@ Shader version: 450 ...@@ -65,34 +65,33 @@ Shader version: 450
0:9 Function Call: @RealEntrypoint(u1; ( temp 4-component vector of float) 0:9 Function Call: @RealEntrypoint(u1; ( temp 4-component vector of float)
0:? 'Index' ( temp uint) 0:? 'Index' ( temp uint)
0:? Linker Objects 0:? Linker Objects
0:? 'Position' (layout( rgba32f) readonly uniform imageBuffer) 0:? 'Position' (layout( rgba32f) uniform samplerBuffer)
0:? '@entryPointOutput' ( out 4-component vector of float Position) 0:? '@entryPointOutput' ( out 4-component vector of float Position)
0:? 'Index' ( in uint VertexIndex) 0:? 'Index' ( in uint VertexIndex)
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 41 // Id's are bound by 43
Capability Shader Capability Shader
Capability SampledBuffer Capability SampledBuffer
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "RealEntrypoint" 34 37 EntryPoint Vertex 4 "RealEntrypoint" 36 39
Name 4 "RealEntrypoint" Name 4 "RealEntrypoint"
Name 12 "FakeEntrypoint(u1;" Name 12 "FakeEntrypoint(u1;"
Name 11 "Index" Name 11 "Index"
Name 15 "@RealEntrypoint(u1;" Name 15 "@RealEntrypoint(u1;"
Name 14 "Index" Name 14 "Index"
Name 19 "Position" Name 20 "Position"
Name 27 "param" Name 29 "param"
Name 32 "Index"
Name 34 "Index" Name 34 "Index"
Name 37 "@entryPointOutput" Name 36 "Index"
Name 38 "param" Name 39 "@entryPointOutput"
Decorate 19(Position) DescriptorSet 0 Name 40 "param"
Decorate 19(Position) NonWritable Decorate 20(Position) DescriptorSet 0
Decorate 34(Index) BuiltIn VertexIndex Decorate 36(Index) BuiltIn VertexIndex
Decorate 37(@entryPointOutput) BuiltIn Position Decorate 39(@entryPointOutput) BuiltIn Position
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeInt 32 0 6: TypeInt 32 0
...@@ -100,41 +99,43 @@ Shader version: 450 ...@@ -100,41 +99,43 @@ Shader version: 450
8: TypeFloat 32 8: TypeFloat 32
9: TypeVector 8(float) 4 9: TypeVector 8(float) 4
10: TypeFunction 9(fvec4) 7(ptr) 10: TypeFunction 9(fvec4) 7(ptr)
17: TypeImage 8(float) Buffer nonsampled format:Rgba32f 17: TypeImage 8(float) Buffer sampled format:Rgba32f
18: TypePointer UniformConstant 17 18: TypeSampledImage 17
19(Position): 18(ptr) Variable UniformConstant 19: TypePointer UniformConstant 18
22: TypeInt 32 1 20(Position): 19(ptr) Variable UniformConstant
33: TypePointer Input 6(int) 23: TypeInt 32 1
34(Index): 33(ptr) Variable Input 35: TypePointer Input 6(int)
36: TypePointer Output 9(fvec4) 36(Index): 35(ptr) Variable Input
37(@entryPointOutput): 36(ptr) Variable Output 38: TypePointer Output 9(fvec4)
39(@entryPointOutput): 38(ptr) Variable Output
4(RealEntrypoint): 2 Function None 3 4(RealEntrypoint): 2 Function None 3
5: Label 5: Label
32(Index): 7(ptr) Variable Function 34(Index): 7(ptr) Variable Function
38(param): 7(ptr) Variable Function 40(param): 7(ptr) Variable Function
35: 6(int) Load 34(Index) 37: 6(int) Load 36(Index)
Store 32(Index) 35 Store 34(Index) 37
39: 6(int) Load 32(Index) 41: 6(int) Load 34(Index)
Store 38(param) 39 Store 40(param) 41
40: 9(fvec4) FunctionCall 15(@RealEntrypoint(u1;) 38(param) 42: 9(fvec4) FunctionCall 15(@RealEntrypoint(u1;) 40(param)
Store 37(@entryPointOutput) 40 Store 39(@entryPointOutput) 42
Return Return
FunctionEnd FunctionEnd
12(FakeEntrypoint(u1;): 9(fvec4) Function None 10 12(FakeEntrypoint(u1;): 9(fvec4) Function None 10
11(Index): 7(ptr) FunctionParameter 11(Index): 7(ptr) FunctionParameter
13: Label 13: Label
20: 17 Load 19(Position) 21: 18 Load 20(Position)
21: 6(int) Load 11(Index) 22: 6(int) Load 11(Index)
23: 22(int) Bitcast 21 24: 23(int) Bitcast 22
24: 9(fvec4) ImageRead 20 23 25: 17 Image 21
ReturnValue 24 26: 9(fvec4) ImageFetch 25 24
ReturnValue 26
FunctionEnd FunctionEnd
15(@RealEntrypoint(u1;): 9(fvec4) Function None 10 15(@RealEntrypoint(u1;): 9(fvec4) Function None 10
14(Index): 7(ptr) FunctionParameter 14(Index): 7(ptr) FunctionParameter
16: Label 16: Label
27(param): 7(ptr) Variable Function 29(param): 7(ptr) Variable Function
28: 6(int) Load 14(Index) 30: 6(int) Load 14(Index)
Store 27(param) 28 Store 29(param) 30
29: 9(fvec4) FunctionCall 12(FakeEntrypoint(u1;) 27(param) 31: 9(fvec4) FunctionCall 12(FakeEntrypoint(u1;) 29(param)
ReturnValue 29 ReturnValue 31
FunctionEnd FunctionEnd
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.1947" #define GLSLANG_REVISION "Overload400-PrecQual.1958"
#define GLSLANG_DATE "30-Mar-2017" #define GLSLANG_DATE "31-Mar-2017"
...@@ -611,10 +611,6 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList) ...@@ -611,10 +611,6 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList)
qualifier.layoutFormat = type.getQualifier().layoutFormat; qualifier.layoutFormat = type.getQualifier().layoutFormat;
qualifier.precision = type.getQualifier().precision; qualifier.precision = type.getQualifier().precision;
// Propagate sampler readonly qualifier for buffers
if (type.getBasicType() == EbtSampler)
qualifier.readonly = type.getQualifier().readonly;
if (type.getQualifier().storage == EvqVaryingOut || if (type.getQualifier().storage == EvqVaryingOut ||
type.getQualifier().storage == EvqBuffer) { type.getQualifier().storage == EvqBuffer) {
qualifier.storage = type.getQualifier().storage; qualifier.storage = type.getQualifier().storage;
...@@ -1149,25 +1145,24 @@ bool HlslGrammar::acceptTextureType(TType& type) ...@@ -1149,25 +1145,24 @@ bool HlslGrammar::acceptTextureType(TType& type)
bool array = false; bool array = false;
bool ms = false; bool ms = false;
bool image = false; bool image = false;
bool readonly = false;
switch (textureType) { switch (textureType) {
case EHTokTexture1d: dim = Esd1D; break; case EHTokBuffer: dim = EsdBuffer; break;
case EHTokTexture1darray: dim = Esd1D; array = true; break; case EHTokTexture1d: dim = Esd1D; break;
case EHTokTexture2d: dim = Esd2D; break; case EHTokTexture1darray: dim = Esd1D; array = true; break;
case EHTokTexture2darray: dim = Esd2D; array = true; break; case EHTokTexture2d: dim = Esd2D; break;
case EHTokTexture3d: dim = Esd3D; break; case EHTokTexture2darray: dim = Esd2D; array = true; break;
case EHTokTextureCube: dim = EsdCube; break; case EHTokTexture3d: dim = Esd3D; break;
case EHTokTextureCubearray: dim = EsdCube; array = true; break; case EHTokTextureCube: dim = EsdCube; break;
case EHTokTexture2DMS: dim = Esd2D; ms = true; break; case EHTokTextureCubearray: dim = EsdCube; array = true; break;
case EHTokTexture2DMSarray: dim = Esd2D; array = true; ms = true; break; case EHTokTexture2DMS: dim = Esd2D; ms = true; break;
case EHTokBuffer: dim = EsdBuffer; readonly=true; image=true; break; case EHTokTexture2DMSarray: dim = Esd2D; array = true; ms = true; break;
case EHTokRWBuffer: dim = EsdBuffer; image=true; break; case EHTokRWBuffer: dim = EsdBuffer; image=true; break;
case EHTokRWTexture1d: dim = Esd1D; array=false; image=true; break; case EHTokRWTexture1d: dim = Esd1D; array=false; image=true; break;
case EHTokRWTexture1darray: dim = Esd1D; array=true; image=true; break; case EHTokRWTexture1darray: dim = Esd1D; array=true; image=true; break;
case EHTokRWTexture2d: dim = Esd2D; array=false; image=true; break; case EHTokRWTexture2d: dim = Esd2D; array=false; image=true; break;
case EHTokRWTexture2darray: dim = Esd2D; array=true; image=true; break; case EHTokRWTexture2darray: dim = Esd2D; array=true; image=true; break;
case EHTokRWTexture3d: dim = Esd3D; array=false; image=true; break; case EHTokRWTexture3d: dim = Esd3D; array=false; image=true; break;
default: default:
return false; // not a texture declaration return false; // not a texture declaration
} }
...@@ -1227,7 +1222,7 @@ bool HlslGrammar::acceptTextureType(TType& type) ...@@ -1227,7 +1222,7 @@ bool HlslGrammar::acceptTextureType(TType& type)
} else if (ms) { } else if (ms) {
expected("texture type for multisample"); expected("texture type for multisample");
return false; return false;
} else if (image && !readonly) { } else if (image) {
expected("type for RWTexture/RWBuffer"); expected("type for RWTexture/RWBuffer");
return false; return false;
} }
...@@ -1258,9 +1253,7 @@ bool HlslGrammar::acceptTextureType(TType& type) ...@@ -1258,9 +1253,7 @@ bool HlslGrammar::acceptTextureType(TType& type)
sampler.vectorSize = txType.getVectorSize(); sampler.vectorSize = txType.getVectorSize();
type.shallowCopy(TType(sampler, EvqUniform, arraySizes)); type.shallowCopy(TType(sampler, EvqUniform, arraySizes));
type.getQualifier().layoutFormat = format; type.getQualifier().layoutFormat = format;
type.getQualifier().readonly = readonly;
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment