diff options
author | Jason Ekstrand <[email protected]> | 2017-05-11 19:12:46 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-05-26 07:58:01 -0700 |
commit | e80f0840bfd8a29dafd58584c4d4de26f24ad876 (patch) | |
tree | f66aff0a9fb9839fc5646cc5de576dd6bbc2b95f | |
parent | 3d35e5a51efa4ec2b8b384dd0e3942356cd2f77a (diff) |
intel/blorp: Pull the pipeline bits of blorp_exec into a helper
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r-- | src/intel/blorp/blorp_genX_exec.h | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index 9e61f69492e..0bb4b9aa2ff 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -1316,33 +1316,14 @@ blorp_emit_viewport_state(struct blorp_batch *batch, #endif } - -/** - * \brief Execute a blit or render pass operation. - * - * To execute the operation, this function manually constructs and emits a - * batch to draw a rectangle primitive. The batchbuffer is flushed before - * constructing and after emitting the batch. - * - * This function alters no GL state. - */ static void -blorp_exec(struct blorp_batch *batch, const struct blorp_params *params) +blorp_emit_pipeline(struct blorp_batch *batch, + const struct blorp_params *params) { uint32_t blend_state_offset = 0; - uint32_t color_calc_state_offset = 0; + uint32_t color_calc_state_offset; uint32_t depth_stencil_state_offset; -#if GEN_GEN >= 8 - if (params->hiz_op != BLORP_HIZ_OP_NONE) { - blorp_emit_gen8_hiz_op(batch, params); - return; - } -#endif - - blorp_emit_vertex_buffers(batch, params); - blorp_emit_vertex_elements(batch, params); - emit_urb_config(batch, params); if (params->wm_prog_data) { @@ -1351,7 +1332,7 @@ blorp_exec(struct blorp_batch *batch, const struct blorp_params *params) color_calc_state_offset = blorp_emit_color_calc_state(batch, params); depth_stencil_state_offset = blorp_emit_depth_stencil_state(batch, params); -#if GEN_GEN <= 6 +#if GEN_GEN == 6 /* 3DSTATE_CC_STATE_POINTERS * * The pointer offsets are relative to @@ -1385,8 +1366,6 @@ blorp_exec(struct blorp_batch *batch, const struct blorp_params *params) blorp_emit(batch, GENX(3DSTATE_CONSTANT_GS), gs); blorp_emit(batch, GENX(3DSTATE_CONSTANT_PS), ps); - blorp_emit_surface_states(batch, params); - if (params->src.enabled) blorp_emit_sampler_state(batch, params); @@ -1423,6 +1402,33 @@ blorp_exec(struct blorp_batch *batch, const struct blorp_params *params) blorp_emit_ps_config(batch, params); blorp_emit_viewport_state(batch, params); +} + +/** + * \brief Execute a blit or render pass operation. + * + * To execute the operation, this function manually constructs and emits a + * batch to draw a rectangle primitive. The batchbuffer is flushed before + * constructing and after emitting the batch. + * + * This function alters no GL state. + */ +static void +blorp_exec(struct blorp_batch *batch, const struct blorp_params *params) +{ +#if GEN_GEN >= 8 + if (params->hiz_op != BLORP_HIZ_OP_NONE) { + blorp_emit_gen8_hiz_op(batch, params); + return; + } +#endif + + blorp_emit_vertex_buffers(batch, params); + blorp_emit_vertex_elements(batch, params); + + blorp_emit_pipeline(batch, params); + + blorp_emit_surface_states(batch, params); if (!(batch->flags & BLORP_BATCH_NO_EMIT_DEPTH_STENCIL)) blorp_emit_depth_stencil_config(batch, params); |