i965/fs: don't use ir->shadow_comparitor in emit_texture_*
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 4 Aug 2014 22:20:37 +0000 (15:20 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 1 Sep 2014 07:55:14 +0000 (00:55 -0700)
Signed-off-by: Connor Abbott <connor.abbott@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_fp.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

index c82bd9b76aceecb5e96e2e9a608acdfaf1c35828..4db3f1697e7514b57e387261f492c6426f5f77d4 100644 (file)
@@ -480,10 +480,8 @@ fs_visitor::emit_fragment_program_code()
          ir_constant_data junk_data;
          ir->coordinate = new(mem_ctx) ir_constant(coordinate_type, &junk_data);
 
-         if (fpi->TexShadow) {
+         if (fpi->TexShadow)
             shadow_c = offset(coordinate, 2);
-            ir->shadow_comparitor = new(mem_ctx) ir_constant(0.0f);
-         }
 
          coordinate = rescale_texcoord(ir, coordinate,
                                        fpi->TexSrcTarget == TEXTURE_RECT_INDEX,
index a6b0aefd1002ebdb82d9108e50bea612cf2cf4e3..2fa90a484a5eae66768d752ed6bdce23500d69b6 100644 (file)
@@ -1149,7 +1149,7 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate,
    /* g0 header. */
    mlen = 1;
 
-   if (ir->shadow_comparitor) {
+   if (shadow_c.file != BAD_FILE) {
       for (int i = 0; i < ir->coordinate->type->vector_elements; i++) {
         emit(MOV(fs_reg(MRF, base_mrf + mlen + i), coordinate));
         coordinate.reg_offset++;
@@ -1337,7 +1337,7 @@ fs_visitor::emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate,
    }
    mlen += vector_elements * reg_width;
 
-   if (ir->shadow_comparitor) {
+   if (shadow_c.file != BAD_FILE) {
       mlen = MAX2(mlen, header_present + 4 * reg_width);
 
       emit(MOV(fs_reg(MRF, base_mrf + mlen), shadow_c));
@@ -1481,7 +1481,7 @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate,
       length++;
    }
 
-   if (ir->shadow_comparitor) {
+   if (shadow_c.file != BAD_FILE) {
       emit(MOV(sources[length], shadow_c));
       length++;
    }
@@ -1576,7 +1576,7 @@ fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate,
       break;
    case ir_tg4:
       if (has_nonconstant_offset) {
-         if (ir->shadow_comparitor)
+         if (shadow_c.file != BAD_FILE)
             no16("Gen7 does not support gather4_po_c in SIMD16 mode.");
 
          /* More crazy intermixing */