* buffer are valid.
*/
static void
-gen7_blorp_emit_disable_constant_state(struct brw_context *brw,
+gen7_blorp_disable_constant_state(struct brw_context *brw,
unsigned opcode)
{
BEGIN_BATCH(7);
ADVANCE_BATCH();
}
-void
-gen7_blorp_emit_constant_ps_disable(struct brw_context *brw)
-{
- BEGIN_BATCH(7);
- OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 | (7 - 2));
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- ADVANCE_BATCH();
-}
-
static void
gen7_blorp_emit_depth_stencil_config(struct brw_context *brw,
const struct brw_blorp_params *params)
gen7_blorp_emit_cc_state_pointer(brw, cc_state_offset);
}
- gen7_blorp_emit_disable_constant_state(brw, _3DSTATE_CONSTANT_VS);
- gen7_blorp_emit_disable_constant_state(brw, _3DSTATE_CONSTANT_HS);
- gen7_blorp_emit_disable_constant_state(brw, _3DSTATE_CONSTANT_DS);
- gen7_blorp_emit_disable_constant_state(brw, _3DSTATE_CONSTANT_GS);
+ gen7_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_VS);
+ gen7_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_HS);
+ gen7_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_DS);
+ gen7_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_GS);
+ gen7_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_PS);
depthstencil_offset = gen6_blorp_emit_depth_stencil_state(brw, params);
gen7_blorp_emit_depth_stencil_state_pointers(brw, depthstencil_offset);
if (params->wm_prog_data)
gen7_blorp_emit_binding_table_pointers_ps(brw, wm_bind_bo_offset);
- gen7_blorp_emit_constant_ps_disable(brw);
-
if (params->src.mt) {
const uint32_t sampler_offset =
gen6_blorp_emit_sampler_state(brw, BRW_MAPFILTER_LINEAR, 0, true);
* buffer are valid.
*/
static void
-gen8_blorp_emit_disable_constant_state(struct brw_context *brw,
+gen8_blorp_disable_constant_state(struct brw_context *brw,
unsigned opcode)
{
BEGIN_BATCH(11);
ADVANCE_BATCH();
}
-static void
-gen8_blorp_emit_disable_constant_ps(struct brw_context *brw)
-{
- const int dwords = brw->gen >= 8 ? 11 : 7;
- BEGIN_BATCH(dwords);
- OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 | (dwords - 2));
-
- if (brw->gen >= 9) {
- OUT_BATCH(0);
- OUT_BATCH(0);
- } else {
- OUT_BATCH(0);
- OUT_BATCH(0);
- }
-
- if (brw->gen >= 9) {
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- } else {
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- OUT_BATCH(0);
- }
-
- ADVANCE_BATCH();
-}
-
static uint32_t
gen8_blorp_emit_surface_states(struct brw_context *brw,
const struct brw_blorp_params *params)
const uint32_t cc_state_offset = gen6_blorp_emit_cc_state(brw);
gen7_blorp_emit_cc_state_pointer(brw, cc_state_offset);
- gen8_blorp_emit_disable_constant_state(brw, _3DSTATE_CONSTANT_VS);
- gen8_blorp_emit_disable_constant_state(brw, _3DSTATE_CONSTANT_HS);
- gen8_blorp_emit_disable_constant_state(brw, _3DSTATE_CONSTANT_DS);
- gen8_blorp_emit_disable_constant_state(brw, _3DSTATE_CONSTANT_GS);
+ gen8_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_VS);
+ gen8_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_HS);
+ gen8_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_DS);
+ gen8_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_GS);
+ gen8_blorp_disable_constant_state(brw, _3DSTATE_CONSTANT_PS);
- gen8_blorp_emit_disable_constant_ps(brw);
wm_bind_bo_offset = gen8_blorp_emit_surface_states(brw, params);
gen7_blorp_emit_binding_table_pointers_ps(brw, wm_bind_bo_offset);