GL_EXT_gpu_shader5\r
GL_OES_gpu_shader5\r
ERROR: 0:223: 'textureGatherOffsets(...)' : must be a compile-time constant: offsets argument\r
-ERROR: 62 compilation errors. No code generated.\r
+ERROR: 0:257: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables\r
+ERROR: 0:258: 'gl_SamplePosition' : required extension not requested: GL_OES_sample_variables\r
+ERROR: 0:259: 'gl_SampleMaskIn' : required extension not requested: GL_OES_sample_variables\r
+ERROR: 0:260: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables\r
+ERROR: 0:261: 'gl_NumSamples' : required extension not requested: GL_OES_sample_variables\r
+ERROR: 67 compilation errors. No code generated.\r
\r
\r
Shader version: 310\r
Requested GL_EXT_texture_cube_map_array\r
Requested GL_OES_geometry_shader\r
Requested GL_OES_gpu_shader5\r
+Requested GL_OES_sample_variables\r
Requested GL_OES_shader_io_blocks\r
gl_FragCoord pixel center is integer\r
gl_FragCoord origin is upper left\r
0:252 0.500000\r
0:252 Constant:\r
0:252 0.270000\r
+0:255 Function Definition: badSample( (global void)\r
+0:255 Function Parameters: \r
+0:257 Sequence\r
+0:257 Sequence\r
+0:257 move second child to first child (temp lowp int)\r
+0:257 'a1' (temp lowp int)\r
+0:257 'gl_SampleID' (flat in lowp int SampleId)\r
+0:258 Sequence\r
+0:258 move second child to first child (temp mediump 2-component vector of float)\r
+0:258 'a2' (temp mediump 2-component vector of float)\r
+0:258 'gl_SamplePosition' (smooth in mediump 2-component vector of float SamplePosition)\r
+0:259 Sequence\r
+0:259 move second child to first child (temp highp int)\r
+0:259 'a3' (temp highp int)\r
+0:259 direct index (flat temp highp int SampleMaskIn)\r
+0:259 'gl_SampleMaskIn' (flat in implicitly-sized array of highp int SampleMaskIn)\r
+0:259 Constant:\r
+0:259 0 (const int)\r
+0:260 move second child to first child (temp highp int)\r
+0:260 direct index (temp highp int SampleMaskIn)\r
+0:260 'gl_SampleMask' (out implicitly-sized array of highp int SampleMaskIn)\r
+0:260 Constant:\r
+0:260 0 (const int)\r
+0:260 'a3' (temp highp int)\r
+0:261 Sequence\r
+0:261 move second child to first child (temp mediump int)\r
+0:261 'n' (temp mediump int)\r
+0:261 'gl_NumSamples' (uniform lowp int)\r
+0:268 Function Definition: goodSample( (global void)\r
+0:268 Function Parameters: \r
+0:270 Sequence\r
+0:270 Sequence\r
+0:270 move second child to first child (temp lowp int)\r
+0:270 'a1' (temp lowp int)\r
+0:270 'gl_SampleID' (flat in lowp int SampleId)\r
+0:271 Sequence\r
+0:271 move second child to first child (temp mediump 2-component vector of float)\r
+0:271 'a2' (temp mediump 2-component vector of float)\r
+0:271 'gl_SamplePosition' (smooth in mediump 2-component vector of float SamplePosition)\r
+0:272 Sequence\r
+0:272 move second child to first child (temp highp int)\r
+0:272 'a3' (temp highp int)\r
+0:272 direct index (flat temp highp int SampleMaskIn)\r
+0:272 'gl_SampleMaskIn' (flat in implicitly-sized array of highp int SampleMaskIn)\r
+0:272 Constant:\r
+0:272 0 (const int)\r
+0:273 move second child to first child (temp highp int)\r
+0:273 direct index (temp highp int SampleMaskIn)\r
+0:273 'gl_SampleMask' (out implicitly-sized array of highp int SampleMaskIn)\r
+0:273 Constant:\r
+0:273 0 (const int)\r
+0:273 'a3' (temp highp int)\r
+0:274 Sequence\r
+0:274 move second child to first child (temp mediump int)\r
+0:274 'n1' (temp mediump int)\r
+0:274 Constant:\r
+0:274 4 (const int)\r
+0:275 Sequence\r
+0:275 move second child to first child (temp mediump int)\r
+0:275 'n2' (temp mediump int)\r
+0:275 'gl_NumSamples' (uniform lowp int)\r
0:? Linker Objects\r
0:? 'gl_FragCoord' (smooth in mediump 4-component vector of float)\r
0:? 'v3' (layout(location=2 ) smooth in mediump 3-component vector of float)\r
0:? 'CA5' (uniform highp samplerCubeArrayShadow)\r
0:? 'CA6' (uniform highp isamplerCubeArray)\r
0:? 'CA7' (uniform highp usamplerCubeArray)\r
+0:? 'gl_SampleMaskIn' (flat in implicitly-sized array of highp int SampleMaskIn)\r
+0:? 'gl_SampleMask' (out implicitly-sized array of highp int SampleMaskIn)\r
\r
\r
Linked fragment stage:\r
Requested GL_EXT_texture_cube_map_array\r
Requested GL_OES_geometry_shader\r
Requested GL_OES_gpu_shader5\r
+Requested GL_OES_sample_variables\r
Requested GL_OES_shader_io_blocks\r
gl_FragCoord pixel center is integer\r
gl_FragCoord origin is upper left\r
0:252 0.500000\r
0:252 Constant:\r
0:252 0.270000\r
+0:255 Function Definition: badSample( (global void)\r
+0:255 Function Parameters: \r
+0:257 Sequence\r
+0:257 Sequence\r
+0:257 move second child to first child (temp lowp int)\r
+0:257 'a1' (temp lowp int)\r
+0:257 'gl_SampleID' (flat in lowp int SampleId)\r
+0:258 Sequence\r
+0:258 move second child to first child (temp mediump 2-component vector of float)\r
+0:258 'a2' (temp mediump 2-component vector of float)\r
+0:258 'gl_SamplePosition' (smooth in mediump 2-component vector of float SamplePosition)\r
+0:259 Sequence\r
+0:259 move second child to first child (temp highp int)\r
+0:259 'a3' (temp highp int)\r
+0:259 direct index (flat temp highp int SampleMaskIn)\r
+0:259 'gl_SampleMaskIn' (flat in 1-element array of highp int SampleMaskIn)\r
+0:259 Constant:\r
+0:259 0 (const int)\r
+0:260 move second child to first child (temp highp int)\r
+0:260 direct index (temp highp int SampleMaskIn)\r
+0:260 'gl_SampleMask' (out 1-element array of highp int SampleMaskIn)\r
+0:260 Constant:\r
+0:260 0 (const int)\r
+0:260 'a3' (temp highp int)\r
+0:261 Sequence\r
+0:261 move second child to first child (temp mediump int)\r
+0:261 'n' (temp mediump int)\r
+0:261 'gl_NumSamples' (uniform lowp int)\r
+0:268 Function Definition: goodSample( (global void)\r
+0:268 Function Parameters: \r
+0:270 Sequence\r
+0:270 Sequence\r
+0:270 move second child to first child (temp lowp int)\r
+0:270 'a1' (temp lowp int)\r
+0:270 'gl_SampleID' (flat in lowp int SampleId)\r
+0:271 Sequence\r
+0:271 move second child to first child (temp mediump 2-component vector of float)\r
+0:271 'a2' (temp mediump 2-component vector of float)\r
+0:271 'gl_SamplePosition' (smooth in mediump 2-component vector of float SamplePosition)\r
+0:272 Sequence\r
+0:272 move second child to first child (temp highp int)\r
+0:272 'a3' (temp highp int)\r
+0:272 direct index (flat temp highp int SampleMaskIn)\r
+0:272 'gl_SampleMaskIn' (flat in 1-element array of highp int SampleMaskIn)\r
+0:272 Constant:\r
+0:272 0 (const int)\r
+0:273 move second child to first child (temp highp int)\r
+0:273 direct index (temp highp int SampleMaskIn)\r
+0:273 'gl_SampleMask' (out 1-element array of highp int SampleMaskIn)\r
+0:273 Constant:\r
+0:273 0 (const int)\r
+0:273 'a3' (temp highp int)\r
+0:274 Sequence\r
+0:274 move second child to first child (temp mediump int)\r
+0:274 'n1' (temp mediump int)\r
+0:274 Constant:\r
+0:274 4 (const int)\r
+0:275 Sequence\r
+0:275 move second child to first child (temp mediump int)\r
+0:275 'n2' (temp mediump int)\r
+0:275 'gl_NumSamples' (uniform lowp int)\r
0:? Linker Objects\r
0:? 'gl_FragCoord' (smooth in mediump 4-component vector of float)\r
0:? 'v3' (layout(location=2 ) smooth in mediump 3-component vector of float)\r
0:? 'CA5' (uniform highp samplerCubeArrayShadow)\r
0:? 'CA6' (uniform highp isamplerCubeArray)\r
0:? 'CA7' (uniform highp usamplerCubeArray)\r
+0:? 'gl_SampleMaskIn' (flat in 1-element array of highp int SampleMaskIn)\r
+0:? 'gl_SampleMask' (out 1-element array of highp int SampleMaskIn)\r
\r
" in vec2 gl_SamplePosition;"
"flat in int gl_SampleMaskIn[];"
" out int gl_SampleMask[];"
+ "uniform int gl_NumSamples;"
);
if (version >= 430)
} else {
// ES profile
- if (version == 100)
+ if (version == 100) {
stageBuiltins[EShLangFragment].append(
"mediump vec4 gl_FragCoord;" // needs qualifier fixed later
" bool gl_FrontFacing;" // needs qualifier fixed later
"mediump vec4 gl_FragColor;" // needs qualifier fixed later
"mediump vec2 gl_PointCoord;" // needs qualifier fixed later
);
- else if (version >= 300) {
+ }
+ if (version >= 300) {
stageBuiltins[EShLangFragment].append(
"highp vec4 gl_FragCoord;" // needs qualifier fixed later
" bool gl_FrontFacing;" // needs qualifier fixed later
"mediump vec2 gl_PointCoord;" // needs qualifier fixed later
"highp float gl_FragDepth;" // needs qualifier fixed later
);
- if (version >= 310)
- stageBuiltins[EShLangFragment].append(
- "bool gl_HelperInvocation;" // needs qualifier fixed later
- "flat in highp int gl_PrimitiveID;" // needs qualifier fixed later
- "flat in highp int gl_Layer;" // needs qualifier fixed later
- );
+ }
+ if (version >= 310) {
+ stageBuiltins[EShLangFragment].append(
+ "bool gl_HelperInvocation;" // needs qualifier fixed later
+ "flat in highp int gl_PrimitiveID;" // needs qualifier fixed later
+ "flat in highp int gl_Layer;" // needs qualifier fixed later
+ );
+
+ stageBuiltins[EShLangFragment].append( // GL_OES_sample_variables
+ "flat lowp in int gl_SampleID;"
+ " mediump in vec2 gl_SamplePosition;"
+ "flat highp in int gl_SampleMaskIn[];"
+ " highp out int gl_SampleMask[];"
+ "uniform lowp int gl_NumSamples;"
+ );
}
stageBuiltins[EShLangFragment].append(
"highp float gl_FragDepthEXT;" // GL_EXT_frag_depth
}
// GL_ARB_ES3_1_compatibility
- if (profile != EEsProfile && version >= 450) {
+ if ((profile != EEsProfile && version >= 450) ||
+ (profile == EEsProfile && version >= 310)) {
snprintf(builtInConstant, maxSize, "const int gl_MaxSamples = %d;", resources.maxSamples);
s.append(builtInConstant);
}
BuiltInVariable("gl_ClipDistance", EbvClipDistance, symbolTable);
BuiltInVariable("gl_CullDistance", EbvCullDistance, symbolTable);
BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable);
- BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable);
- BuiltInVariable("gl_SamplePosition", EbvSamplePosition, symbolTable);
- BuiltInVariable("gl_SampleMaskIn", EbvSampleMask, symbolTable);
- BuiltInVariable("gl_SampleMask", EbvSampleMask, symbolTable);
+
+ if ((profile != EEsProfile && version >= 400) ||
+ (profile == EEsProfile && version >= 310)) {
+ BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable);
+ BuiltInVariable("gl_SamplePosition", EbvSamplePosition, symbolTable);
+ BuiltInVariable("gl_SampleMaskIn", EbvSampleMask, symbolTable);
+ BuiltInVariable("gl_SampleMask", EbvSampleMask, symbolTable);
+ if (profile == EEsProfile) {
+ symbolTable.setVariableExtensions("gl_SampleID", 1, &E_GL_OES_sample_variables);
+ symbolTable.setVariableExtensions("gl_SamplePosition", 1, &E_GL_OES_sample_variables);
+ symbolTable.setVariableExtensions("gl_SampleMaskIn", 1, &E_GL_OES_sample_variables);
+ symbolTable.setVariableExtensions("gl_SampleMask", 1, &E_GL_OES_sample_variables);
+ symbolTable.setVariableExtensions("gl_NumSamples", 1, &E_GL_OES_sample_variables);
+ }
+ }
+
BuiltInVariable("gl_Layer", EbvLayer, symbolTable);
BuiltInVariable("gl_ViewportIndex", EbvViewportIndex, symbolTable);