sourceStream.str(std::string());
- ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in tessellation evaluation shader");
- sourceStream << version
- << extensionPrim
- << extensionTess
- << "layout (triangles, equal_spacing, ccw) in;\n"
- << "void main()\n"
- << "{\n"
- << " " + builtInTypeName + "[0] = vec4(1.0, 1.0, 1.0, 1.0);\n"
- << " gl_Position = ( gl_TessCoord.x * " + builtInTypeName + "[0] +\n"
- << " gl_TessCoord.y * " + builtInTypeName + "[0] +\n"
- << " gl_TessCoord.z * " + builtInTypeName + "[0]);\n"
- << "}\n";
- verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_EVALUATION, sourceStream.str(), EXPECT_RESULT_FAIL);
- ctx.endSection();
+ if (ctx.isShaderSupported(glu::SHADERTYPE_TESSELLATION_EVALUATION))
+ {
+ ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in tessellation evaluation shader");
+ sourceStream << version
+ << extensionPrim
+ << extensionTess
+ << "layout (triangles, equal_spacing, ccw) in;\n"
+ << "void main()\n"
+ << "{\n"
+ << " " + builtInTypeName + "[0] = vec4(1.0, 1.0, 1.0, 1.0);\n"
+ << " gl_Position = ( gl_TessCoord.x * " + builtInTypeName + "[0] +\n"
+ << " gl_TessCoord.y * " + builtInTypeName + "[0] +\n"
+ << " gl_TessCoord.z * " + builtInTypeName + "[0]);\n"
+ << "}\n";
+ verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_EVALUATION, sourceStream.str(), EXPECT_RESULT_FAIL);
+ ctx.endSection();
- sourceStream.str(std::string());
+ sourceStream.str(std::string());
+ }
- ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in geometry shader");
- sourceStream << version
- << extensionPrim
- << "layout (triangles) in;\n"
- << "layout (triangle_strip, max_vertices = 3) out;\n"
- << "void main()\n"
- << "{\n"
- << " " + builtInTypeName + "[0] = vec4(1.0, 1.0, 1.0, 1.0);\n"
- << " for (int idx = 0; idx < 3; idx++)\n"
- << " {\n"
- << " gl_Position = gl_in[idx].gl_Position * " + builtInTypeName + "[0];\n"
- << " EmitVertex();\n"
- << " }\n"
- << " EndPrimitive();\n"
- << "}\n";
- verifyShader(ctx, glu::SHADERTYPE_GEOMETRY, sourceStream.str(), EXPECT_RESULT_FAIL);
- ctx.endSection();
+ if (ctx.isShaderSupported(glu::SHADERTYPE_GEOMETRY))
+ {
+ ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in geometry shader");
+ sourceStream << version
+ << extensionPrim
+ << "layout (triangles) in;\n"
+ << "layout (triangle_strip, max_vertices = 3) out;\n"
+ << "void main()\n"
+ << "{\n"
+ << " " + builtInTypeName + "[0] = vec4(1.0, 1.0, 1.0, 1.0);\n"
+ << " for (int idx = 0; idx < 3; idx++)\n"
+ << " {\n"
+ << " gl_Position = gl_in[idx].gl_Position * " + builtInTypeName + "[0];\n"
+ << " EmitVertex();\n"
+ << " }\n"
+ << " EndPrimitive();\n"
+ << "}\n";
+ verifyShader(ctx, glu::SHADERTYPE_GEOMETRY, sourceStream.str(), EXPECT_RESULT_FAIL);
+ ctx.endSection();
- sourceStream.str(std::string());
+ sourceStream.str(std::string());
+ }
ctx.beginSection("cannot access built-in type " + builtInTypeName + "[]" + " in fragment shader");
sourceStream << version
ctx.glTexImage3D (GL_TEXTURE_3D, 0, GL_RGBA, 4, 4, 4, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
ctx.glBindTexture (GL_TEXTURE_2D_ARRAY, textures[1]);
ctx.glTexImage3D (GL_TEXTURE_2D_ARRAY, 0, GL_RGBA, 4, 4, 4, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
- ctx.glBindTexture (GL_TEXTURE_CUBE_MAP_ARRAY, textures[2]);
- ctx.glTexImage3D (GL_TEXTURE_CUBE_MAP_ARRAY, 0, GL_RGBA, 4, 4, 6, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
ctx.expectError (GL_NO_ERROR);
ctx.beginSection("GL_INVALID_VALUE is generated if level is less than 0.");
if (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) || ctx.getContextInfo().isExtensionSupported("GL_OES_texture_cube_map_array"))
{
+ ctx.glBindTexture (GL_TEXTURE_CUBE_MAP_ARRAY, textures[2]);
+ ctx.glTexImage3D (GL_TEXTURE_CUBE_MAP_ARRAY, 0, GL_RGBA, 4, 4, 6, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
+ ctx.expectError (GL_NO_ERROR);
+
ctx.glTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, -1, 0, 0, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
ctx.expectError(GL_INVALID_VALUE);
}
ctx.glTexImage3D (GL_TEXTURE_3D, 0, GL_RGBA, 4, 4, 4, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
ctx.glBindTexture (GL_TEXTURE_2D_ARRAY, textures[1]);
ctx.glTexImage3D (GL_TEXTURE_2D_ARRAY, 0, GL_RGBA, 4, 4, 4, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
- ctx.glBindTexture (GL_TEXTURE_CUBE_MAP_ARRAY, textures[2]);
- ctx.glTexImage3D (GL_TEXTURE_CUBE_MAP_ARRAY, 0, GL_RGBA, 4, 4, 6, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
ctx.expectError (GL_NO_ERROR);
ctx.beginSection("GL_INVALID_VALUE is generated if xoffset, yoffset or zoffset are negative.");
if (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) || ctx.getContextInfo().isExtensionSupported("GL_OES_texture_cube_map_array"))
{
+ ctx.glBindTexture (GL_TEXTURE_CUBE_MAP_ARRAY, textures[2]);
+ ctx.glTexImage3D (GL_TEXTURE_CUBE_MAP_ARRAY, 0, GL_RGBA, 4, 4, 6, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
+ ctx.expectError (GL_NO_ERROR);
+
ctx.glTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, 0, -1, 0, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
ctx.expectError(GL_INVALID_VALUE);
ctx.glTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, 0, 0, -1, 0, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);