summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/blorp/blorp_genX_exec.h56
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);