Remove the now dead 'shared' type field, and add semantic check for buffer on non-block.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27700 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
67cf1f6179
commit
cc7f4eb5a0
5 changed files with 10 additions and 8 deletions
|
|
@ -155,3 +155,5 @@ void fooBarrier()
|
||||||
memoryBarrierImage();
|
memoryBarrierImage();
|
||||||
groupMemoryBarrier(); // ERROR
|
groupMemoryBarrier(); // ERROR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buffer vec4 v; // ERROR
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@ ERROR: 0:146: 'shared' : not supported in this stage: vertex
|
||||||
ERROR: 0:150: 'barrier' : no matching overloaded function found
|
ERROR: 0:150: 'barrier' : no matching overloaded function found
|
||||||
ERROR: 0:154: 'memoryBarrierShared' : no matching overloaded function found
|
ERROR: 0:154: 'memoryBarrierShared' : no matching overloaded function found
|
||||||
ERROR: 0:156: 'groupMemoryBarrier' : no matching overloaded function found
|
ERROR: 0:156: 'groupMemoryBarrier' : no matching overloaded function found
|
||||||
ERROR: 48 compilation errors. No code generated.
|
ERROR: 0:159: 'buffer' : buffers can be declared only as blocks
|
||||||
|
ERROR: 49 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 430
|
Shader version: 430
|
||||||
|
|
@ -127,6 +128,7 @@ ERROR: node is still EOpNull!
|
||||||
0:? 'bbinst4' (layout(xfb_stride=80 ) out block{layout(xfb_buffer=1 xfb_offset=16 ) out 4-component vector of float bbv1})
|
0:? 'bbinst4' (layout(xfb_stride=80 ) out block{layout(xfb_buffer=1 xfb_offset=16 ) out 4-component vector of float bbv1})
|
||||||
0:? 'bbinst5' (out block{layout(xfb_buffer=1 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=1 xfb_offset=64 xfb_stride=80 ) out 4-component vector of float bbv2})
|
0:? 'bbinst5' (out block{layout(xfb_buffer=1 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=1 xfb_offset=64 xfb_stride=80 ) out 4-component vector of float bbv2})
|
||||||
0:? 'sharedv' (shared 4-component vector of float)
|
0:? 'sharedv' (shared 4-component vector of float)
|
||||||
|
0:? 'v' (buffer 4-component vector of float)
|
||||||
0:? 'gl_VertexID' (gl_VertexId int)
|
0:? 'gl_VertexID' (gl_VertexId int)
|
||||||
0:? 'gl_InstanceID' (gl_InstanceId int)
|
0:? 'gl_InstanceID' (gl_InstanceId int)
|
||||||
|
|
||||||
|
|
@ -213,6 +215,7 @@ ERROR: node is still EOpNull!
|
||||||
0:? 'bbinst4' (layout(xfb_stride=80 ) out block{layout(xfb_buffer=1 xfb_offset=16 ) out 4-component vector of float bbv1})
|
0:? 'bbinst4' (layout(xfb_stride=80 ) out block{layout(xfb_buffer=1 xfb_offset=16 ) out 4-component vector of float bbv1})
|
||||||
0:? 'bbinst5' (out block{layout(xfb_buffer=1 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=1 xfb_offset=64 xfb_stride=80 ) out 4-component vector of float bbv2})
|
0:? 'bbinst5' (out block{layout(xfb_buffer=1 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=1 xfb_offset=64 xfb_stride=80 ) out 4-component vector of float bbv2})
|
||||||
0:? 'sharedv' (shared 4-component vector of float)
|
0:? 'sharedv' (shared 4-component vector of float)
|
||||||
|
0:? 'v' (buffer 4-component vector of float)
|
||||||
0:? 'gl_VertexID' (gl_VertexId int)
|
0:? 'gl_VertexID' (gl_VertexId int)
|
||||||
0:? 'gl_InstanceID' (gl_InstanceId int)
|
0:? 'gl_InstanceID' (gl_InstanceId int)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -315,7 +315,6 @@ public:
|
||||||
nopersp = false;
|
nopersp = false;
|
||||||
patch = false;
|
patch = false;
|
||||||
sample = false;
|
sample = false;
|
||||||
shared = false;
|
|
||||||
coherent = false;
|
coherent = false;
|
||||||
volatil = false;
|
volatil = false;
|
||||||
restrict = false;
|
restrict = false;
|
||||||
|
|
@ -333,7 +332,6 @@ public:
|
||||||
bool nopersp : 1;
|
bool nopersp : 1;
|
||||||
bool patch : 1;
|
bool patch : 1;
|
||||||
bool sample : 1;
|
bool sample : 1;
|
||||||
bool shared : 1;
|
|
||||||
bool coherent : 1;
|
bool coherent : 1;
|
||||||
bool volatil : 1;
|
bool volatil : 1;
|
||||||
bool restrict : 1;
|
bool restrict : 1;
|
||||||
|
|
@ -1179,8 +1177,6 @@ public:
|
||||||
p += snprintf(p, end - p, "patch ");
|
p += snprintf(p, end - p, "patch ");
|
||||||
if (qualifier.sample)
|
if (qualifier.sample)
|
||||||
p += snprintf(p, end - p, "sample ");
|
p += snprintf(p, end - p, "sample ");
|
||||||
if (qualifier.shared)
|
|
||||||
p += snprintf(p, end - p, "shared ");
|
|
||||||
if (qualifier.coherent)
|
if (qualifier.coherent)
|
||||||
p += snprintf(p, end - p, "coherent ");
|
p += snprintf(p, end - p, "coherent ");
|
||||||
if (qualifier.volatil)
|
if (qualifier.volatil)
|
||||||
|
|
|
||||||
|
|
@ -1921,6 +1921,9 @@ void TParseContext::globalQualifierCheck(TSourceLoc loc, const TQualifier& quali
|
||||||
if (qualifier.isMemory() && ! publicType.isImage() && publicType.qualifier.storage != EvqBuffer)
|
if (qualifier.isMemory() && ! publicType.isImage() && publicType.qualifier.storage != EvqBuffer)
|
||||||
error(loc, "memory qualifiers cannot be used on this type", "", "");
|
error(loc, "memory qualifiers cannot be used on this type", "", "");
|
||||||
|
|
||||||
|
if (qualifier.storage == EvqBuffer && publicType.basicType != EbtBlock)
|
||||||
|
error(loc, "buffers can be declared only as blocks", "buffer", "");
|
||||||
|
|
||||||
if (qualifier.storage != EvqVaryingIn && qualifier.storage != EvqVaryingOut)
|
if (qualifier.storage != EvqVaryingIn && qualifier.storage != EvqVaryingOut)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2093,7 +2096,6 @@ void TParseContext::mergeQualifiers(TSourceLoc loc, TQualifier& dst, const TQual
|
||||||
MERGE_SINGLETON(nopersp);
|
MERGE_SINGLETON(nopersp);
|
||||||
MERGE_SINGLETON(patch);
|
MERGE_SINGLETON(patch);
|
||||||
MERGE_SINGLETON(sample);
|
MERGE_SINGLETON(sample);
|
||||||
MERGE_SINGLETON(shared);
|
|
||||||
MERGE_SINGLETON(coherent);
|
MERGE_SINGLETON(coherent);
|
||||||
MERGE_SINGLETON(volatil);
|
MERGE_SINGLETON(volatil);
|
||||||
MERGE_SINGLETON(restrict);
|
MERGE_SINGLETON(restrict);
|
||||||
|
|
|
||||||
|
|
@ -296,8 +296,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
||||||
}
|
}
|
||||||
|
|
||||||
// Memory...
|
// Memory...
|
||||||
if (symbol.getQualifier().shared != unitSymbol.getQualifier().shared ||
|
if (symbol.getQualifier().coherent != unitSymbol.getQualifier().coherent ||
|
||||||
symbol.getQualifier().coherent != unitSymbol.getQualifier().coherent ||
|
|
||||||
symbol.getQualifier().volatil != unitSymbol.getQualifier().volatil ||
|
symbol.getQualifier().volatil != unitSymbol.getQualifier().volatil ||
|
||||||
symbol.getQualifier().restrict != unitSymbol.getQualifier().restrict ||
|
symbol.getQualifier().restrict != unitSymbol.getQualifier().restrict ||
|
||||||
symbol.getQualifier().readonly != unitSymbol.getQualifier().readonly ||
|
symbol.getQualifier().readonly != unitSymbol.getQualifier().readonly ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue