}\r
\r
#extension GL_OES_EGL_image_external : disable\r
+uniform sampler2D s2Dg;\r
\r
int foo203940(int a, float b, float a) // ERROR, a redefined\r
{\r
+ texture2DProjGradEXT(s2Dg, vec3(f13), uv2, uv2); // ERROR, extension not enabled\r
return a;\r
}\r
\r
float f123 = 4.0f; // ERROR\r
float f124 = 5e10F; // ERROR\r
\r
+#extension GL_EXT_shader_texture_lod : enable\r
+\r
+uniform samplerCube sCube;\r
+\r
+void foo323433()\r
+{\r
+ texture2DLodEXT(s2Dg, uv2, f13);\r
+ texture2DProjGradEXT(s2Dg, vec3(f13), uv2, uv2);\r
+ texture2DGradEXT(s2Dg, uv2, uv2, uv2);\r
+ textureCubeGradEXT(sCube, vec3(f13), vec3(f13), vec3(f13));\r
+}\r
+\r
uniform samplerExternalOES badExt; // syntax ERROR\r
// TBuiltIns::initialize(version,profile) context-independent textual built-ins; add them to the right string
// TBuiltIns::initialize(resources,...) context-dependent textual built-ins; add them to the right string
// IdentifyBuiltIns(...,symbolTable) context-independent programmatic additions/mappings to the symbol table,
-// including identify what extensions are needed if a version does not allow a symbol
+// including identifying what extensions are needed if a version does not allow a symbol
// IdentifyBuiltIns(...,symbolTable, resources) context-dependent programmatic additions/mappings to the symbol table,
-// including identify what extensions are needed if a version does not allow a symbol
+// including identifying what extensions are needed if a version does not allow a symbol
//
#include "../Include/intermediate.h"
}
//
- // Original-style texture functions existing in both stages.
+ // Original-style texture functions existing in all stages.
// (Per-stage functions below.)
//
if ((profile == EEsProfile && version == 100) ||
"\n");
}
- if (profile == EEsProfile) {
- // GL_OES_EGL_image_external, caught by keyword check
+ if (profile == EEsProfile) {
commonBuiltins.append(
- "vec4 texture2D(samplerExternalOES, vec2 coord);"
- "vec4 texture2DProj(samplerExternalOES, vec3);"
- "vec4 texture2DProj(samplerExternalOES, vec4);"
+ "vec4 texture2D(samplerExternalOES, vec2 coord);" // GL_OES_EGL_image_external, caught by keyword check
+ "vec4 texture2DProj(samplerExternalOES, vec3);" // GL_OES_EGL_image_external, caught by keyword check
+ "vec4 texture2DProj(samplerExternalOES, vec4);" // GL_OES_EGL_image_external, caught by keyword check
+ "vec4 texture2DGradEXT(sampler2D, vec2, vec2, vec2);" // GL_EXT_shader_texture_lod
+ "vec4 texture2DProjGradEXT(sampler2D, vec3, vec2, vec2);" // GL_EXT_shader_texture_lod
+ "vec4 texture2DProjGradEXT(sampler2D, vec4, vec2, vec2);" // GL_EXT_shader_texture_lod
+ "vec4 textureCubeGradEXT(samplerCube, vec3, vec3, vec3);" // GL_EXT_shader_texture_lod
+
"\n");
}
"\n");
}
+ if (profile == EEsProfile) {
+ stageBuiltins[EShLangFragment].append(
+ "vec4 texture2DLodEXT(sampler2D, vec2, float);" // GL_EXT_shader_texture_lod
+ "vec4 texture2DProjLodEXT(sampler2D, vec3, float);" // GL_EXT_shader_texture_lod
+ "vec4 texture2DProjLodEXT(sampler2D, vec4, float);" // GL_EXT_shader_texture_lod
+ "vec4 textureCubeLodEXT(samplerCube, vec3, float);" // GL_EXT_shader_texture_lod
+
+ "\n");
+ }
stageBuiltins[EShLangFragment].append(
"float dFdx(float p);"
symbolTable.setFunctionExtensions("dFdy", 1, &GL_OES_standard_derivatives);
symbolTable.setFunctionExtensions("fwidth", 1, &GL_OES_standard_derivatives);
}
+ if (profile == EEsProfile) {
+ symbolTable.setFunctionExtensions("texture2DLodEXT", 1, &GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DProjLodEXT", 1, &GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("textureCubeLodEXT", 1, &GL_EXT_shader_texture_lod);
+ }
symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &GL_EXT_frag_depth);
break;
break;
}
+ if (profile == EEsProfile) {
+ symbolTable.setFunctionExtensions("texture2DGradEXT", 1, &GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &GL_EXT_shader_texture_lod);
+ symbolTable.setFunctionExtensions("textureCubeGradEXT", 1, &GL_EXT_shader_texture_lod);
+ }
+
//
- // Next, identify which built-ins from the already loaded headers have
- // a mapping to an operator. Those that are not identified as such are
+ // Next, identify which built-ins have a mapping to an operator.
+ // Those that are not identified as such are
// expected to be resolved through a library of functions, versus as
// operations.
//