Commit d6bef918 by John Kessenich

Correct textureGather*() extension support:

- add extension behavior and warning message for partial extension support - add partial support for gpu_shader5 for textureGather* - add interactions between texture rectangle and textureGather* - add checks to distinguish between gpu_shader5 and texture_gather extension feature differences git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24183 e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent 5b9f9885
...@@ -65,3 +65,34 @@ void bar2() ...@@ -65,3 +65,34 @@ void bar2()
int(bl4) <= int(bl4); // true int(bl4) <= int(bl4); // true
int(bl4.x) > int(bl4.y); // false int(bl4.x) > int(bl4.y); // false
} }
#extension GL_ARB_texture_gather : enable
#extension GL_ARB_texture_rectangle : enable
uniform sampler2D samp2D;
uniform sampler2DShadow samp2DS;
uniform sampler2DRect samp2DR;
uniform sampler2DArray samp2DA;
void bar23()
{
vec4 s;
s = textureGatherOffset(sampC, vec3(0.3), ivec2(1)); // ERROR
s = textureGatherOffset(samp2DR, vec2(0.3), ivec2(1)); // ERROR
s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1));
s = textureGatherOffset(samp2DA, vec3(0.3), ivec2(1));
s = textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1)); // ERROR
s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2); // ERROR
}
#extension GL_ARB_gpu_shader5 : enable
void bar234()
{
vec4 s;
s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1));
s = textureGatherOffset(samp2DA, vec3(0.3), ivec2(1));
s = textureGatherOffset(samp2DR, vec2(0.3), ivec2(1));
s = textureGatherOffset(samp2DS, vec2(0.3), 1.3, ivec2(1));
s = textureGatherOffset(samp2D, vec2(0.3), ivec2(1), 2);
}
...@@ -14,7 +14,9 @@ void main() ...@@ -14,7 +14,9 @@ void main()
outp.x = gl_ClipDistance[1]; outp.x = gl_ClipDistance[1];
ivec2 offsets[4]; ivec2 offsets[4];
uvec4 uv4 = textureGatherOffsets(samp2dr, c2D, offsets, 2); const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
uvec4 uv4 = textureGatherOffsets(samp2dr, c2D, offsets, 2); // ERROR, offsets not constant
uv4 = textureGatherOffsets(samp2dr, c2D, constOffsets, 2);
vec4 v4 = textureGather(arrayedSampler[0], c2D); vec4 v4 = textureGather(arrayedSampler[0], c2D);
ivec4 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 3); ivec4 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 3);
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const
...@@ -46,8 +48,8 @@ void foo23() ...@@ -46,8 +48,8 @@ void foo23()
{ {
const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16)); const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16));
textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(c2D)); // ERROR, offset not constant textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(c2D)); // ERROR, offset not constant
textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[1]); textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[1]);
textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[2]); textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[2]); // ERROR, offset out of range
textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(-10, 20)); // ERROR, offset out of range textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(-10, 20)); // ERROR, offset out of range
} }
130.frag 130.frag
Warning, version 130 is not yet complete; most features are present, but a few are missing. Warning, version 130 is not yet complete; most features are present, but a few are missing.
ERROR: 0:25: 'texture gather function' : not supported for this version or the enabled extensions ERROR: 0:25: 'textureGather(...)' : not supported for this version or the enabled extensions
ERROR: 0:35: 'redeclaration' : cannot change the type of gl_Color ERROR: 0:35: 'redeclaration' : cannot change the type of gl_Color
ERROR: 0:38: 'gl_Color' : redeclaring non-array as array ERROR: 0:38: 'gl_Color' : redeclaring non-array as array
ERROR: 0:39: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_Color ERROR: 0:39: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_Color
WARNING: 0:45: extension GL_ARB_texture_gather is being used for texture gather function WARNING: 0:45: extension GL_ARB_texture_gather is being used for textureGather(...)
ERROR: 0:62: '<' : wrong operand types: no operation '<' exists that takes a left-hand operand of type '3-component vector of bool' and a right operand of type '3-component vector of bool' (or there is no acceptable conversion) ERROR: 0:62: '<' : wrong operand types: no operation '<' exists that takes a left-hand operand of type '3-component vector of bool' and a right operand of type '3-component vector of bool' (or there is no acceptable conversion)
ERROR: 0:63: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type '3-component vector of uint' and a right operand of type '3-component vector of uint' (or there is no acceptable conversion) ERROR: 0:63: '>' : wrong operand types: no operation '>' exists that takes a left-hand operand of type '3-component vector of uint' and a right operand of type '3-component vector of uint' (or there is no acceptable conversion)
ERROR: 0:64: '>=' : wrong operand types: no operation '>=' exists that takes a left-hand operand of type 'const 2-component vector of uint' and a right operand of type 'const 2-component vector of uint' (or there is no acceptable conversion) ERROR: 0:64: '>=' : wrong operand types: no operation '>=' exists that takes a left-hand operand of type 'const 2-component vector of uint' and a right operand of type 'const 2-component vector of uint' (or there is no acceptable conversion)
ERROR: 7 compilation errors. No code generated. ERROR: 0:80: 'textureGatherOffset' : no matching overloaded function found
ERROR: 0:80: 'assign' : cannot convert from 'const float' to '4-component vector of float'
ERROR: 0:81: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions
ERROR: 0:84: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions
ERROR: 0:85: 'textureGatherOffset(...)' : not supported for this version or the enabled extensions
WARNING: 0:88: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5
ERROR: 12 compilation errors. No code generated.
ERROR: node is still EOpNull! ERROR: node is still EOpNull!
...@@ -93,6 +99,123 @@ ERROR: node is still EOpNull! ...@@ -93,6 +99,123 @@ ERROR: node is still EOpNull!
0:65 true (const bool) 0:65 true (const bool)
0:66 Constant: 0:66 Constant:
0:66 false (const bool) 0:66 false (const bool)
0:77 Function Definition: bar23( (void)
0:77 Function Parameters:
0:? Sequence
0:80 's' (4-component vector of float)
0:81 move second child to first child (4-component vector of float)
0:81 's' (4-component vector of float)
0:81 Function Call: textureGatherOffset(sR21;vf2;vi2; (4-component vector of float)
0:81 'samp2DR' (uniform sampler2DRect)
0:81 Constant:
0:81 0.300000
0:81 0.300000
0:81 Constant:
0:81 1 (const int)
0:81 1 (const int)
0:82 move second child to first child (4-component vector of float)
0:82 's' (4-component vector of float)
0:82 Function Call: textureGatherOffset(s21;vf2;vi2; (4-component vector of float)
0:82 'samp2D' (uniform sampler2D)
0:82 Constant:
0:82 0.300000
0:82 0.300000
0:82 Constant:
0:82 1 (const int)
0:82 1 (const int)
0:83 move second child to first child (4-component vector of float)
0:83 's' (4-component vector of float)
0:83 Function Call: textureGatherOffset(sA21;vf3;vi2; (4-component vector of float)
0:83 'samp2DA' (uniform sampler2DArray)
0:83 Constant:
0:83 0.300000
0:83 0.300000
0:83 0.300000
0:83 Constant:
0:83 1 (const int)
0:83 1 (const int)
0:84 move second child to first child (4-component vector of float)
0:84 's' (4-component vector of float)
0:84 Function Call: textureGatherOffset(sS21;vf2;f1;vi2; (4-component vector of float)
0:84 'samp2DS' (uniform sampler2DShadow)
0:84 Constant:
0:84 0.300000
0:84 0.300000
0:84 Constant:
0:84 1.300000
0:84 Constant:
0:84 1 (const int)
0:84 1 (const int)
0:85 move second child to first child (4-component vector of float)
0:85 's' (4-component vector of float)
0:85 Function Call: textureGatherOffset(s21;vf2;vi2;i1; (4-component vector of float)
0:85 'samp2D' (uniform sampler2D)
0:85 Constant:
0:85 0.300000
0:85 0.300000
0:85 Constant:
0:85 1 (const int)
0:85 1 (const int)
0:85 Constant:
0:85 2 (const int)
0:90 Function Definition: bar234( (void)
0:90 Function Parameters:
0:? Sequence
0:93 move second child to first child (4-component vector of float)
0:93 's' (4-component vector of float)
0:93 Function Call: textureGatherOffset(s21;vf2;vi2; (4-component vector of float)
0:93 'samp2D' (uniform sampler2D)
0:93 Constant:
0:93 0.300000
0:93 0.300000
0:93 Constant:
0:93 1 (const int)
0:93 1 (const int)
0:94 move second child to first child (4-component vector of float)
0:94 's' (4-component vector of float)
0:94 Function Call: textureGatherOffset(sA21;vf3;vi2; (4-component vector of float)
0:94 'samp2DA' (uniform sampler2DArray)
0:94 Constant:
0:94 0.300000
0:94 0.300000
0:94 0.300000
0:94 Constant:
0:94 1 (const int)
0:94 1 (const int)
0:95 move second child to first child (4-component vector of float)
0:95 's' (4-component vector of float)
0:95 Function Call: textureGatherOffset(sR21;vf2;vi2; (4-component vector of float)
0:95 'samp2DR' (uniform sampler2DRect)
0:95 Constant:
0:95 0.300000
0:95 0.300000
0:95 Constant:
0:95 1 (const int)
0:95 1 (const int)
0:96 move second child to first child (4-component vector of float)
0:96 's' (4-component vector of float)
0:96 Function Call: textureGatherOffset(sS21;vf2;f1;vi2; (4-component vector of float)
0:96 'samp2DS' (uniform sampler2DShadow)
0:96 Constant:
0:96 0.300000
0:96 0.300000
0:96 Constant:
0:96 1.300000
0:96 Constant:
0:96 1 (const int)
0:96 1 (const int)
0:97 move second child to first child (4-component vector of float)
0:97 's' (4-component vector of float)
0:97 Function Call: textureGatherOffset(s21;vf2;vi2;i1; (4-component vector of float)
0:97 'samp2D' (uniform sampler2D)
0:97 Constant:
0:97 0.300000
0:97 0.300000
0:97 Constant:
0:97 1 (const int)
0:97 1 (const int)
0:97 Constant:
0:97 2 (const int)
0:? Linker Objects 0:? Linker Objects
0:? 'a' (3-component vector of float) 0:? 'a' (3-component vector of float)
0:? 'b' (float) 0:? 'b' (float)
...@@ -106,6 +229,10 @@ ERROR: node is still EOpNull! ...@@ -106,6 +229,10 @@ ERROR: node is still EOpNull!
0:? 'sampC' (uniform samplerCube) 0:? 'sampC' (uniform samplerCube)
0:? 'gl_Color' (smooth in 4-component vector of float) 0:? 'gl_Color' (smooth in 4-component vector of float)
0:? 'gl_Color' (flat in 4-component vector of float) 0:? 'gl_Color' (flat in 4-component vector of float)
0:? 'samp2D' (uniform sampler2D)
0:? 'samp2DS' (uniform sampler2DShadow)
0:? 'samp2DR' (uniform sampler2DRect)
0:? 'samp2DA' (uniform sampler2DArray)
Linked fragment stage: Linked fragment stage:
......
...@@ -2,9 +2,8 @@ versionsErrors.frag ...@@ -2,9 +2,8 @@ versionsErrors.frag
ERROR: #version: versions before 150 do not allow a profile token ERROR: #version: versions before 150 do not allow a profile token
ERROR: 0:38: 'attribute' : not supported in this stage: fragment ERROR: 0:38: 'attribute' : not supported in this stage: fragment
ERROR: 0:40: 'sampler2DRect' : Reserved word. ERROR: 0:40: 'sampler2DRect' : Reserved word.
ERROR: 0:40: 'rectangle texture' : not supported for this version or the enabled extensions
ERROR: 0:44: 'floating-point suffix' : not supported for this version or the enabled extensions ERROR: 0:44: 'floating-point suffix' : not supported for this version or the enabled extensions
ERROR: 5 compilation errors. No code generated. ERROR: 4 compilation errors. No code generated.
ERROR: node is still EOpNull! ERROR: node is still EOpNull!
......
...@@ -1498,8 +1498,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile) ...@@ -1498,8 +1498,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile)
if ((dim == Esd1D || dim == EsdRect) && profile == EEsProfile) if ((dim == Esd1D || dim == EsdRect) && profile == EEsProfile)
continue; continue;
if (dim == EsdRect && version < 140)
continue;
if (dim != Esd2D && ms) if (dim != Esd2D && ms)
continue; continue;
if ((dim == Esd3D || dim == EsdRect) && arrayed) if ((dim == Esd3D || dim == EsdRect) && arrayed)
...@@ -1518,6 +1516,9 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile) ...@@ -1518,6 +1516,9 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile)
if (shadow && bType > 0) if (shadow && bType > 0)
continue; continue;
if (dim == EsdRect && version < 140 && bType > 0)
continue;
// //
// Now, make all the function prototypes for the type we just built... // Now, make all the function prototypes for the type we just built...
// //
...@@ -1800,6 +1801,9 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int vers ...@@ -1800,6 +1801,9 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int vers
if (sampler.ms) if (sampler.ms)
return; return;
if (version < 140 && sampler.dim == EsdRect && sampler.type != EbtFloat)
return;
// make one string per stage to contain all functions of the passed-in type for that stage // make one string per stage to contain all functions of the passed-in type for that stage
TString functions[EShLangCount]; TString functions[EShLangCount];
......
...@@ -982,18 +982,45 @@ void TParseContext::nonOpBuiltInCheck(TSourceLoc loc, const TFunction& fnCandida ...@@ -982,18 +982,45 @@ void TParseContext::nonOpBuiltInCheck(TSourceLoc loc, const TFunction& fnCandida
if (fnCandidate.getName().compare(0, 7, "texture") == 0) { if (fnCandidate.getName().compare(0, 7, "texture") == 0) {
if (fnCandidate.getName().compare(0, 13, "textureGather") == 0) { if (fnCandidate.getName().compare(0, 13, "textureGather") == 0) {
const char* feature = "texture gather function"; TString featureString = fnCandidate.getName() + "(...)";
const char* feature = featureString.c_str();
requireProfile(loc, ~EEsProfile, feature); requireProfile(loc, ~EEsProfile, feature);
profileRequires(loc, ~EEsProfile, 400, GL_ARB_texture_gather, feature); // TODO: GL_ARB_gpu_shader5
int lastArgIndex = fnCandidate.getParamCount() - 1; int compArg = -1; // track which argument, if any, is the constant component argument
if (fnCandidate[lastArgIndex].type->getBasicType() == EbtInt && fnCandidate[lastArgIndex].type->isScalar()) { if (fnCandidate.getName().compare("textureGatherOffset") == 0) {
// the last integral argument to a texture gather must be a constant int between 0 and 3 // GL_ARB_texture_gather is good enough for 2D non-shadow textures with no component argument
if (callNode.getSequence()[lastArgIndex]->getAsConstantUnion()) { if (fnCandidate[0].type->getSampler().dim == Esd2D && ! fnCandidate[0].type->getSampler().shadow && fnCandidate.getParamCount() == 3)
int value = callNode.getSequence()[lastArgIndex]->getAsConstantUnion()->getConstArray()[0].getIConst(); profileRequires(loc, ~EEsProfile, 400, GL_ARB_texture_gather, feature);
else
profileRequires(loc, ~EEsProfile, 400, GL_ARB_gpu_shader5, feature);
if (! fnCandidate[0].type->getSampler().shadow)
compArg = 3;
} else if (fnCandidate.getName().compare("textureGatherOffsets") == 0) {
profileRequires(loc, ~EEsProfile, 400, GL_ARB_gpu_shader5, feature);
if (! fnCandidate[0].type->getSampler().shadow)
compArg = 3;
// check for constant offsets
int offsetArg = fnCandidate[0].type->getSampler().shadow ? 3 : 2;
if (! callNode.getSequence()[offsetArg]->getAsConstantUnion())
error(loc, "must be a compile-time constant:", feature, "offsets argument");
} else if (fnCandidate.getName().compare("textureGather") == 0) {
// More than two arguments needs gpu_shader5, and rectangular or shadow needs gpu_shader5,
// otherwise, need GL_ARB_texture_gather.
if (fnCandidate.getParamCount() > 2 || fnCandidate[0].type->getSampler().dim == EsdRect || fnCandidate[0].type->getSampler().shadow) {
profileRequires(loc, ~EEsProfile, 400, GL_ARB_gpu_shader5, feature);
if (! fnCandidate[0].type->getSampler().shadow)
compArg = 2;
} else
profileRequires(loc, ~EEsProfile, 400, GL_ARB_texture_gather, feature);
}
if (compArg > 0 && compArg < fnCandidate.getParamCount()) {
if (callNode.getSequence()[compArg]->getAsConstantUnion()) {
int value = callNode.getSequence()[compArg]->getAsConstantUnion()->getConstArray()[0].getIConst();
if (value < 0 || value > 3) if (value < 0 || value > 3)
error(loc, "must be 0, 1, 2, or 3", "texture gather component", ""); error(loc, "must be 0, 1, 2, or 3:", feature, "component argument");
} else } else
error(loc, "must be a constant", "texture gather component", ""); error(loc, "must be a compile-time constant:", feature, "component argument");
} }
} else { } else {
// this is only for functions not starting "textureGather"... // this is only for functions not starting "textureGather"...
......
...@@ -798,8 +798,9 @@ int TScanContext::tokenizeIdentifier() ...@@ -798,8 +798,9 @@ int TScanContext::tokenizeIdentifier()
case SAMPLER2DRECT: case SAMPLER2DRECT:
case SAMPLER2DRECTSHADOW: case SAMPLER2DRECTSHADOW:
afterType = true; afterType = true;
if (parseContext.profile == EEsProfile || if (parseContext.profile == EEsProfile)
(parseContext.profile != EEsProfile && parseContext.version < 140)) reservedWord();
else if (parseContext.version < 140 && ! parseContext.symbolTable.atBuiltInLevel() && ! parseContext.extensionsTurnedOn(1, &GL_ARB_texture_rectangle))
reservedWord(); reservedWord();
return keyword; return keyword;
......
...@@ -157,8 +157,9 @@ void TParseContext::initializeExtensionBehavior() ...@@ -157,8 +157,9 @@ void TParseContext::initializeExtensionBehavior()
extensionBehavior[GL_ARB_texture_rectangle] = EBhDisable; extensionBehavior[GL_ARB_texture_rectangle] = EBhDisable;
extensionBehavior[GL_3DL_array_objects] = EBhDisable; extensionBehavior[GL_3DL_array_objects] = EBhDisable;
extensionBehavior[GL_ARB_shading_language_420pack] = EBhDisable; extensionBehavior[GL_ARB_shading_language_420pack] = EBhDisablePartial;
extensionBehavior[GL_ARB_texture_gather] = EBhDisable; extensionBehavior[GL_ARB_texture_gather] = EBhDisable;
extensionBehavior[GL_ARB_gpu_shader5] = EBhDisablePartial;
extensionBehavior[GL_ARB_separate_shader_objects] = EBhDisable; extensionBehavior[GL_ARB_separate_shader_objects] = EBhDisable;
} }
...@@ -180,6 +181,7 @@ const char* TParseContext::getPreamble() ...@@ -180,6 +181,7 @@ const char* TParseContext::getPreamble()
"#define GL_ARB_texture_rectangle 1\n" "#define GL_ARB_texture_rectangle 1\n"
"#define GL_ARB_shading_language_420pack 1\n" "#define GL_ARB_shading_language_420pack 1\n"
"#define GL_ARB_texture_gather 1\n" "#define GL_ARB_texture_gather 1\n"
"#define GL_ARB_gpu_shader5 1\n"
"#define GL_ARB_separate_shader_objects 1\n"; "#define GL_ARB_separate_shader_objects 1\n";
} }
} }
...@@ -435,8 +437,11 @@ void TParseContext::updateExtensionBehavior(const char* extension, const char* b ...@@ -435,8 +437,11 @@ void TParseContext::updateExtensionBehavior(const char* extension, const char* b
} }
return; return;
} else } else {
if (iter->second == EBhDisablePartial)
warn(getCurrentLoc(), "extension is only partially supported:", "#extension", extension);
iter->second = behavior; iter->second = behavior;
}
} }
} }
......
...@@ -65,7 +65,8 @@ typedef enum { ...@@ -65,7 +65,8 @@ typedef enum {
EBhRequire, EBhRequire,
EBhEnable, EBhEnable,
EBhWarn, EBhWarn,
EBhDisable EBhDisable,
EBhDisablePartial // use as initial state of an extension that is only partially implemented
} TExtensionBehavior; } TExtensionBehavior;
// //
...@@ -82,6 +83,7 @@ const char* const GL_ARB_texture_rectangle = "GL_ARB_texture_rectangle"; ...@@ -82,6 +83,7 @@ const char* const GL_ARB_texture_rectangle = "GL_ARB_texture_rectangle";
const char* const GL_3DL_array_objects = "GL_3DL_array_objects"; const char* const GL_3DL_array_objects = "GL_3DL_array_objects";
const char* const GL_ARB_shading_language_420pack = "GL_ARB_shading_language_420pack"; const char* const GL_ARB_shading_language_420pack = "GL_ARB_shading_language_420pack";
const char* const GL_ARB_texture_gather = "GL_ARB_texture_gather"; const char* const GL_ARB_texture_gather = "GL_ARB_texture_gather";
const char* const GL_ARB_gpu_shader5 = "GL_ARB_gpu_shader5";
const char* const GL_ARB_separate_shader_objects = "GL_ARB_separate_shader_objects"; const char* const GL_ARB_separate_shader_objects = "GL_ARB_separate_shader_objects";
} // end namespace glslang } // end namespace glslang
......
...@@ -1717,29 +1717,21 @@ type_specifier_nonarray ...@@ -1717,29 +1717,21 @@ type_specifier_nonarray
$$.sampler.set(EbtUint, EsdCube, true); $$.sampler.set(EbtUint, EsdCube, true);
} }
| SAMPLER2DRECT { | SAMPLER2DRECT {
parseContext.profileRequires($1.loc, ENoProfile, 140, GL_ARB_texture_rectangle, "rectangle texture");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, EsdRect); $$.sampler.set(EbtFloat, EsdRect);
} }
| SAMPLER2DRECTSHADOW { | SAMPLER2DRECTSHADOW {
parseContext.profileRequires($1.loc, ECoreProfile, 140, GL_ARB_texture_rectangle, "rectangle texture");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtFloat, EsdRect, false, true); $$.sampler.set(EbtFloat, EsdRect, false, true);
} }
| ISAMPLER2DRECT { | ISAMPLER2DRECT {
parseContext.profileRequires($1.loc, ECoreProfile, 140, GL_ARB_texture_rectangle, "rectangle texture");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtInt, EsdRect); $$.sampler.set(EbtInt, EsdRect);
} }
| USAMPLER2DRECT { | USAMPLER2DRECT {
parseContext.profileRequires($1.loc, ECoreProfile, 140, GL_ARB_texture_rectangle, "rectangle texture");
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtUint, EsdRect); $$.sampler.set(EbtUint, EsdRect);
......
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