From 25dcce275df06a6db97d3b2d1485c61ef3a18b24 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Thu, 1 Jan 2015 21:47:41 -0800 Subject: [PATCH] i965: fix the so_decl_list initialization In i965: Also initialize the SO_DECL list, I didn't properly set up the null state. First of all, stream 0 isn't 1, it's 1. 1 -> 0 2 -> 1 4 -> 2 8 -> 3 But more importantly: Note: For "inactive" streams, software must program this field to all zero (no buffers written to) and the corresponding Num Entries field to zero (no valid SO_DECLs). --- src/mesa/drivers/dri/i965/gen7_sol_state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c index 5ee1ac0..8fe46a7 100644 --- a/src/mesa/drivers/dri/i965/gen7_sol_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c @@ -276,9 +276,9 @@ gen7_upload_null_decl_list(struct brw_context *brw) OUT_BATCH(_3DSTATE_SO_DECL_LIST << 16 | 1); OUT_BATCH((0 << SO_STREAM_TO_BUFFER_SELECTS_0_SHIFT) | - (1 << SO_STREAM_TO_BUFFER_SELECTS_1_SHIFT) | - (2 << SO_STREAM_TO_BUFFER_SELECTS_2_SHIFT) | - (3 << SO_STREAM_TO_BUFFER_SELECTS_3_SHIFT)); + (0 << SO_STREAM_TO_BUFFER_SELECTS_1_SHIFT) | + (0 << SO_STREAM_TO_BUFFER_SELECTS_2_SHIFT) | + (0 << SO_STREAM_TO_BUFFER_SELECTS_3_SHIFT)); OUT_BATCH((0 << SO_NUM_ENTRIES_0_SHIFT) | (0 << SO_NUM_ENTRIES_1_SHIFT) | -- 2.2.1