summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-03-06 15:03:16 +1100
committerTimothy Arceri <[email protected]>2017-03-07 08:16:39 +1100
commit696c5115b90804b779d033d4a2b0729c8e4aa400 (patch)
tree35081e76d8a11f309c4d0bf66f73e0cc95dc943d /src/gallium/state_trackers
parent2ab5eccf5de4a68d0d8d2668f6c5244cc6a41846 (diff)
st/dri: use local pointer to st_context_iface
Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index edcd0e68439..fd3b458de6c 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -443,6 +443,7 @@ dri_flush(__DRIcontext *cPriv,
{
struct dri_context *ctx = dri_context(cPriv);
struct dri_drawable *drawable = dri_drawable(dPriv);
+ struct st_context_iface *st;
unsigned flush_flags;
boolean swap_msaa_buffers = FALSE;
@@ -451,6 +452,8 @@ dri_flush(__DRIcontext *cPriv,
return;
}
+ st = ctx->st;
+
if (drawable) {
/* prevent recursion */
if (drawable->flushing)
@@ -465,12 +468,12 @@ dri_flush(__DRIcontext *cPriv,
/* Flush the drawable. */
if ((flags & __DRI2_FLUSH_DRAWABLE) &&
drawable->textures[ST_ATTACHMENT_BACK_LEFT]) {
- struct pipe_context *pipe = ctx->st->pipe;
+ struct pipe_context *pipe = st->pipe;
if (drawable->stvis.samples > 1 &&
reason == __DRI2_THROTTLE_SWAPBUFFER) {
/* Resolve the MSAA back buffer. */
- dri_pipe_blit(ctx->st->pipe,
+ dri_pipe_blit(st->pipe,
drawable->textures[ST_ATTACHMENT_BACK_LEFT],
drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]);
@@ -529,7 +532,7 @@ dri_flush(__DRIcontext *cPriv,
screen->fence_reference(screen, &fence, NULL);
}
- ctx->st->flush(ctx->st, flush_flags, &fence);
+ st->flush(st, flush_flags, &fence);
if (fence) {
swap_fences_push_back(drawable, fence);
@@ -537,7 +540,7 @@ dri_flush(__DRIcontext *cPriv,
}
}
else if (flags & (__DRI2_FLUSH_DRAWABLE | __DRI2_FLUSH_CONTEXT)) {
- ctx->st->flush(ctx->st, flush_flags, NULL);
+ st->flush(st, flush_flags, NULL);
}
if (drawable) {