Revert "i965: Don't compute brw->wm.input_size_masks when it's unused."
authorEric Anholt <eric@anholt.net>
Fri, 22 Jul 2011 22:48:53 +0000 (15:48 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 29 Jul 2011 19:17:03 +0000 (12:17 -0700)
This reverts commit 3412069e23b7fa5656262f3dd1aa86f66980594d.  We're
about to start using it in fragment shaders to handle avoiding
projection for fixed function.

src/mesa/drivers/dri/i965/brw_vs_constval.c

index 9fdfebe9f760de805b9c4b3183e216c6e421e2bc..47cc0a7da7a2c7c9ad9a8a4775001a5f378680db 100644 (file)
@@ -194,19 +194,11 @@ static void calc_wm_input_sizes( struct brw_context *brw )
    /* BRW_NEW_VERTEX_PROGRAM */
    const struct brw_vertex_program *vp =
       brw_vertex_program_const(brw->vertex_program);
-   /* BRW_NEW_FRAGMENT_PROGRAM */
-   struct gl_shader_program *prog = ctx->Shader.CurrentFragmentProgram;
    /* BRW_NEW_INPUT_DIMENSIONS */
    struct tracker t;
    GLuint insn;
    GLuint i;
 
-   /* If we're going to go through brw_fs.cpp, we don't end up using
-    * brw->wm.input_size_masks.
-    */
-   if (prog && prog->_LinkedShaders[MESA_SHADER_FRAGMENT])
-      return;
-
    memset(&t, 0, sizeof(t));
 
    /* _NEW_LIGHT */
@@ -246,9 +238,7 @@ static void calc_wm_input_sizes( struct brw_context *brw )
 const struct brw_tracked_state brw_wm_input_sizes = {
    .dirty = {
       .mesa  = _NEW_LIGHT,
-      .brw   = (BRW_NEW_FRAGMENT_PROGRAM |
-               BRW_NEW_VERTEX_PROGRAM |
-               BRW_NEW_INPUT_DIMENSIONS),
+      .brw   = BRW_NEW_VERTEX_PROGRAM | BRW_NEW_INPUT_DIMENSIONS,
       .cache = 0
    },
    .prepare = calc_wm_input_sizes