Merge pull request #2847 from jeremy-lunarg/hayes-fix-issue-2846
Unblock unsized error from assert
This commit is contained in:
commit
17232d21d7
35
Test/baseResults/xfbUnsizedArray.error.tese.out
Normal file
35
Test/baseResults/xfbUnsizedArray.error.tese.out
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
xfbUnsizedArray.error.tese
|
||||||
|
ERROR: 0:4: 'xfb_offset' : unsized array in buffer 0
|
||||||
|
ERROR: 1 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
Shader version: 430
|
||||||
|
Requested GL_ARB_enhanced_layouts
|
||||||
|
in xfb mode
|
||||||
|
input primitive = isolines
|
||||||
|
vertex spacing = none
|
||||||
|
triangle order = none
|
||||||
|
using point mode
|
||||||
|
ERROR: node is still EOpNull!
|
||||||
|
0:6 Function Definition: main( ( global void)
|
||||||
|
0:6 Function Parameters:
|
||||||
|
0:? Linker Objects
|
||||||
|
0:? 'unsized' (layout( xfb_buffer=0 xfb_offset=0) out unsized 1-element array of 4-component vector of float)
|
||||||
|
|
||||||
|
|
||||||
|
Linked tessellation evaluation stage:
|
||||||
|
|
||||||
|
|
||||||
|
Shader version: 430
|
||||||
|
Requested GL_ARB_enhanced_layouts
|
||||||
|
in xfb mode
|
||||||
|
input primitive = isolines
|
||||||
|
vertex spacing = equal_spacing
|
||||||
|
triangle order = ccw
|
||||||
|
using point mode
|
||||||
|
ERROR: node is still EOpNull!
|
||||||
|
0:6 Function Definition: main( ( global void)
|
||||||
|
0:6 Function Parameters:
|
||||||
|
0:? Linker Objects
|
||||||
|
0:? 'unsized' (layout( xfb_buffer=0 xfb_offset=0) out 1-element array of 4-component vector of float)
|
||||||
|
|
8
Test/xfbUnsizedArray.error.tese
Normal file
8
Test/xfbUnsizedArray.error.tese
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#version 430 core
|
||||||
|
#extension GL_ARB_enhanced_layouts : require
|
||||||
|
layout(isolines, point_mode) in;
|
||||||
|
layout (xfb_offset = 0) out vec4 unsized[]; // error: unsized array
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
}
|
@ -6210,11 +6210,13 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) {
|
if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) {
|
||||||
|
if (type.isUnsizedArray()) {
|
||||||
|
error(loc, "unsized array", "xfb_offset", "in buffer %d", qualifier.layoutXfbBuffer);
|
||||||
|
} else {
|
||||||
int repeated = intermediate.addXfbBufferOffset(type);
|
int repeated = intermediate.addXfbBufferOffset(type);
|
||||||
if (repeated >= 0)
|
if (repeated >= 0)
|
||||||
error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer);
|
error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer);
|
||||||
if (type.isUnsizedArray())
|
}
|
||||||
error(loc, "unsized array", "xfb_offset", "in buffer %d", qualifier.layoutXfbBuffer);
|
|
||||||
|
|
||||||
// "The offset must be a multiple of the size of the first component of the first
|
// "The offset must be a multiple of the size of the first component of the first
|
||||||
// qualified variable or block member, or a compile-time error results. Further, if applied to an aggregate
|
// qualified variable or block member, or a compile-time error results. Further, if applied to an aggregate
|
||||||
|
@ -1802,7 +1802,7 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
int numComponents;
|
int numComponents {0};
|
||||||
if (type.isScalar())
|
if (type.isScalar())
|
||||||
numComponents = 1;
|
numComponents = 1;
|
||||||
else if (type.isVector())
|
else if (type.isVector())
|
||||||
|
@ -236,6 +236,7 @@ INSTANTIATE_TEST_SUITE_P(
|
|||||||
"noMatchingFunction.frag",
|
"noMatchingFunction.frag",
|
||||||
"constantUnaryConversion.comp",
|
"constantUnaryConversion.comp",
|
||||||
"xfbUnsizedArray.error.vert",
|
"xfbUnsizedArray.error.vert",
|
||||||
|
"xfbUnsizedArray.error.tese",
|
||||||
"glsl.140.layoutOffset.error.vert",
|
"glsl.140.layoutOffset.error.vert",
|
||||||
"glsl.430.layoutOffset.error.vert",
|
"glsl.430.layoutOffset.error.vert",
|
||||||
"glsl.450.subgroup.frag",
|
"glsl.450.subgroup.frag",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user