summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Gomez <[email protected]>2018-03-02 15:25:32 +0200
committerJuan A. Suarez Romero <[email protected]>2018-04-12 21:49:31 +0200
commit7711ae298777b3f1f95dd96fa7f9dffc10f95c1b (patch)
tree83fc8945dd00dc1b6236fba57a0a4ae3f33165d8
parent5f4009079cd31cfeac5fbb2b30b2a3197797437f (diff)
dri_util: when overriding, always reset the core version
This way we won't fail when validating just because we may have a non overriden core version that is lower than the requested one, even when the compat version is high enough. For example, running glcts from VK-GL-CTS with i965, this will succeed: $ MESA_GL_VERSION_OVERRIDE=4.6 ./glcts --deqp-case=KHR-GL46.info.vendor While, this will fail: $ MESA_GL_VERSION_OVERRIDE=4.6COMPAT ./glcts --deqp-case=KHR-GL46.info.vendor Fixes: 464c56d3d5c ("dri_util: Use _mesa_override_gl_version_contextless") Cc: Ian Romanick <[email protected]> Cc: Tapani Pälli <[email protected]> Cc: Marek Olšák <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> (cherry picked from commit 044acd3569cbe689712be3c35544ceb7da4e5347)
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index e6a7d2391a7..645a88685cf 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -164,11 +164,9 @@ driCreateNewScreen2(int scrn, int fd,
api = API_OPENGL_COMPAT;
if (_mesa_override_gl_version_contextless(&consts, &api, &version)) {
- if (api == API_OPENGL_CORE) {
- psp->max_gl_core_version = version;
- } else {
+ psp->max_gl_core_version = version;
+ if (api == API_OPENGL_COMPAT)
psp->max_gl_compat_version = version;
- }
}
psp->api_mask = 0;