aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2018-08-24 14:06:00 +0100
committerEmil Velikov <[email protected]>2018-10-03 13:38:05 +0100
commit1301674c393671b407eab30aa66bdea6977b1ac8 (patch)
treecfd473c886779fb1cd0fc9d8aa6aa05564f599dd /src/gallium/state_trackers
parent80b62e2d6d2559a2c3f76e4ac06b9386a576d0e3 (diff)
st/dri: make swrast_no_present member of dri_screen
Just like the dri2 options, this is better suited in the dri_screen struct. Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.h2
-rw-r--r--src/gallium/state_trackers/dri/drisw.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/dri/dri_screen.h b/src/gallium/state_trackers/dri/dri_screen.h
index e410aa9c2f2..8d2d9c02892 100644
--- a/src/gallium/state_trackers/dri/dri_screen.h
+++ b/src/gallium/state_trackers/dri/dri_screen.h
@@ -78,6 +78,8 @@ struct dri_screen
boolean has_reset_status_query;
enum pipe_texture_target target;
+ boolean swrast_no_present;
+
/* hooks filled in by dri2 & drisw */
__DRIimage * (*lookup_egl_image)(struct dri_screen *ctx, void *handle);
diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c
index e24fcba3869..1fba71bdd97 100644
--- a/src/gallium/state_trackers/dri/drisw.c
+++ b/src/gallium/state_trackers/dri/drisw.c
@@ -42,7 +42,6 @@
#include "dri_query_renderer.h"
DEBUG_GET_ONCE_BOOL_OPTION(swrast_no_present, "SWRAST_NO_PRESENT", FALSE);
-static boolean swrast_no_present = FALSE;
static inline void
get_drawable_info(__DRIdrawable *dPriv, int *x, int *y, int *w, int *h)
@@ -195,7 +194,7 @@ drisw_present_texture(__DRIdrawable *dPriv,
struct dri_drawable *drawable = dri_drawable(dPriv);
struct dri_screen *screen = dri_screen(drawable->sPriv);
- if (swrast_no_present)
+ if (screen->swrast_no_present)
return;
screen->base.screen->flush_frontbuffer(screen->base.screen, ptex, 0, 0, drawable, sub_box);
@@ -338,7 +337,7 @@ drisw_allocate_textures(struct dri_context *stctx,
dri_drawable_get_format(drawable, statts[i], &format, &bind);
/* if we don't do any present, no need for display targets */
- if (statts[i] != ST_ATTACHMENT_DEPTH_STENCIL && !swrast_no_present)
+ if (statts[i] != ST_ATTACHMENT_DEPTH_STENCIL && !screen->swrast_no_present)
bind |= PIPE_BIND_DISPLAY_TARGET;
if (format == PIPE_FORMAT_NONE)
@@ -443,7 +442,7 @@ drisw_init_screen(__DRIscreen * sPriv)
screen->sPriv = sPriv;
screen->fd = -1;
- swrast_no_present = debug_get_option_swrast_no_present();
+ screen->swrast_no_present = debug_get_option_swrast_no_present();
sPriv->driverPrivate = (void *)screen;
sPriv->extensions = drisw_screen_extensions;