OSDN Git Service

i965: Remove some old texturing debug code.
authorEric Anholt <eric@anholt.net>
Sat, 22 Oct 2011 19:03:36 +0000 (12:03 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 29 Oct 2011 19:17:15 +0000 (12:17 -0700)
It caught one possible bug I recall in my time working on the driver,
and we haven't been setting it for non-fixed-function since the new FS
backend came along.  The bug it caught was likely a confusion about
sampler mappings, which we have tests for these days.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_state_upload.c
src/mesa/drivers/dri/i965/brw_wm_fp.c

index d80ee1b..86bf94c 100644 (file)
@@ -227,9 +227,6 @@ struct brw_vertex_program {
 struct brw_fragment_program {
    struct gl_fragment_program program;
    GLuint id;  /**< serial no. to identify frag progs, never re-used */
-
-   /** for debugging, which texture units are referenced */
-   GLbitfield tex_units_used;
 };
 
 struct brw_shader {
index 4d95f78..3479dfc 100644 (file)
@@ -469,19 +469,6 @@ void brw_validate_state( struct brw_context *brw )
    }
 
    intel_check_front_buffer_rendering(intel);
-
-   /* Make sure that the textures which are referenced by the current
-    * brw fragment program are actually present/valid.
-    * If this fails, we can experience GPU lock-ups.
-    */
-   {
-      const struct brw_fragment_program *fp;
-      fp = brw_fragment_program_const(brw->fragment_program);
-      if (fp) {
-         assert((fp->tex_units_used & ctx->Texture._EnabledUnits)
-                == fp->tex_units_used);
-      }
-   }
 }
 
 
index 6c9a38e..ec2bf3c 100644 (file)
@@ -215,10 +215,6 @@ static struct prog_instruction * emit_tex_op(struct brw_wm_compile *c,
    assert(tex_src_target < NUM_TEXTURE_TARGETS ||
           tex_src_target == TEX_TARGET_NONE);
 
-   /* update mask of which texture units are referenced by this program */
-   if (tex_src_unit != TEX_UNIT_NONE)
-      c->fp->tex_units_used |= (1 << tex_src_unit);
-
    memset(inst, 0, sizeof(*inst));
 
    inst->Opcode = op;
@@ -1066,7 +1062,6 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
    }
    c->pixel_w = src_undef();
    c->nr_fp_insns = 0;
-   c->fp->tex_units_used = 0x0;
 
    /* Emit preamble instructions.  This is where special instructions such as
     * WM_CINTERP, WM_LINTERP, WM_PINTERP and WM_WPOSXY are emitted to