summaryrefslogtreecommitdiff
path: root/src/sna/gen5_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-06-09 10:27:12 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-06-09 10:32:48 +0100
commit021209d5d3add8b28143611cfad4c5481a2945a3 (patch)
treef38ff7ea9ec9e616eed8fd06d56d8cbb4305276c /src/sna/gen5_render.c
parent6141b1aea159759e7e9dcf2561deb9d8c02bd0a2 (diff)
sna: Remove the stubs from sna_render.c
These only existed to work around an include order problem, when kgem was intended to be entirely separable from sna. Moving the function pointer into kgem simplifies matters. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen5_render.c')
-rw-r--r--src/sna/gen5_render.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index eea0dd04..c444b690 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -2537,16 +2537,16 @@ gen5_render_flush(struct sna *sna)
}
static void
-gen5_render_context_switch(struct sna *sna,
+gen5_render_context_switch(struct kgem *kgem,
int new_mode)
{
/* Ironlake has a limitation that a 3D or Media command can't
* be the first command after a BLT, unless it's
* non-pipelined.
*/
- if (sna->kgem.mode == KGEM_BLT) {
- OUT_BATCH(CMD_POLY_STIPPLE_OFFSET << 16);
- OUT_BATCH(0);
+ if (kgem->mode == KGEM_BLT) {
+ kgem->batch[kgem->nbatch++] = CMD_POLY_STIPPLE_OFFSET << 16;
+ kgem->batch[kgem->nbatch++] = 0;
}
}
@@ -2810,6 +2810,7 @@ Bool gen5_render_init(struct sna *sna)
return FALSE;
gen5_render_reset(sna);
+ sna->kgem.context_switch = gen5_render_context_switch;
sna->render.composite = gen5_render_composite;
sna->render.video = gen5_render_video;
@@ -2821,7 +2822,6 @@ Bool gen5_render_init(struct sna *sna)
sna->render.fill = gen5_render_fill;
sna->render.flush = gen5_render_flush;
- sna->render.context_switch = gen5_render_context_switch;
sna->render.reset = gen5_render_reset;
sna->render.fini = gen5_render_fini;