Open Daylight-Peng opened 1 year ago
Could you please help to have a check?
@pdaniell-nv
It sounds like the CTS code is designed for "core profile", which isn't available when the OpenGL version is less than 3.2. I think the solution would be to make modifications to the CTS at the points where there is a difference between core and compatibility, like the examples you listed above, and do the right thing based on the context profile. You can use the isContextTypeGLCompatibility() function to know when the compatibility profile is being used.
spec: https://registry.khronos.org/OpenGL/extensions/ARB/GLX_ARB_create_context.txt
For the OGL 3.0 and 3.1 context, if we want to use the "core profile", we need to config the "GLX_CONTEXT_FLAGS_ARB" to " GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB".
With below patch, I can get the 3.1 core profile and pass the CTS:
diff --git a/external/openglcts/modules/gl/gl3cTestPackages.hpp b/external/openglcts/modules/gl/gl3cTestPackages.hpp
index f1a3c255e..57db89447 100644
--- a/external/openglcts/modules/gl/gl3cTestPackages.hpp
+++ b/external/openglcts/modules/gl/gl3cTestPackages.hpp
@@ -53,7 +53,7 @@ class GL31TestPackage : public GL30TestPackage
public:
GL31TestPackage(tcu::TestContext& testCtx, const char* packageName,
const char* description = "OpenGL 3.1 Conformance Tests",
- glu::ContextType renderContextType = glu::ContextType(3, 1, glu::PROFILE_CORE));
+ glu::ContextType renderContextType = glu::ContextType(3, 1, glu::PROFILE_CORE,glu::CONTEXT_FORWARD_COMPATIBLE));
That change seems reasonable. Are you planning to create a push request?
That change seems reasonable. Are you planning to create a push request?
The PR: https://github.com/KhronosGroup/VK-GL-CTS/pull/385
Could you please help to review?
In "KHR-GL31.texture_size_promotion.functional" test case, it use "opengl 3.1 ctx + GLX_CONTEXT_PROFILE_MASK_ARB" to create core profile to test.
But from the spec https://registry.khronos.org/OpenGL/extensions/ARB/GLX_ARB_create_context.txt: If the requested OpenGL version is less than 3.2, GLX_CONTEXT_PROFILE_MASK_ARB is ignored
It may actually get the 3.1 compatibility ctx if the driver supports "GL_ARB_compatibility" extension. So it may meet below issue:
1) The "KHR-GL31.texture_size_promotion.functional" test case "GL_DEPTH* " relevent code test will fail:
2) The logic that causes the failure: from the spec https://registry.khronos.org/OpenGL/specs/gl/glspec31undep.pdf The initial state for depth and depth/stencil textures treats them as LUMINANCE textures except in a forward-compatible context, where the initial state instead treats them as RED textures.
The "KHR-GL31.texture_size_promotion.functional" test case "GL_DEPTH* " relevent code thinks the driver set GL_DEPTH_TEXTURE_MODE to GL_RED in core profile, but the driver actully set GL_DEPTH_TEXTURE_MODE to GL_LUMINANCE in compatibility profile.