mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 19:40:06 +00:00
Implement GL_ARB_shader_texture_image_samples. Also add in gl_MaxSamples and the float imageAtomicExchange.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27721 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
df1d81a958
commit
cd77f8e922
@ -199,6 +199,7 @@ const char* DefaultConfig =
|
||||
"MaxTransformFeedbackInterleavedComponents 64\n"
|
||||
"MaxCullDistances 8\n"
|
||||
"MaxCombinedClipAndCullDistances 8\n"
|
||||
"MaxSamples 4\n"
|
||||
|
||||
"nonInductiveForLoops 1\n"
|
||||
"whileLoops 1\n"
|
||||
@ -407,6 +408,8 @@ void ProcessConfigFile()
|
||||
Resources.maxCullDistances = value;
|
||||
else if (strcmp(token, "MaxCombinedClipAndCullDistances") == 0)
|
||||
Resources.maxCombinedClipAndCullDistances = value;
|
||||
else if (strcmp(token, "MaxSamples") == 0)
|
||||
Resources.maxSamples = value;
|
||||
|
||||
else if (strcmp(token, "nonInductiveForLoops") == 0)
|
||||
Resources.limits.nonInductiveForLoops = (value != 0);
|
||||
|
@ -157,3 +157,26 @@ void fooBarrier()
|
||||
}
|
||||
|
||||
buffer vec4 v; // ERROR
|
||||
|
||||
uniform sampler2DMS s2dms;
|
||||
uniform usampler2DMSArray us2dmsa;
|
||||
layout(rgba32i) uniform iimage2DMS ii2dms;
|
||||
layout(rgba32f) uniform image2DMSArray i2dmsa;
|
||||
|
||||
void fooq()
|
||||
{
|
||||
int s = textureSamples(s2dms); // ERROR
|
||||
s += textureSamples(us2dmsa); // ERROR
|
||||
s += imageSamples(ii2dms); // ERROR
|
||||
s += imageSamples(i2dmsa); // ERROR
|
||||
}
|
||||
|
||||
#extension GL_ARB_shader_texture_image_samples : enable
|
||||
|
||||
void fooq2()
|
||||
{
|
||||
int s = textureSamples(s2dms);
|
||||
s += textureSamples(us2dmsa);
|
||||
s += imageSamples(ii2dms);
|
||||
s += imageSamples(i2dmsa);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ void main()
|
||||
v4 = fwidthCoarse(in4) + fwidthFine(in4);
|
||||
|
||||
float cull = gl_CullDistance[2];
|
||||
float consts = gl_MaxCullDistances + gl_MaxCombinedClipAndCullDistances;
|
||||
float consts = gl_MaxCullDistances + gl_MaxCombinedClipAndCullDistances + gl_MaxSamples;
|
||||
|
||||
if (gl_HelperInvocation)
|
||||
++v4;
|
||||
@ -33,3 +33,17 @@ void main()
|
||||
uint um = mix(uin, uin, b);
|
||||
ivec3 im3 = mix(ivec3(uin), ivec3(uin), bvec3(b));
|
||||
}
|
||||
|
||||
uniform sampler2DMS s2dms;
|
||||
uniform usampler2DMSArray us2dmsa;
|
||||
layout(rgba32i) uniform iimage2DMS ii2dms;
|
||||
layout(rgba32f) uniform image2DMSArray i2dmsa;
|
||||
|
||||
void foo()
|
||||
{
|
||||
int s = textureSamples(s2dms);
|
||||
s += textureSamples(us2dmsa);
|
||||
s += imageSamples(ii2dms);
|
||||
s += imageSamples(i2dmsa);
|
||||
float f = imageAtomicExchange(i2dmsa, ivec3(in3), 2, 4.5);
|
||||
}
|
||||
|
@ -49,11 +49,16 @@ ERROR: 0:150: 'barrier' : 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:159: 'buffer' : buffers can be declared only as blocks
|
||||
ERROR: 49 compilation errors. No code generated.
|
||||
ERROR: 0:168: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:169: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:170: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:171: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 53 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 430
|
||||
Requested GL_ARB_enhanced_layouts
|
||||
Requested GL_ARB_shader_texture_image_samples
|
||||
in xfb mode
|
||||
ERROR: node is still EOpNull!
|
||||
0:14 Function Definition: foo( (void)
|
||||
@ -88,6 +93,46 @@ ERROR: node is still EOpNull!
|
||||
0:155 MemoryBarrierImage (void)
|
||||
0:156 Constant:
|
||||
0:156 0.000000
|
||||
0:166 Function Definition: fooq( (void)
|
||||
0:166 Function Parameters:
|
||||
0:168 Sequence
|
||||
0:168 Sequence
|
||||
0:168 move second child to first child (int)
|
||||
0:168 's' (int)
|
||||
0:168 Function Call: textureSamples(s21; (int)
|
||||
0:168 's2dms' (uniform sampler2DMS)
|
||||
0:169 add second child into first child (int)
|
||||
0:169 's' (int)
|
||||
0:169 Function Call: textureSamples(usA21; (int)
|
||||
0:169 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:170 add second child into first child (int)
|
||||
0:170 's' (int)
|
||||
0:170 Function Call: imageSamples(iI21; (int)
|
||||
0:170 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:171 add second child into first child (int)
|
||||
0:171 's' (int)
|
||||
0:171 Function Call: imageSamples(IA21; (int)
|
||||
0:171 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:176 Function Definition: fooq2( (void)
|
||||
0:176 Function Parameters:
|
||||
0:178 Sequence
|
||||
0:178 Sequence
|
||||
0:178 move second child to first child (int)
|
||||
0:178 's' (int)
|
||||
0:178 Function Call: textureSamples(s21; (int)
|
||||
0:178 's2dms' (uniform sampler2DMS)
|
||||
0:179 add second child into first child (int)
|
||||
0:179 's' (int)
|
||||
0:179 Function Call: textureSamples(usA21; (int)
|
||||
0:179 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:180 add second child into first child (int)
|
||||
0:180 's' (int)
|
||||
0:180 Function Call: imageSamples(iI21; (int)
|
||||
0:180 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:181 add second child into first child (int)
|
||||
0:181 's' (int)
|
||||
0:181 Function Call: imageSamples(IA21; (int)
|
||||
0:181 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:? Linker Objects
|
||||
0:? 'v4' (layout(location=3 ) 4-component vector of float)
|
||||
0:? 'uv4' (layout(location=4 ) uniform 4-component vector of float)
|
||||
@ -129,6 +174,10 @@ ERROR: node is still EOpNull!
|
||||
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:? 'v' (buffer 4-component vector of float)
|
||||
0:? 's2dms' (uniform sampler2DMS)
|
||||
0:? 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:? 'gl_VertexID' (gl_VertexId int)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int)
|
||||
|
||||
@ -141,6 +190,7 @@ ERROR: xfb_buffer 3, xfb_stride 64, minimum stride needed: 80
|
||||
|
||||
Shader version: 430
|
||||
Requested GL_ARB_enhanced_layouts
|
||||
Requested GL_ARB_shader_texture_image_samples
|
||||
in xfb mode
|
||||
ERROR: node is still EOpNull!
|
||||
0:14 Function Definition: foo( (void)
|
||||
@ -175,6 +225,46 @@ ERROR: node is still EOpNull!
|
||||
0:155 MemoryBarrierImage (void)
|
||||
0:156 Constant:
|
||||
0:156 0.000000
|
||||
0:166 Function Definition: fooq( (void)
|
||||
0:166 Function Parameters:
|
||||
0:168 Sequence
|
||||
0:168 Sequence
|
||||
0:168 move second child to first child (int)
|
||||
0:168 's' (int)
|
||||
0:168 Function Call: textureSamples(s21; (int)
|
||||
0:168 's2dms' (uniform sampler2DMS)
|
||||
0:169 add second child into first child (int)
|
||||
0:169 's' (int)
|
||||
0:169 Function Call: textureSamples(usA21; (int)
|
||||
0:169 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:170 add second child into first child (int)
|
||||
0:170 's' (int)
|
||||
0:170 Function Call: imageSamples(iI21; (int)
|
||||
0:170 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:171 add second child into first child (int)
|
||||
0:171 's' (int)
|
||||
0:171 Function Call: imageSamples(IA21; (int)
|
||||
0:171 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:176 Function Definition: fooq2( (void)
|
||||
0:176 Function Parameters:
|
||||
0:178 Sequence
|
||||
0:178 Sequence
|
||||
0:178 move second child to first child (int)
|
||||
0:178 's' (int)
|
||||
0:178 Function Call: textureSamples(s21; (int)
|
||||
0:178 's2dms' (uniform sampler2DMS)
|
||||
0:179 add second child into first child (int)
|
||||
0:179 's' (int)
|
||||
0:179 Function Call: textureSamples(usA21; (int)
|
||||
0:179 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:180 add second child into first child (int)
|
||||
0:180 's' (int)
|
||||
0:180 Function Call: imageSamples(iI21; (int)
|
||||
0:180 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:181 add second child into first child (int)
|
||||
0:181 's' (int)
|
||||
0:181 Function Call: imageSamples(IA21; (int)
|
||||
0:181 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:? Linker Objects
|
||||
0:? 'v4' (layout(location=3 ) 4-component vector of float)
|
||||
0:? 'uv4' (layout(location=4 ) uniform 4-component vector of float)
|
||||
@ -216,6 +306,10 @@ ERROR: node is still EOpNull!
|
||||
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:? 'v' (buffer 4-component vector of float)
|
||||
0:? 's2dms' (uniform sampler2DMS)
|
||||
0:? 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:? 'gl_VertexID' (gl_VertexId int)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int)
|
||||
|
||||
|
@ -58,7 +58,7 @@ Shader version: 450
|
||||
0:19 move second child to first child (float)
|
||||
0:19 'consts' (float)
|
||||
0:19 Constant:
|
||||
0:19 16.000000
|
||||
0:19 20.000000
|
||||
0:21 Test condition and select (void)
|
||||
0:21 Condition
|
||||
0:21 'gl_HelperInvocation' (in bool)
|
||||
@ -99,12 +99,47 @@ Shader version: 450
|
||||
0:34 'uin' (uint)
|
||||
0:34 Construct bvec3 (3-component vector of bool)
|
||||
0:34 'b' (bool)
|
||||
0:42 Function Definition: foo( (void)
|
||||
0:42 Function Parameters:
|
||||
0:44 Sequence
|
||||
0:44 Sequence
|
||||
0:44 move second child to first child (int)
|
||||
0:44 's' (int)
|
||||
0:44 Function Call: textureSamples(s21; (int)
|
||||
0:44 's2dms' (uniform sampler2DMS)
|
||||
0:45 add second child into first child (int)
|
||||
0:45 's' (int)
|
||||
0:45 Function Call: textureSamples(usA21; (int)
|
||||
0:45 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:46 add second child into first child (int)
|
||||
0:46 's' (int)
|
||||
0:46 Function Call: imageSamples(iI21; (int)
|
||||
0:46 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:47 add second child into first child (int)
|
||||
0:47 's' (int)
|
||||
0:47 Function Call: imageSamples(IA21; (int)
|
||||
0:47 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:48 Sequence
|
||||
0:48 move second child to first child (float)
|
||||
0:48 'f' (float)
|
||||
0:48 Function Call: imageAtomicExchange(IA21;vi3;i1;f1; (float)
|
||||
0:48 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:48 Convert float to int (3-component vector of int)
|
||||
0:48 'in3' (smooth in 3-component vector of float)
|
||||
0:48 Constant:
|
||||
0:48 2 (const int)
|
||||
0:48 Constant:
|
||||
0:48 4.500000
|
||||
0:? Linker Objects
|
||||
0:? 'in1' (smooth in float)
|
||||
0:? 'in2' (smooth in 2-component vector of float)
|
||||
0:? 'in3' (smooth in 3-component vector of float)
|
||||
0:? 'in4' (smooth in 4-component vector of float)
|
||||
0:? 'gl_CullDistance' (smooth in implicitly-sized array of float)
|
||||
0:? 's2dms' (uniform sampler2DMS)
|
||||
0:? 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@ -167,7 +202,7 @@ Shader version: 450
|
||||
0:19 move second child to first child (float)
|
||||
0:19 'consts' (float)
|
||||
0:19 Constant:
|
||||
0:19 16.000000
|
||||
0:19 20.000000
|
||||
0:21 Test condition and select (void)
|
||||
0:21 Condition
|
||||
0:21 'gl_HelperInvocation' (in bool)
|
||||
@ -208,10 +243,45 @@ Shader version: 450
|
||||
0:34 'uin' (uint)
|
||||
0:34 Construct bvec3 (3-component vector of bool)
|
||||
0:34 'b' (bool)
|
||||
0:42 Function Definition: foo( (void)
|
||||
0:42 Function Parameters:
|
||||
0:44 Sequence
|
||||
0:44 Sequence
|
||||
0:44 move second child to first child (int)
|
||||
0:44 's' (int)
|
||||
0:44 Function Call: textureSamples(s21; (int)
|
||||
0:44 's2dms' (uniform sampler2DMS)
|
||||
0:45 add second child into first child (int)
|
||||
0:45 's' (int)
|
||||
0:45 Function Call: textureSamples(usA21; (int)
|
||||
0:45 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:46 add second child into first child (int)
|
||||
0:46 's' (int)
|
||||
0:46 Function Call: imageSamples(iI21; (int)
|
||||
0:46 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:47 add second child into first child (int)
|
||||
0:47 's' (int)
|
||||
0:47 Function Call: imageSamples(IA21; (int)
|
||||
0:47 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:48 Sequence
|
||||
0:48 move second child to first child (float)
|
||||
0:48 'f' (float)
|
||||
0:48 Function Call: imageAtomicExchange(IA21;vi3;i1;f1; (float)
|
||||
0:48 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:48 Convert float to int (3-component vector of int)
|
||||
0:48 'in3' (smooth in 3-component vector of float)
|
||||
0:48 Constant:
|
||||
0:48 2 (const int)
|
||||
0:48 Constant:
|
||||
0:48 4.500000
|
||||
0:? Linker Objects
|
||||
0:? 'in1' (smooth in float)
|
||||
0:? 'in2' (smooth in 2-component vector of float)
|
||||
0:? 'in3' (smooth in 3-component vector of float)
|
||||
0:? 'in4' (smooth in 4-component vector of float)
|
||||
0:? 'gl_CullDistance' (smooth in 3-element array of float)
|
||||
0:? 's2dms' (uniform sampler2DMS)
|
||||
0:? 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
|
||||
|
@ -80,6 +80,7 @@ MaxTransformFeedbackBuffers 4
|
||||
MaxTransformFeedbackInterleavedComponents 64
|
||||
MaxCullDistances 8
|
||||
MaxCombinedClipAndCullDistances 8
|
||||
MaxSamples 4
|
||||
nonInductiveForLoops 1
|
||||
whileLoops 1
|
||||
doWhileLoops 1
|
||||
|
@ -132,6 +132,7 @@ struct TBuiltInResource {
|
||||
int maxTransformFeedbackInterleavedComponents;
|
||||
int maxCullDistances;
|
||||
int maxCombinedClipAndCullDistances;
|
||||
int maxSamples;
|
||||
|
||||
TLimits limits;
|
||||
};
|
||||
|
@ -1697,6 +1697,18 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, TString& typeName, int versi
|
||||
commonBuiltins.append(",int);\n");
|
||||
else
|
||||
commonBuiltins.append(");\n");
|
||||
|
||||
// GL_ARB_shader_texture_image_samples
|
||||
// TODO: spec issue? there are no memory qualifiers; how to query a writeonly/readonly image, etc?
|
||||
if (profile != EEsProfile && version >= 430 && sampler.ms) {
|
||||
commonBuiltins.append("int ");
|
||||
if (sampler.image)
|
||||
commonBuiltins.append("imageSamples(");
|
||||
else
|
||||
commonBuiltins.append("textureSamples(");
|
||||
commonBuiltins.append(typeName);
|
||||
commonBuiltins.append(");\n");
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@ -1764,6 +1776,15 @@ void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int versi
|
||||
commonBuiltins.append(", ");
|
||||
commonBuiltins.append(dataType);
|
||||
commonBuiltins.append(");\n");
|
||||
} else {
|
||||
// not int or uint
|
||||
// GL_ARB_ES3_1_compatibility
|
||||
// TODO: spec issue: are there restrictions on the kind of layout() that can be used? what about dropping memory qualifiers?
|
||||
if (version >= 450) {
|
||||
commonBuiltins.append("float imageAtomicExchange(coherent ");
|
||||
commonBuiltins.append(imageParams);
|
||||
commonBuiltins.append(", float);\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2356,6 +2377,8 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
||||
s.append(builtInConstant);
|
||||
snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounterBuffers = %d;", resources. maxGeometryAtomicCounterBuffers);
|
||||
s.append(builtInConstant);
|
||||
|
||||
s.append("\n");
|
||||
}
|
||||
|
||||
|
||||
@ -2380,16 +2403,24 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
||||
s.append(builtInConstant);
|
||||
snprintf(builtInConstant, maxSize, "const int gl_MaxComputeAtomicCounterBuffers = %d;", resources.maxComputeAtomicCounterBuffers);
|
||||
s.append(builtInConstant);
|
||||
|
||||
s.append("\n");
|
||||
}
|
||||
|
||||
// GL_ARB_cull_distance
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
snprintf(builtInConstant, maxSize, "const int gl_MaxCullDistances = %d;", resources.maxCullDistances);
|
||||
snprintf(builtInConstant, maxSize, "const int gl_MaxCullDistances = %d;", resources.maxCullDistances);
|
||||
s.append(builtInConstant);
|
||||
snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedClipAndCullDistances = %d;", resources.maxCombinedClipAndCullDistances);
|
||||
s.append(builtInConstant);
|
||||
}
|
||||
|
||||
// GL_ARB_ES3_1_compatibility
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
snprintf(builtInConstant, maxSize, "const int gl_MaxSamples = %d;", resources.maxSamples);
|
||||
s.append(builtInConstant);
|
||||
}
|
||||
|
||||
s.append("\n");
|
||||
}
|
||||
|
||||
|
@ -1296,12 +1296,17 @@ void TParseContext::nonOpBuiltInCheck(TSourceLoc loc, const TFunction& fnCandida
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// GL_ARB_shader_texture_image_samples
|
||||
if (fnCandidate.getName().compare(0, 14, "textureSamples") == 0 || fnCandidate.getName().compare(0, 12, "imageSamples") == 0)
|
||||
profileRequires(loc, ~EEsProfile, 450, GL_ARB_shader_texture_image_samples, "textureSamples and imageSamples");
|
||||
|
||||
if (fnCandidate.getName().compare(0, 11, "imageAtomic") == 0) {
|
||||
const TType& imageType = callNode.getSequence()[0]->getAsTyped()->getType();
|
||||
if (imageType.getSampler().type == EbtInt || imageType.getSampler().type == EbtUint) {
|
||||
if (imageType.getQualifier().layoutFormat != ElfR32i && imageType.getQualifier().layoutFormat != ElfR32ui)
|
||||
error(loc, "only supported on image with format r32i or r32ui", fnCandidate.getName().c_str(), "");
|
||||
} else
|
||||
} else if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0)
|
||||
error(loc, "only supported on integer images", fnCandidate.getName().c_str(), "");
|
||||
}
|
||||
}
|
||||
|
@ -149,26 +149,27 @@ namespace glslang {
|
||||
//
|
||||
void TParseContext::initializeExtensionBehavior()
|
||||
{
|
||||
extensionBehavior[GL_OES_texture_3D] = EBhDisable;
|
||||
extensionBehavior[GL_OES_standard_derivatives] = EBhDisable;
|
||||
extensionBehavior[GL_EXT_frag_depth] = EBhDisable;
|
||||
extensionBehavior[GL_OES_EGL_image_external] = EBhDisable;
|
||||
extensionBehavior[GL_EXT_shader_texture_lod] = EBhDisable;
|
||||
|
||||
extensionBehavior[GL_ARB_texture_rectangle] = EBhDisable;
|
||||
extensionBehavior[GL_3DL_array_objects] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_shading_language_420pack] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_texture_gather] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_gpu_shader5] = EBhDisablePartial;
|
||||
extensionBehavior[GL_ARB_separate_shader_objects] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_tessellation_shader] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_enhanced_layouts] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_texture_cube_map_array] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_shader_texture_lod] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_explicit_attrib_location] = EBhDisablePartial; // "index" for fragment outputs is missing
|
||||
extensionBehavior[GL_ARB_shader_image_load_store] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_shader_atomic_counters] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_derivative_control] = EBhDisable;
|
||||
extensionBehavior[GL_OES_texture_3D] = EBhDisable;
|
||||
extensionBehavior[GL_OES_standard_derivatives] = EBhDisable;
|
||||
extensionBehavior[GL_EXT_frag_depth] = EBhDisable;
|
||||
extensionBehavior[GL_OES_EGL_image_external] = EBhDisable;
|
||||
extensionBehavior[GL_EXT_shader_texture_lod] = EBhDisable;
|
||||
|
||||
extensionBehavior[GL_ARB_texture_rectangle] = EBhDisable;
|
||||
extensionBehavior[GL_3DL_array_objects] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_shading_language_420pack] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_texture_gather] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_gpu_shader5] = EBhDisablePartial;
|
||||
extensionBehavior[GL_ARB_separate_shader_objects] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_tessellation_shader] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_enhanced_layouts] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_texture_cube_map_array] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_shader_texture_lod] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_explicit_attrib_location] = EBhDisablePartial; // "index" for fragment outputs is missing
|
||||
extensionBehavior[GL_ARB_shader_image_load_store] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_shader_atomic_counters] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_derivative_control] = EBhDisable;
|
||||
extensionBehavior[GL_ARB_shader_texture_image_samples] = EBhDisable;
|
||||
// extensionBehavior[GL_ARB_cull_distance] = EBhDisable; // present for 4.5, but need extension control over block members
|
||||
}
|
||||
|
||||
@ -213,6 +214,7 @@ const char* TParseContext::getPreamble()
|
||||
"#define GL_ARB_shader_image_load_store 1\n"
|
||||
"#define GL_ARB_shader_atomic_counters 1\n"
|
||||
"#define GL_ARB_derivative_control 1\n"
|
||||
"#define GL_ARB_shader_texture_image_samples 1\n"
|
||||
// "#define GL_ARB_cull_distance 1\n" // present for 4.5, but need extension control over block members
|
||||
;
|
||||
}
|
||||
|
@ -73,26 +73,27 @@ typedef enum {
|
||||
// Symbolic names for extensions. Strings may be directly used when calling the
|
||||
// functions, but better to have the compiler do spelling checks.
|
||||
//
|
||||
const char* const GL_OES_texture_3D = "GL_OES_texture_3D";
|
||||
const char* const GL_OES_standard_derivatives = "GL_OES_standard_derivatives";
|
||||
const char* const GL_EXT_frag_depth = "GL_EXT_frag_depth";
|
||||
const char* const GL_OES_EGL_image_external = "GL_OES_EGL_image_external";
|
||||
const char* const GL_EXT_shader_texture_lod = "GL_EXT_shader_texture_lod";
|
||||
const char* const GL_OES_texture_3D = "GL_OES_texture_3D";
|
||||
const char* const GL_OES_standard_derivatives = "GL_OES_standard_derivatives";
|
||||
const char* const GL_EXT_frag_depth = "GL_EXT_frag_depth";
|
||||
const char* const GL_OES_EGL_image_external = "GL_OES_EGL_image_external";
|
||||
const char* const GL_EXT_shader_texture_lod = "GL_EXT_shader_texture_lod";
|
||||
|
||||
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_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_gpu_shader5 = "GL_ARB_gpu_shader5";
|
||||
const char* const GL_ARB_separate_shader_objects = "GL_ARB_separate_shader_objects";
|
||||
const char* const GL_ARB_tessellation_shader = "GL_ARB_tessellation_shader";
|
||||
const char* const GL_ARB_enhanced_layouts = "GL_ARB_enhanced_layouts";
|
||||
const char* const GL_ARB_texture_cube_map_array = "GL_ARB_texture_cube_map_array";
|
||||
const char* const GL_ARB_shader_texture_lod = "GL_ARB_shader_texture_lod";
|
||||
const char* const GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attrib_location";
|
||||
const char* const GL_ARB_shader_image_load_store = "GL_ARB_shader_image_load_store";
|
||||
const char* const GL_ARB_shader_atomic_counters = "GL_ARB_shader_atomic_counters";
|
||||
const char* const GL_ARB_derivative_control = "GL_ARB_derivative_control";
|
||||
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_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_gpu_shader5 = "GL_ARB_gpu_shader5";
|
||||
const char* const GL_ARB_separate_shader_objects = "GL_ARB_separate_shader_objects";
|
||||
const char* const GL_ARB_tessellation_shader = "GL_ARB_tessellation_shader";
|
||||
const char* const GL_ARB_enhanced_layouts = "GL_ARB_enhanced_layouts";
|
||||
const char* const GL_ARB_texture_cube_map_array = "GL_ARB_texture_cube_map_array";
|
||||
const char* const GL_ARB_shader_texture_lod = "GL_ARB_shader_texture_lod";
|
||||
const char* const GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attrib_location";
|
||||
const char* const GL_ARB_shader_image_load_store = "GL_ARB_shader_image_load_store";
|
||||
const char* const GL_ARB_shader_atomic_counters = "GL_ARB_shader_atomic_counters";
|
||||
const char* const GL_ARB_derivative_control = "GL_ARB_derivative_control";
|
||||
const char* const GL_ARB_shader_texture_image_samples = "GL_ARB_shader_texture_image_samples";
|
||||
//const char* const GL_ARB_cull_distance = "GL_ARB_cull_distance"; // present for 4.5, but need extension control over block members
|
||||
|
||||
} // end namespace glslang
|
||||
|
Loading…
Reference in New Issue
Block a user