summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-09-27 23:26:33 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-27 23:26:33 +0100
commit6395894ada6b9c14deb62814ccf55848eaa80527 (patch)
tree4f171a3b1238a249a4ccc68858b20c2b4eca043d /src/sna
parenta53538659d5e18cb5a7a7a7dbd460f35985183fd (diff)
sna/gen7: Fix up a couple instances of my inability to count
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/gen7_render.c7
-rw-r--r--src/sna/gen7_render.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index a7bfc81f..eb777b3a 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -626,7 +626,7 @@ gen7_disable_streamout(struct sna *sna)
static void
gen7_emit_sf_invariant(struct sna *sna)
{
- OUT_BATCH(GEN7_3DSTATE_SF | (7 - 2));
+ OUT_BATCH(GEN7_3DSTATE_SF | (6 - 2));
OUT_BATCH(0);
OUT_BATCH(GEN7_3DSTATE_SF_CULL_NONE);
OUT_BATCH(2 << GEN7_3DSTATE_SF_TRIFAN_PROVOKE_SHIFT);
@@ -666,11 +666,12 @@ gen7_disable_clip(struct sna *sna)
static void
gen7_emit_wm_invariant(struct sna *sna)
{
- OUT_BATCH(GEN7_3DSTATE_WM | (3 - 2));
+ OUT_BATCH(GEN7_3DSTATE_WM | (2 - 2));
OUT_BATCH(GEN7_WM_DISPATCH_ENABLE |
GEN7_WM_PERSPECTIVE_PIXEL_BARYCENTRIC);
OUT_BATCH(0);
+ /* XXX length bias of 7 in old spec? */
OUT_BATCH(GEN7_3DSTATE_CONSTANT_PS | (7 - 2));
OUT_BATCH(0);
OUT_BATCH(0);
@@ -702,7 +703,7 @@ gen7_emit_invariant(struct sna *sna)
{
OUT_BATCH(GEN7_PIPELINE_SELECT | PIPELINE_SELECT_3D);
- OUT_BATCH(GEN7_3DSTATE_MULTISAMPLE | (4 - 2));
+ OUT_BATCH(GEN7_3DSTATE_MULTISAMPLE | (3 - 2));
OUT_BATCH(GEN7_3DSTATE_MULTISAMPLE_PIXEL_LOCATION_CENTER |
GEN7_3DSTATE_MULTISAMPLE_NUMSAMPLES_1); /* 1 sample/pixel */
OUT_BATCH(0);
diff --git a/src/sna/gen7_render.h b/src/sna/gen7_render.h
index 684c20a7..e5b12bb7 100644
--- a/src/sna/gen7_render.h
+++ b/src/sna/gen7_render.h
@@ -145,7 +145,7 @@
#define GEN7_VB0_VERTEXDATA (0 << 20)
#define GEN7_VB0_INSTANCEDATA (1 << 20)
#define GEN7_VB0_BUFFER_PITCH_SHIFT 0
-#define GEN7_VB0_ADDRESS_MODIFY_ENABLE (1 < 14)
+#define GEN7_VB0_ADDRESS_MODIFY_ENABLE (1 << 14)
/* VERTEX_ELEMENT_STATE Structure */
#define GEN7_VE0_VERTEX_BUFFER_INDEX_SHIFT 26