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 507b534dfd2557b88b79e9757792feacc2f5ade4..275a92163307fad9dbfda3023db420d13228df65 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 e0309e71fc3df27c6f593495f8e6956a514cc96b..b2845962175ce1f75ef659b9fe262a642e2facaa 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 a8f58d9d50e3306a54b49ab6717c37f1bef3f378..3b7a4db3ae42144042648df5bddbffa45c684f4b 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 2737feef89a9c7d00bc3d9b582c5ced4b646c114..4d95f7849ba09ffd8421691a868b651d827d221d 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 f018fc6691d32ec718cadb92eedd4ba8a763c1fd..5a9032caf4e65ffc03518778bbb85e203f1cd9c4 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 b66fb92e8f56f08647802406713664c3a611e9ae..51ef745b241fc7814f89b6311cdaec22feb78407 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,
 };