summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-10-14 17:01:06 -0700
committerEric Anholt <[email protected]>2010-10-14 17:13:19 -0700
commit4b4284c9c9b472f750663352485290c22f8c3921 (patch)
tree82dcaaf1057ef9a3440ddbe9dea5b7766777fbff /src
parent3d7479d70568c84354338d0da0b7bed4d296c169 (diff)
i965: Fix texturing on pre-gen5.
I broke it in 06fd639c519214b6ebcbf29127b6d9ed429f8641 by only testing 2 generations of hardware :(
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index e372f3a13da..41cb9a3be43 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1043,7 +1043,7 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate)
*/
assert(ir->op == ir_txb || ir->op == ir_txl);
- for (int i = 0; i < ir->coordinate->type->vector_elements * 2;) {
+ for (int i = 0; i < ir->coordinate->type->vector_elements; i++) {
emit(fs_inst(BRW_OPCODE_MOV, fs_reg(MRF, base_mrf + mlen + i * 2),
coordinate));
coordinate.reg_offset++;
@@ -1993,17 +1993,17 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst)
*/
msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE;
if (inst->shadow_compare) {
- assert(inst->mlen == 5);
+ assert(inst->mlen == 6);
} else {
- assert(inst->mlen <= 6);
+ assert(inst->mlen <= 4);
}
break;
case FS_OPCODE_TXB:
if (inst->shadow_compare) {
- assert(inst->mlen == 5);
+ assert(inst->mlen == 6);
msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE;
} else {
- assert(inst->mlen == 8);
+ assert(inst->mlen == 9);
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
}