diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-10 12:42:12 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-10 13:24:46 +0100 |
commit | 79f8ff4bbb2f723ec21c150c0775e706bc00a834 (patch) | |
tree | 434644c84ee85bdb71396b17e02e3ae503ab9300 /src/sna/gen6_render.c | |
parent | 8bd9d63a863b88ecd6f72c11468e0940f3bcd9fc (diff) |
sna/gen4+: Share a few common routines
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r-- | src/sna/gen6_render.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index e456e6b7..f271cf81 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -43,6 +43,7 @@ #include "brw/brw.h" #include "gen6_render.h" #include "gen6_common.h" +#include "gen4_common.h" #include "gen4_source.h" #include "gen4_vertex.h" @@ -3481,6 +3482,9 @@ static void gen6_render_reset(struct sna *sna) sna->render_state.gen6.drawrect_limit = -1; sna->render_state.gen6.surface_table = -1; + assert(sna->render.vbo == NULL || + kgem_bo_is_mappable(&sna->kgem, sna->render.vbo)); + sna->render.vertex_offset = 0; sna->render.nvertex_reloc = 0; sna->render.vb_id = 0; @@ -3589,7 +3593,7 @@ const char *gen6_render_init(struct sna *sna, const char *backend) sna->kgem.context_switch = gen6_render_context_switch; sna->kgem.retire = gen6_render_retire; - sna->kgem.expire = gen6_render_expire; + sna->kgem.expire = gen4_render_expire; #if !NO_COMPOSITE sna->render.composite = gen6_render_composite; @@ -3624,7 +3628,7 @@ const char *gen6_render_init(struct sna *sna, const char *backend) sna->render.clear = gen6_render_clear; #endif - sna->render.flush = gen6_render_flush; + sna->render.flush = gen4_render_flush; sna->render.reset = gen6_render_reset; sna->render.fini = gen6_render_fini; |