aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-11-29 02:55:01 +0100
committerMarek Olšák <[email protected]>2012-11-29 20:31:41 +0100
commit3e163a137be7f9a80ec720903c4bda028de5681f (patch)
treef227c113227d2440d700d66bb6fc9dc27d98b9b1 /src/gallium/state_trackers/dri
parent135fe907a016ec20b6779f6b3a657563e89c1081 (diff)
gallium/postprocess: share pipe_context and cso_context with the state tracker
Using one context instead of two is more efficient and we can skip another context flush. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r--src/gallium/state_trackers/dri/common/dri_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index 360174b056d..e77c43f140c 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -152,7 +152,9 @@ dri_create_context(gl_api api, const struct gl_config * visual,
// Context successfully created. See if post-processing is requested.
dri_pp_query(ctx);
- ctx->pp = pp_init(screen->base.screen, ctx->pp_enabled);
+ if (ctx->st->cso_context) {
+ ctx->pp = pp_init(ctx->st->pipe, ctx->pp_enabled, ctx->st->cso_context);
+ }
*error = __DRI_CTX_ERROR_SUCCESS;
return GL_TRUE;