Skip to content

Commit

Permalink
Merge vk-gl-cts/opengl-cts-4.6.2 into vk-gl-cts/opengl-cts-4.6.3
Browse files Browse the repository at this point in the history
Change-Id: I758c2e429518fd10eaabbbfdb5c875996a901f2a
  • Loading branch information
piby committed Apr 14, 2023
2 parents fb66a8e + ce6a083 commit ae2981f
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 41 deletions.
6 changes: 6 additions & 0 deletions external/openglcts/modules/gl/gl4cGPUShaderFP64Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6214,6 +6214,12 @@ void GPUShaderFP64Test4::initProgramObjects()
" tc_array[1].struct_dvec3.y * tc_array[1].struct_dvec4.z > 0.0)\n"
" {\n"
" gl_TessLevelInner[1] = 3.0;\n"
" gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n"
" }\n"
" else\n"
" {\n"
" gl_TessLevelInner[1] = 0.0;\n"
" gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position + vec4(1);\n"
" }\n"
"}\n";

Expand Down
40 changes: 25 additions & 15 deletions external/openglcts/modules/gl/gl4cIncompleteTextureAccessTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,16 @@ void SamplerTest::PrepareTexture(Configuration configuration)

gl.bindTexture(configuration.texture_target, m_to);
GLU_EXPECT_NO_ERROR(gl.getError(), "glBindTexture has failed");

if (configuration.is_shadow)
{
gl.texParameteri(configuration.texture_target, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE);
gl.texParameteri(configuration.texture_target, GL_TEXTURE_COMPARE_FUNC, GL_NEVER);
}
else
{
gl.texParameteri(configuration.texture_target, GL_TEXTURE_COMPARE_MODE, GL_NONE);
}
}

void SamplerTest::PrepareFramebuffer()
Expand Down Expand Up @@ -487,44 +497,44 @@ void SamplerTest::CleanTest()

const struct SamplerTest::Configuration SamplerTest::s_configurations[] = {
/* regular floating point sampling */
{ GL_TEXTURE_1D, "sampler1D", "texture(texture_input, 0.0)", { 0.f, 0.f, 0.f, 1.f } },
{ GL_TEXTURE_2D, "sampler2D", "texture(texture_input, vec2(0.0))", { 0.f, 0.f, 0.f, 1.f } },
{ GL_TEXTURE_3D, "sampler3D", "texture(texture_input, vec3(0.0))", { 0.f, 0.f, 0.f, 1.f } },
{ GL_TEXTURE_CUBE_MAP, "samplerCube", "texture(texture_input, vec3(0.0))", { 0.f, 0.f, 0.f, 1.f } },
{ GL_TEXTURE_RECTANGLE, "sampler2DRect", "texture(texture_input, vec2(0.0))", { 0.f, 0.f, 0.f, 1.f } },
{ GL_TEXTURE_1D_ARRAY, "sampler1DArray", "texture(texture_input, vec2(0.0))", { 0.f, 0.f, 0.f, 1.f } },
{ GL_TEXTURE_2D_ARRAY, "sampler2DArray", "texture(texture_input, vec3(0.0))", { 0.f, 0.f, 0.f, 1.f } },
{ GL_TEXTURE_CUBE_MAP_ARRAY, "samplerCubeArray", "texture(texture_input, vec4(0.0))", { 0.f, 0.f, 0.f, 1.f } },
{ GL_TEXTURE_1D, "sampler1D", "texture(texture_input, 0.0)", { 0.f, 0.f, 0.f, 1.f }, false },
{ GL_TEXTURE_2D, "sampler2D", "texture(texture_input, vec2(0.0))", { 0.f, 0.f, 0.f, 1.f }, false },
{ GL_TEXTURE_3D, "sampler3D", "texture(texture_input, vec3(0.0))", { 0.f, 0.f, 0.f, 1.f }, false },
{ GL_TEXTURE_CUBE_MAP, "samplerCube", "texture(texture_input, vec3(0.0))", { 0.f, 0.f, 0.f, 1.f }, false },
{ GL_TEXTURE_RECTANGLE, "sampler2DRect", "texture(texture_input, vec2(0.0))", { 0.f, 0.f, 0.f, 1.f }, false },
{ GL_TEXTURE_1D_ARRAY, "sampler1DArray", "texture(texture_input, vec2(0.0))", { 0.f, 0.f, 0.f, 1.f }, false },
{ GL_TEXTURE_2D_ARRAY, "sampler2DArray", "texture(texture_input, vec3(0.0))", { 0.f, 0.f, 0.f, 1.f }, false },
{ GL_TEXTURE_CUBE_MAP_ARRAY, "samplerCubeArray", "texture(texture_input, vec4(0.0))", { 0.f, 0.f, 0.f, 1.f }, false },

/* Shadow textures. */
{ GL_TEXTURE_1D,
"sampler1DShadow",
"vec4(texture(texture_input, vec3(0.0)), 0.0, 0.0, 0.0)",
{ 0.f, 0.f, 0.f, 0.f } },
{ 0.f, 0.f, 0.f, 0.f }, true },
{ GL_TEXTURE_2D,
"sampler2DShadow",
"vec4(texture(texture_input, vec3(0.0)), 0.0, 0.0, 0.0)",
{ 0.f, 0.f, 0.f, 0.f } },
{ 0.f, 0.f, 0.f, 0.f }, true },
{ GL_TEXTURE_CUBE_MAP,
"samplerCubeShadow",
"vec4(texture(texture_input, vec4(0.0)), 0.0, 0.0, 0.0)",
{ 0.f, 0.f, 0.f, 0.f } },
{ 0.f, 0.f, 0.f, 0.f }, true },
{ GL_TEXTURE_RECTANGLE,
"sampler2DRectShadow",
"vec4(texture(texture_input, vec3(0.0)), 0.0, 0.0, 0.0)",
{ 0.f, 0.f, 0.f, 0.f } },
{ 0.f, 0.f, 0.f, 0.f }, true },
{ GL_TEXTURE_1D_ARRAY,
"sampler1DArrayShadow",
"vec4(texture(texture_input, vec3(0.0)), 0.0, 0.0, 0.0)",
{ 0.f, 0.f, 0.f, 0.f } },
{ 0.f, 0.f, 0.f, 0.f }, true },
{ GL_TEXTURE_2D_ARRAY,
"sampler2DArrayShadow",
"vec4(texture(texture_input, vec4(0.0)), 0.0, 0.0, 0.0)",
{ 0.f, 0.f, 0.f, 0.f } },
{ 0.f, 0.f, 0.f, 0.f }, true },
{ GL_TEXTURE_CUBE_MAP_ARRAY,
"samplerCubeArrayShadow",
"vec4(texture(texture_input, vec4(0.0), 1.0), 0.0, 0.0, 0.0)",
{ 0.f, 0.f, 0.f, 0.f } }
{ 0.f, 0.f, 0.f, 0.f }, true }
};

const glw::GLuint SamplerTest::s_configurations_count = sizeof(s_configurations) / sizeof(s_configurations[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class SamplerTest : public deqp::TestCase
const glw::GLchar* sampler_template;
const glw::GLchar* fetch_template;
glw::GLfloat expected_result[4];
bool is_shadow;
} s_configurations[];

static const glw::GLuint s_configurations_count;
Expand Down
25 changes: 0 additions & 25 deletions modules/gles31/functional/es31fGeometryShaderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5338,31 +5338,6 @@ ReferencedByGeometryShaderCase::IterateResult ReferencedByGeometryShaderCase::it
<< glu::GeometrySource(specializeShader(geometrySource, m_context.getRenderContext().getType())));
m_testCtx.getLog() << program;

{
const tcu::ScopedLogSection section (m_testCtx.getLog(), "UnreferencedUniform", "Unreferenced uniform u_position");
glu::CallLogWrapper gl (m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
const deUint32 props[1] = { GL_REFERENCED_BY_GEOMETRY_SHADER };
deUint32 resourcePos;
glw::GLsizei length = 0;
glw::GLint referenced = 0;

gl.enableLogging(true);

resourcePos = gl.glGetProgramResourceIndex(program.getProgram(), GL_UNIFORM, "u_position");
m_testCtx.getLog() << tcu::TestLog::Message << "u_position resource index: " << resourcePos << tcu::TestLog::EndMessage;

gl.glGetProgramResourceiv(program.getProgram(), GL_UNIFORM, resourcePos, 1, props, 1, &length, &referenced);
m_testCtx.getLog() << tcu::TestLog::Message << "Query GL_REFERENCED_BY_GEOMETRY_SHADER, got " << length << " value(s), value[0] = " << glu::getBooleanStr(referenced) << tcu::TestLog::EndMessage;

GLU_EXPECT_NO_ERROR(gl.glGetError(), "query resource");

if (length == 0 || referenced != GL_FALSE)
{
m_testCtx.getLog() << tcu::TestLog::Message << "Error, expected GL_FALSE." << tcu::TestLog::EndMessage;
m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "got unexpected value");
}
}

{
const tcu::ScopedLogSection section (m_testCtx.getLog(), "ReferencedUniform", "Referenced uniform u_offset");
glu::CallLogWrapper gl (m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
Expand Down
3 changes: 2 additions & 1 deletion modules/gles31/functional/es31fNegativeTextureApiTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ void compressedteximage2d_invalid_size (NegativeTestContext& ctx)
ctx.glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, 1, 1, 0, divRoundUp(1, 4) * divRoundUp(1, 4) * 16 - 1, 0);
ctx.expectError(GL_INVALID_VALUE);

if (supportsES32orGL45(ctx))
if (contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)) ||
ctx.getContextInfo().isExtensionSupported("GL_KHR_texture_compression_astc_ldr"))
{
ctx.glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_ASTC_4x4, 1, 1, 0, divRoundUp(1, 4) * divRoundUp(1, 4) * 16 - 1, 0);
ctx.expectError(GL_INVALID_VALUE);
Expand Down

0 comments on commit ae2981f

Please sign in to comment.