Browse Source

i965: Fix sampling on Ivybridge after headerless change.

Fixes a regression since 90e922267a.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
tags/mesa-7.11-rc1
Kenneth Graunke 14 years ago
parent
commit
9be8524af7
1 changed files with 13 additions and 2 deletions
  1. 13
    2
      src/mesa/drivers/dri/i965/brw_fs.cpp

+ 13
- 2
src/mesa/drivers/dri/i965/brw_fs.cpp View File

fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate, fs_visitor::emit_texture_gen7(ir_texture *ir, fs_reg dst, fs_reg coordinate,
int sampler) int sampler)
{ {
int mlen = 1; /* g0 header always present. */
int base_mrf = 1;
int mlen = 0;
int base_mrf = 2;
int reg_width = c->dispatch_width / 8; int reg_width = c->dispatch_width / 8;
bool header_present = false;

if (ir->offset) {
/* The offsets set up by the ir_texture visitor are in the
* m1 header, so we can't go headerless.
*/
header_present = true;
mlen++;
base_mrf--;
}


if (ir->shadow_comparitor) { if (ir->shadow_comparitor) {
ir->shadow_comparitor->accept(this); ir->shadow_comparitor->accept(this);
} }
inst->base_mrf = base_mrf; inst->base_mrf = base_mrf;
inst->mlen = mlen; inst->mlen = mlen;
inst->header_present = header_present;


if (mlen > 11) { if (mlen > 11) {
fail("Message length >11 disallowed by hardware\n"); fail("Message length >11 disallowed by hardware\n");

Loading…
Cancel
Save