summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/postprocess
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-02-16 10:22:32 -0700
committerBrian Paul <brianp@vmware.com>2016-02-16 10:22:32 -0700
commit223ffd8a0899ddfdd084d3854ab28e2e2e438382 (patch)
tree09a1276dfe4d28459fdd135b9fb9e56daa61d978 /src/gallium/auxiliary/postprocess
parent70e8a4f734dff7afb2a0b1cd10813938343c6551 (diff)
downloadexternal_mesa3d-223ffd8a0899ddfdd084d3854ab28e2e2e438382.zip
external_mesa3d-223ffd8a0899ddfdd084d3854ab28e2e2e438382.tar.gz
external_mesa3d-223ffd8a0899ddfdd084d3854ab28e2e2e438382.tar.bz2
postprocess: use new cso_save/restore_state() functions
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/postprocess')
-rw-r--r--src/gallium/auxiliary/postprocess/pp_run.c58
1 files changed, 20 insertions, 38 deletions
diff --git a/src/gallium/auxiliary/postprocess/pp_run.c b/src/gallium/auxiliary/postprocess/pp_run.c
index c6c7b88..9dc8fb5 100644
--- a/src/gallium/auxiliary/postprocess/pp_run.c
+++ b/src/gallium/auxiliary/postprocess/pp_run.c
@@ -115,27 +115,27 @@ pp_run(struct pp_queue_t *ppq, struct pipe_resource *in,
}
/* save state (restored below) */
- cso_save_blend(cso);
- cso_save_depth_stencil_alpha(cso);
- cso_save_fragment_shader(cso);
- cso_save_framebuffer(cso);
- cso_save_tessctrl_shader(cso);
- cso_save_tesseval_shader(cso);
- cso_save_geometry_shader(cso);
- cso_save_rasterizer(cso);
- cso_save_sample_mask(cso);
- cso_save_min_samples(cso);
- cso_save_fragment_samplers(cso);
- cso_save_fragment_sampler_views(cso);
- cso_save_stencil_ref(cso);
- cso_save_stream_outputs(cso);
- cso_save_vertex_elements(cso);
- cso_save_vertex_shader(cso);
- cso_save_viewport(cso);
- cso_save_aux_vertex_buffer_slot(cso);
+ cso_save_state(cso, (CSO_BIT_BLEND |
+ CSO_BIT_DEPTH_STENCIL_ALPHA |
+ CSO_BIT_FRAGMENT_SHADER |
+ CSO_BIT_FRAMEBUFFER |
+ CSO_BIT_TESSCTRL_SHADER |
+ CSO_BIT_TESSEVAL_SHADER |
+ CSO_BIT_GEOMETRY_SHADER |
+ CSO_BIT_RASTERIZER |
+ CSO_BIT_SAMPLE_MASK |
+ CSO_BIT_MIN_SAMPLES |
+ CSO_BIT_FRAGMENT_SAMPLERS |
+ CSO_BIT_FRAGMENT_SAMPLER_VIEWS |
+ CSO_BIT_STENCIL_REF |
+ CSO_BIT_STREAM_OUTPUTS |
+ CSO_BIT_VERTEX_ELEMENTS |
+ CSO_BIT_VERTEX_SHADER |
+ CSO_BIT_VIEWPORT |
+ CSO_BIT_AUX_VERTEX_BUFFER_SLOT |
+ CSO_BIT_RENDER_CONDITION));
cso_save_constant_buffer_slot0(cso, PIPE_SHADER_VERTEX);
cso_save_constant_buffer_slot0(cso, PIPE_SHADER_FRAGMENT);
- cso_save_render_condition(cso);
/* set default state */
cso_set_sample_mask(cso, ~0);
@@ -186,27 +186,9 @@ pp_run(struct pp_queue_t *ppq, struct pipe_resource *in,
}
/* restore state we changed */
- cso_restore_blend(cso);
- cso_restore_depth_stencil_alpha(cso);
- cso_restore_fragment_shader(cso);
- cso_restore_framebuffer(cso);
- cso_restore_tessctrl_shader(cso);
- cso_restore_tesseval_shader(cso);
- cso_restore_geometry_shader(cso);
- cso_restore_rasterizer(cso);
- cso_restore_sample_mask(cso);
- cso_restore_min_samples(cso);
- cso_restore_fragment_samplers(cso);
- cso_restore_fragment_sampler_views(cso);
- cso_restore_stencil_ref(cso);
- cso_restore_stream_outputs(cso);
- cso_restore_vertex_elements(cso);
- cso_restore_vertex_shader(cso);
- cso_restore_viewport(cso);
- cso_restore_aux_vertex_buffer_slot(cso);
+ cso_restore_state(cso);
cso_restore_constant_buffer_slot0(cso, PIPE_SHADER_VERTEX);
cso_restore_constant_buffer_slot0(cso, PIPE_SHADER_FRAGMENT);
- cso_restore_render_condition(cso);
pipe_resource_reference(&ppq->depth, NULL);
pipe_resource_reference(&refin, NULL);