i965/gen4: Move unit state setup to emit() time.
authorEric Anholt <eric@anholt.net>
Sat, 22 Oct 2011 17:51:34 +0000 (10:51 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 29 Oct 2011 19:16:27 +0000 (12:16 -0700)
It is only needed in time for brw_psp_urb_cbs(), which is also an emit().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_clip_state.c
src/mesa/drivers/dri/i965/brw_gs_state.c
src/mesa/drivers/dri/i965/brw_sf_state.c
src/mesa/drivers/dri/i965/brw_state_upload.c
src/mesa/drivers/dri/i965/brw_vs_state.c
src/mesa/drivers/dri/i965/brw_wm_state.c

index 507b534..275a921 100644 (file)
@@ -34,7 +34,7 @@
 #include "brw_defines.h"
 
 static void
-brw_prepare_clip_unit(struct brw_context *brw)
+brw_upload_clip_unit(struct brw_context *brw)
 {
    struct intel_context *intel = &brw->intel;
    struct gl_context *ctx = &intel->ctx;
@@ -124,5 +124,5 @@ const struct brw_tracked_state brw_clip_unit = {
                BRW_NEW_URB_FENCE),
       .cache = CACHE_NEW_CLIP_PROG
    },
-   .prepare = brw_prepare_clip_unit,
+   .emit = brw_upload_clip_unit,
 };
index e0309e7..b284596 100644 (file)
@@ -36,7 +36,7 @@
 #include "brw_defines.h"
 
 static void
-brw_prepare_gs_unit(struct brw_context *brw)
+brw_upload_gs_unit(struct brw_context *brw)
 {
    struct intel_context *intel = &brw->intel;
    struct brw_gs_unit_state *gs;
@@ -95,5 +95,5 @@ const struct brw_tracked_state brw_gs_unit = {
                BRW_NEW_URB_FENCE),
       .cache = CACHE_NEW_GS_PROG
    },
-   .prepare = brw_prepare_gs_unit,
+   .emit = brw_upload_gs_unit,
 };
index a8f58d9..3b7a4db 100644 (file)
@@ -119,7 +119,7 @@ const struct brw_tracked_state brw_sf_vp = {
       .brw   = BRW_NEW_BATCH,
       .cache = 0
    },
-   .prepare = upload_sf_vp
+   .emit = upload_sf_vp
 };
 
 /**
@@ -324,5 +324,5 @@ const struct brw_tracked_state brw_sf_unit = {
       .cache = (CACHE_NEW_SF_VP |
                CACHE_NEW_SF_PROG)
    },
-   .prepare = upload_sf_unit,
+   .emit = upload_sf_unit,
 };
index 2737fee..4d95f78 100644 (file)
@@ -72,6 +72,7 @@ static const struct brw_tracked_state *gen4_atoms[] =
    &brw_wm_binding_table,
    &brw_wm_samplers,
 
+   /* These set up state for brw_psp_urb_cbs */
    &brw_wm_unit,
    &brw_sf_vp,
    &brw_sf_unit,
index f018fc6..5a9032c 100644 (file)
@@ -37,7 +37,7 @@
 #include "main/macros.h"
 
 static void
-brw_prepare_vs_unit(struct brw_context *brw)
+brw_upload_vs_unit(struct brw_context *brw)
 {
    struct intel_context *intel = &brw->intel;
    struct gl_context *ctx = &intel->ctx;
@@ -181,5 +181,5 @@ const struct brw_tracked_state brw_vs_unit = {
                 BRW_NEW_VERTEX_PROGRAM),
       .cache = CACHE_NEW_VS_PROG
    },
-   .prepare = brw_prepare_vs_unit,
+   .emit = brw_upload_vs_unit,
 };
index b66fb92..51ef745 100644 (file)
@@ -71,7 +71,7 @@ brw_color_buffer_write_enabled(struct brw_context *brw)
  * Setup wm hardware state.  See page 225 of Volume 2
  */
 static void
-brw_prepare_wm_unit(struct brw_context *brw)
+brw_upload_wm_unit(struct brw_context *brw)
 {
    struct intel_context *intel = &brw->intel;
    struct gl_context *ctx = &intel->ctx;
@@ -269,6 +269,6 @@ const struct brw_tracked_state brw_wm_unit = {
       .cache = (CACHE_NEW_WM_PROG |
                CACHE_NEW_SAMPLER)
    },
-   .prepare = brw_prepare_wm_unit,
+   .emit = brw_upload_wm_unit,
 };