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 <emil.velikov@collabora.com>
This commit is contained in:
committed by
Emil Velikov
parent
80b62e2d6d
commit
1301674c39
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user