From eae9674f187ea0f250723fef75d4f71bb3ba632e Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 7 Dec 2012 19:52:00 +0100 Subject: gallium: manage render condition in cso_context and fix postprocessing w/ it Reviewed-by: Brian Paul --- src/gallium/auxiliary/util/u_blit.c | 3 +++ src/gallium/auxiliary/util/u_gen_mipmap.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src/gallium/auxiliary/util') diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c index ab1549e2de6..9fe15b8108a 100644 --- a/src/gallium/auxiliary/util/u_blit.c +++ b/src/gallium/auxiliary/util/u_blit.c @@ -666,6 +666,7 @@ util_blit_pixels(struct blit_state *ctx, cso_save_geometry_shader(ctx->cso); cso_save_vertex_elements(ctx->cso); cso_save_aux_vertex_buffer_slot(ctx->cso); + cso_save_render_condition(ctx->cso); /* set misc state we care about */ if (writemask) @@ -677,6 +678,7 @@ util_blit_pixels(struct blit_state *ctx, cso_set_rasterizer(ctx->cso, &ctx->rasterizer); cso_set_vertex_elements(ctx->cso, 2, ctx->velem); cso_set_stream_outputs(ctx->cso, 0, NULL, 0); + cso_set_render_condition(ctx->cso, NULL, 0); /* default sampler state */ ctx->sampler.normalized_coords = normalized; @@ -799,6 +801,7 @@ util_blit_pixels(struct blit_state *ctx, cso_restore_vertex_elements(ctx->cso); cso_restore_aux_vertex_buffer_slot(ctx->cso); cso_restore_stream_outputs(ctx->cso); + cso_restore_render_condition(ctx->cso); pipe_sampler_view_reference(&sampler_view, NULL); if (dst_surface != dst) diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c index 48ebdb9fa3d..90588a022df 100644 --- a/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -1566,6 +1566,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx, cso_save_viewport(ctx->cso); cso_save_vertex_elements(ctx->cso); cso_save_aux_vertex_buffer_slot(ctx->cso); + cso_save_render_condition(ctx->cso); /* bind our state */ cso_set_blend(ctx->cso, is_depth ? &ctx->blend_keep_color : @@ -1576,6 +1577,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx, cso_set_sample_mask(ctx->cso, ~0); cso_set_vertex_elements(ctx->cso, 2, ctx->velem); cso_set_stream_outputs(ctx->cso, 0, NULL, 0); + cso_set_render_condition(ctx->cso, NULL, 0); set_fragment_shader(ctx, type, is_depth); set_vertex_shader(ctx); @@ -1699,4 +1701,5 @@ util_gen_mipmap(struct gen_mipmap_state *ctx, cso_restore_vertex_elements(ctx->cso); cso_restore_stream_outputs(ctx->cso); cso_restore_aux_vertex_buffer_slot(ctx->cso); + cso_restore_render_condition(ctx->cso); } -- cgit v1.2.3