[Mesa-dev] [PATCH 2/4] i965: Remove now dead brw_wm_prog_key::proj_attrib_mask field.

Kenneth Graunke kenneth at whitecape.org
Tue Mar 12 22:19:43 PDT 2013


The previous commit removed the last user of this field, so there's no
longer any point in setting it.  Removing this should eliminate
state-dependent recompiles, and make the precompile more reliable.

Cc: Eric Anholt <eric at anholt.net>
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_fs.cpp |  6 ------
 src/mesa/drivers/dri/i965/brw_wm.c   | 11 -----------
 src/mesa/drivers/dri/i965/brw_wm.h   |  2 --
 3 files changed, 19 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 5cc5053..4bcc3a5 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2981,9 +2981,6 @@ brw_fs_precompile(struct gl_context *ctx, struct gl_shader_program *prog)
       key.iz_lookup |= IZ_DEPTH_WRITE_ENABLE_BIT;
    }
 
-   if (prog->Name != 0)
-      key.proj_attrib_mask = 0xffffffff;
-
    if (intel->gen < 6)
       key.vp_outputs_written |= BITFIELD64_BIT(FRAG_ATTRIB_WPOS);
 
@@ -2991,9 +2988,6 @@ brw_fs_precompile(struct gl_context *ctx, struct gl_shader_program *prog)
       if (!(fp->Base.InputsRead & BITFIELD64_BIT(i)))
 	 continue;
 
-      if (prog->Name == 0)
-         key.proj_attrib_mask |= 1 << i;
-
       if (intel->gen < 6) {
          int vp_index = _mesa_vert_result_to_frag_attrib((gl_vert_result) i);
 
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 77bede0..6b2b6c7 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -285,8 +285,6 @@ brw_wm_debug_recompile(struct brw_context *brw,
                       old_key->clamp_fragment_color, key->clamp_fragment_color);
    found |= key_debug(intel, "line smoothing",
                       old_key->line_aa, key->line_aa);
-   found |= key_debug(intel, "proj_attrib_mask",
-                      old_key->proj_attrib_mask, key->proj_attrib_mask);
    found |= key_debug(intel, "renderbuffer height",
                       old_key->drawable_height, key->drawable_height);
    found |= key_debug(intel, "vertex shader outputs",
@@ -423,15 +421,6 @@ static void brw_wm_populate_key( struct brw_context *brw,
    if (intel->gen < 6)
       key->stats_wm = brw->intel.stats_wm;
 
-   /* BRW_NEW_WM_INPUT_DIMENSIONS */
-   /* Only set this for fixed function.  The optimization it enables isn't
-    * useful for programs using shaders.
-    */
-   if (ctx->Shader.CurrentFragmentProgram)
-      key->proj_attrib_mask = 0xffffffff;
-   else
-      key->proj_attrib_mask = brw->wm.input_size_masks[4-1];
-
    /* _NEW_LIGHT */
    key->flat_shade = (ctx->Light.ShadeModel == GL_FLAT);
 
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index a4ac3f1..0f084b1 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -67,8 +67,6 @@ struct brw_wm_prog_key {
    GLuint clamp_fragment_color:1;
    GLuint line_aa:2;
 
-   GLbitfield proj_attrib_mask; /**< one bit per fragment program attribute */
-
    GLushort drawable_height;
    GLbitfield64 vp_outputs_written;
    GLuint program_string_id:32;
-- 
1.8.1.5



More information about the mesa-dev mailing list