gallium: remove redundant compare bit in sampler state
authorRoland Scheidegger <sroland@tungstengraphics.com>
Fri, 28 Mar 2008 14:43:00 +0000 (15:43 +0100)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Fri, 28 Mar 2008 14:43:00 +0000 (15:43 +0100)
src/gallium/drivers/i965simple/brw_wm.c
src/gallium/include/pipe/p_state.h
src/mesa/state_tracker/st_atom_sampler.c

index 1c4b5b5ede2b4bc26048ad2a22db41eae687a477..7fc5f59a98ca69c49b34787a567e1a4a52e5d41b 100644 (file)
@@ -161,8 +161,7 @@ static void brw_wm_populate_key( struct brw_context *brw,
 
       if (unit) {
 
-        if (unit->compare &&
-             unit->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {
+        if (unit->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {
            key->shadowtex_mask |= 1<<i;
         }
         if (t->Image[0][t->BaseLevel]->InternalFormat == GL_YCBCR_MESA)
index b47595deca405af5d80a31cda5c0e145ed571986..0eeee47a9a5429f8d9a9da80551c9e4c3a6da489 100644 (file)
@@ -243,7 +243,6 @@ struct pipe_sampler_state
    unsigned min_img_filter:2;    /**< PIPE_TEX_FILTER_x */
    unsigned min_mip_filter:2;    /**< PIPE_TEX_MIPFILTER_x */
    unsigned mag_img_filter:2;    /**< PIPE_TEX_FILTER_x */
-   unsigned compare:1;           /**< shadow/depth compare enabled? */
    unsigned compare_mode:1;      /**< PIPE_TEX_COMPARE_x */
    unsigned compare_func:3;      /**< PIPE_FUNC_x */
    unsigned normalized_coords:1; /**< Are coords normalized to [0,1]? */
index 5787a7492c6bbcbce2e5695b601ede727d68d683..5dd242ac6626aeca1c13e641c0b16d6035fa9750 100644 (file)
@@ -167,7 +167,6 @@ update_samplers(struct st_context *st)
 
          /* only care about ARB_shadow, not SGI shadow */
          if (texobj->CompareMode == GL_COMPARE_R_TO_TEXTURE) {
-            sampler->compare = 1;
             sampler->compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE;
             sampler->compare_func
                = st_compare_func_to_pipe(texobj->CompareFunc);