summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-05 21:38:08 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-07-05 21:07:10 +0100
commit5fa3e73f2c03bcadb87c1760f76f853c22fdba18 (patch)
tree48e603fa3be1fe15654938b67af1519a62a10aa4
parentf749ed618e21b56a36a2feb9b4333ec797ec2ae5 (diff)
sna/gen[23]: Do as the comments suggest and prefer the BLT
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen2_render.c4
-rw-r--r--src/sna/gen3_render.c14
2 files changed, 5 insertions, 13 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index 97ae7c28..ccee6269 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -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,
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index ee8de2d8..4b59f40a 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -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,