[Mesa-dev] [PATCH 01/13] i965/fs: don't use ir->shadow_comparitor in emit_texture_*
Connor Abbott
cwabbott0 at gmail.com
Mon Aug 4 14:28:05 PDT 2014
Signed-off-by: Connor Abbott <connor.abbott at intel.com>
---
src/mesa/drivers/dri/i965/brw_fs_fp.cpp | 4 +---
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 8 ++++----
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_fp.cpp b/src/mesa/drivers/dri/i965/brw_fs_fp.cpp
index 0c5daa7..80075dd6 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_fp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_fp.cpp
@@ -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,
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 3b03eef..d25e9aa 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -1105,7 +1105,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++;
@@ -1302,7 +1302,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));
@@ -1431,7 +1431,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++;
}
@@ -1526,7 +1526,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 */
--
1.9.3
More information about the mesa-dev
mailing list