[Mesa-dev] [PATCH] foo
Emil Velikov
emil.l.velikov at gmail.com
Tue Apr 24 17:46:46 UTC 2018
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
meson_options.txt | 2 +-
src/gallium/state_trackers/dri/dri_context.c | 13 ++++++++++---
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/meson_options.txt b/meson_options.txt
index a573290b77..d2fd440b37 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -238,7 +238,7 @@ option(
option(
'lmsensors',
type : 'combo',
- value : 'auto',
+ value : 'false',
choices : ['auto', 'true', 'false'],
description : 'Enable HUD lmsensors support.'
)
diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c
index fb307337a9..116372f7df 100644
--- a/src/gallium/state_trackers/dri/dri_context.c
+++ b/src/gallium/state_trackers/dri/dri_context.c
@@ -278,9 +278,16 @@ dri_make_current(__DRIcontext * cPriv,
++ctx->bind_count;
- if (!draw && !read)
- return ctx->stapi->make_current(ctx->stapi, ctx->st, NULL, NULL);
- else if (!draw || !read)
+ if (!draw && !read) {
+ if (!ctx->stapi->make_current(ctx->stapi, ctx->st, NULL, NULL))
+ return GL_FALSE;
+
+ ctx->dPriv = NULL;
+ ctx->rPriv = NULL;
+ return GL_TRUE;
+ }
+
+ if (!draw || !read)
return GL_FALSE;
if (ctx->dPriv != driDrawPriv) {
--
2.16.0
More information about the mesa-dev
mailing list