diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-12 11:13:59 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-12 11:54:52 +0000 |
commit | ed68f1b00ae7c0fb3be1f0e758b3683f3c26675b (patch) | |
tree | c9c9d224e8ea2e99443f0ad233bb491a999ef392 | |
parent | 991ffcb60a15f08ebb396d4d4ec86d5aff0ded31 (diff) |
sna/gen7: Fix PRIMITIVE command
The topology is now an extra dword rather than an embedded field in the
command.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen7_render.c | 10 | ||||
-rw-r--r-- | src/sna/gen7_render.h | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index d0bd5453..5fe25991 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -991,8 +991,7 @@ static void gen7_magic_ca_pass(struct sna *sna, OUT_BATCH(MI_FLUSH | MI_INHIBIT_RENDER_CACHE_FLUSH); OUT_BATCH(GEN7_3DPRIMITIVE | (7- 2)); - OUT_BATCH(GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL | - _3DPRIM_RECTLIST << GEN7_3DPRIMITIVE_TOPOLOGY_SHIFT); + OUT_BATCH(GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL | _3DPRIM_RECTLIST); OUT_BATCH(sna->render.vertex_index - sna->render.vertex_start); OUT_BATCH(sna->render.vertex_start); OUT_BATCH(1); /* single instance */ @@ -1540,11 +1539,8 @@ static void gen7_emit_primitive(struct sna *sna) return; } - OUT_BATCH(GEN7_3DPRIMITIVE | - GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL | - _3DPRIM_RECTLIST << GEN7_3DPRIMITIVE_TOPOLOGY_SHIFT | - 0 << 9 | - 4); + OUT_BATCH(GEN7_3DPRIMITIVE | (7- 2)); + OUT_BATCH(GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL | _3DPRIM_RECTLIST); sna->render_state.gen7.vertex_offset = sna->kgem.nbatch; OUT_BATCH(0); /* vertex count, to be filled in later */ OUT_BATCH(sna->render.vertex_index); diff --git a/src/sna/gen7_render.h b/src/sna/gen7_render.h index e5b12bb7..01482ec5 100644 --- a/src/sna/gen7_render.h +++ b/src/sna/gen7_render.h @@ -161,8 +161,6 @@ /* 3DPRIMITIVE bits */ #define GEN7_3DPRIMITIVE_VERTEX_SEQUENTIAL (0 << 15) #define GEN7_3DPRIMITIVE_VERTEX_RANDOM (1 << 15) -/* Primitive types are in gen7_defines.h */ -#define GEN7_3DPRIMITIVE_TOPOLOGY_SHIFT 10 #define GEN7_SVG_CTL 0x7400 |