sna/gen[23]: Do as the comments suggest and prefer the BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
f749ed618e
commit
5fa3e73f2c
|
|
@ -1922,7 +1922,7 @@ gen2_render_fill(struct sna *sna, uint8_t alu,
|
|||
#endif
|
||||
|
||||
/* Prefer to use the BLT if already engaged */
|
||||
if (!PREFER_FILL && sna->kgem.mode == KGEM_BLT &&
|
||||
if (!PREFER_FILL && sna->kgem.mode != KGEM_RENDER &&
|
||||
sna_blt_fill(sna, alu,
|
||||
dst_bo, dst->drawable.bitsPerPixel,
|
||||
color,
|
||||
|
|
@ -2186,7 +2186,7 @@ gen2_render_copy(struct sna *sna, uint8_t alu,
|
|||
#endif
|
||||
|
||||
/* Prefer to use the BLT */
|
||||
if (!PREFER_COPY && sna->kgem.mode == KGEM_BLT &&
|
||||
if (!PREFER_COPY && sna->kgem.mode != KGEM_RENDER &&
|
||||
sna_blt_compare_depth(&src->drawable, &dst->drawable) &&
|
||||
sna_blt_copy(sna, alu,
|
||||
src_bo, dst_bo,
|
||||
|
|
|
|||
|
|
@ -1082,17 +1082,12 @@ static void gen3_emit_invariant(struct sna *sna)
|
|||
CSB_TCB(6, 6) |
|
||||
CSB_TCB(7, 7));
|
||||
|
||||
OUT_BATCH(_3DSTATE_MODES_4_CMD |
|
||||
ENABLE_LOGIC_OP_FUNC |
|
||||
LOGIC_OP_FUNC(LOGICOP_COPY));
|
||||
|
||||
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(3) | I1_LOAD_S(4) | I1_LOAD_S(5) | 2);
|
||||
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(3) | I1_LOAD_S(4) | 1);
|
||||
OUT_BATCH(0x00000000); /* Disable texture coordinate wrap-shortest */
|
||||
OUT_BATCH((1 << S4_POINT_WIDTH_SHIFT) |
|
||||
S4_LINE_WIDTH_ONE |
|
||||
S4_CULLMODE_NONE |
|
||||
S4_VFMT_XY);
|
||||
OUT_BATCH(0x00000000); /* Stencil. */
|
||||
|
||||
OUT_BATCH(_3DSTATE_SCISSOR_ENABLE_CMD | DISABLE_SCISSOR_RECT);
|
||||
OUT_BATCH(_3DSTATE_DEPTH_SUBRECT_DISABLE);
|
||||
|
|
@ -1100,9 +1095,6 @@ static void gen3_emit_invariant(struct sna *sna)
|
|||
OUT_BATCH(_3DSTATE_LOAD_INDIRECT);
|
||||
OUT_BATCH(0x00000000);
|
||||
|
||||
OUT_BATCH(_3DSTATE_STIPPLE);
|
||||
OUT_BATCH(0x00000000);
|
||||
|
||||
sna->render_state.gen3.need_invariant = FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -3409,7 +3401,7 @@ gen3_render_copy(struct sna *sna, uint8_t alu,
|
|||
#endif
|
||||
|
||||
/* Prefer to use the BLT */
|
||||
if (sna->kgem.mode == KGEM_BLT &&
|
||||
if (sna->kgem.mode != KGEM_RENDER &&
|
||||
sna_blt_compare_depth(&src->drawable, &dst->drawable) &&
|
||||
sna_blt_copy(sna, alu,
|
||||
src_bo, dst_bo,
|
||||
|
|
@ -3633,7 +3625,7 @@ gen3_render_fill(struct sna *sna, uint8_t alu,
|
|||
#endif
|
||||
|
||||
/* Prefer to use the BLT if already engaged */
|
||||
if (sna->kgem.mode == KGEM_BLT &&
|
||||
if (sna->kgem.mode != KGEM_RENDER &&
|
||||
sna_blt_fill(sna, alu,
|
||||
dst_bo, dst->drawable.bitsPerPixel,
|
||||
color,
|
||||
|
|
|
|||
Loading…
Reference in New Issue