i965: Rename BRW_NEW_WM_SURFACES to BRW_NEW_SURFACES.
authorPaul Berry <stereotype441@gmail.com>
Thu, 22 Dec 2011 21:39:30 +0000 (13:39 -0800)
committerPaul Berry <stereotype441@gmail.com>
Fri, 23 Dec 2011 23:16:51 +0000 (15:16 -0800)
The surface states tracked by BRW_NEW_WM_SURFACES are no longer used
for just WM.  They are also used for vertex texturing and transform
feedback.  To avoid confusion, this patch renames BRW_NEW_WM_SURFACES
to BRW_NEW_SURFACES.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_state_upload.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c

index 15a781b93aebe48ebf638f9548ec953d3bd2febd..fb41fd1f04f4f215010d3c3bd93659986a2d00ef 100644 (file)
@@ -131,7 +131,7 @@ enum brw_state_id {
    BRW_STATE_CONTEXT,
    BRW_STATE_WM_INPUT_DIMENSIONS,
    BRW_STATE_PSP,
-   BRW_STATE_WM_SURFACES,
+   BRW_STATE_SURFACES,
    BRW_STATE_VS_BINDING_TABLE,
    BRW_STATE_GS_BINDING_TABLE,
    BRW_STATE_PS_BINDING_TABLE,
@@ -158,7 +158,7 @@ enum brw_state_id {
 #define BRW_NEW_CONTEXT                 (1 << BRW_STATE_CONTEXT)
 #define BRW_NEW_WM_INPUT_DIMENSIONS     (1 << BRW_STATE_WM_INPUT_DIMENSIONS)
 #define BRW_NEW_PSP                     (1 << BRW_STATE_PSP)
-#define BRW_NEW_WM_SURFACES            (1 << BRW_STATE_WM_SURFACES)
+#define BRW_NEW_SURFACES               (1 << BRW_STATE_SURFACES)
 #define BRW_NEW_VS_BINDING_TABLE       (1 << BRW_STATE_VS_BINDING_TABLE)
 #define BRW_NEW_GS_BINDING_TABLE       (1 << BRW_STATE_GS_BINDING_TABLE)
 #define BRW_NEW_PS_BINDING_TABLE       (1 << BRW_STATE_PS_BINDING_TABLE)
index 74d01d8b5f292a4e594c9944be7ec11b7d82d2dc..a8bda5a7d9899cd55c2f41b7bf80b500e035e48f 100644 (file)
@@ -360,7 +360,7 @@ static struct dirty_bit_map brw_bits[] = {
    DEFINE_BIT(BRW_NEW_WM_INPUT_DIMENSIONS),
    DEFINE_BIT(BRW_NEW_PROGRAM_CACHE),
    DEFINE_BIT(BRW_NEW_PSP),
-   DEFINE_BIT(BRW_NEW_WM_SURFACES),
+   DEFINE_BIT(BRW_NEW_SURFACES),
    DEFINE_BIT(BRW_NEW_INDICES),
    DEFINE_BIT(BRW_NEW_INDEX_BUFFER),
    DEFINE_BIT(BRW_NEW_VERTICES),
index 3801c096dda81515f7f9aadaae25cf6bc0d62504..e908430650e443fffe9d88c3622a11f11c9b0f2e 100644 (file)
@@ -828,7 +828,7 @@ brw_upload_wm_pull_constants(struct brw_context *brw)
         drm_intel_bo_unreference(brw->wm.const_bo);
         brw->wm.const_bo = NULL;
         brw->bind.surf_offset[surf_index] = 0;
-        brw->state.dirty.brw |= BRW_NEW_WM_SURFACES;
+        brw->state.dirty.brw |= BRW_NEW_SURFACES;
       }
       return;
    }
@@ -850,7 +850,7 @@ brw_upload_wm_pull_constants(struct brw_context *brw)
                                       params->NumParameters,
                                       &brw->bind.surf_offset[surf_index]);
 
-   brw->state.dirty.brw |= BRW_NEW_WM_SURFACES;
+   brw->state.dirty.brw |= BRW_NEW_SURFACES;
 }
 
 const struct brw_tracked_state brw_wm_pull_constants = {
@@ -1004,7 +1004,7 @@ brw_update_renderbuffer_surfaces(struct brw_context *brw)
    } else {
       intel->vtbl.update_null_renderbuffer_surface(brw, 0);
    }
-   brw->state.dirty.brw |= BRW_NEW_WM_SURFACES;
+   brw->state.dirty.brw |= BRW_NEW_SURFACES;
 }
 
 const struct brw_tracked_state brw_renderbuffer_surfaces = {
@@ -1046,7 +1046,7 @@ brw_update_texture_surfaces(struct brw_context *brw)
       }
    }
 
-   brw->state.dirty.brw |= BRW_NEW_WM_SURFACES;
+   brw->state.dirty.brw |= BRW_NEW_SURFACES;
 }
 
 const struct brw_tracked_state brw_texture_surfaces = {
@@ -1075,7 +1075,7 @@ brw_upload_binding_table(struct brw_context *brw)
                          sizeof(uint32_t) * BRW_MAX_SURFACES,
                          32, &brw->bind.bo_offset);
 
-   /* BRW_NEW_WM_SURFACES and BRW_NEW_VS_CONSTBUF */
+   /* BRW_NEW_SURFACES and BRW_NEW_VS_CONSTBUF */
    for (i = 0; i < BRW_MAX_SURFACES; i++) {
       bind[i] = brw->bind.surf_offset[i];
    }
@@ -1089,7 +1089,7 @@ const struct brw_tracked_state brw_binding_table = {
       .mesa = 0,
       .brw = (BRW_NEW_BATCH |
              BRW_NEW_VS_CONSTBUF |
-             BRW_NEW_WM_SURFACES),
+             BRW_NEW_SURFACES),
       .cache = 0
    },
    .emit = brw_upload_binding_table,