From a49ccf0fd25575c4e40398e5d22f3931e80921f8 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 6 Nov 2009 07:47:07 +0000 Subject: [PATCH] i965g: restore code to populate the relocation background I'm emitting this in two places now, to the data presented for upload and also in the delta field of the reloc struct. Probably want to remove the delta field and just pull the background from the key. --- src/gallium/drivers/i965/brw_clip_state.c | 1 + src/gallium/drivers/i965/brw_gs_state.c | 2 +- src/gallium/drivers/i965/brw_sf_state.c | 11 +++++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/i965/brw_clip_state.c b/src/gallium/drivers/i965/brw_clip_state.c index 3f2b9701e60..467364e8849 100644 --- a/src/gallium/drivers/i965/brw_clip_state.c +++ b/src/gallium/drivers/i965/brw_clip_state.c @@ -83,6 +83,7 @@ clip_unit_create_from_key(struct brw_context *brw, memset(&clip, 0, sizeof(clip)); + clip.thread0.grf_reg_count = align(key->total_grf, 16) / 16 - 1; /* reloc */ clip.thread0.kernel_start_pointer = 0; diff --git a/src/gallium/drivers/i965/brw_gs_state.c b/src/gallium/drivers/i965/brw_gs_state.c index 1b0de17aec1..b64ec286cea 100644 --- a/src/gallium/drivers/i965/brw_gs_state.c +++ b/src/gallium/drivers/i965/brw_gs_state.c @@ -82,7 +82,7 @@ gs_unit_create_from_key(struct brw_context *brw, memset(&gs, 0, sizeof(gs)); - /* maybe-reloc: populate the background */ + /* reloc */ gs.thread0.grf_reg_count = align(key->total_grf, 16) / 16 - 1; gs.thread0.kernel_start_pointer = 0; diff --git a/src/gallium/drivers/i965/brw_sf_state.c b/src/gallium/drivers/i965/brw_sf_state.c index a911482149c..e4126698446 100644 --- a/src/gallium/drivers/i965/brw_sf_state.c +++ b/src/gallium/drivers/i965/brw_sf_state.c @@ -142,8 +142,7 @@ sf_unit_create_from_key(struct brw_context *brw, int chipset_max_threads; memset(&sf, 0, sizeof(sf)); - - sf.thread0.grf_reg_count = 0; + sf.thread0.grf_reg_count = align(key->total_grf, 16) / 16 - 1; /* reloc */ sf.thread0.kernel_start_pointer = 0; @@ -179,10 +178,18 @@ sf_unit_create_from_key(struct brw_context *brw, /* CACHE_NEW_SF_VP */ /* reloc */ + sf.sf5.sf_viewport_state_offset = 0; + + sf.sf5.viewport_transform = 1; if (key->scissor) sf.sf6.scissor = 1; + if (key->front_face == PIPE_WINDING_CCW) + sf.sf5.front_winding = BRW_FRONTWINDING_CCW; + else + sf.sf5.front_winding = BRW_FRONTWINDING_CW; + switch (key->cull_mode) { case PIPE_WINDING_CCW: case PIPE_WINDING_CW: -- 2.30.2