i965: fold offset into coord for textureOffset(gsampler2DRect)
The hardware is broken with nonzero texel offsets and unnormalized coordinates; instead of doing correct offsetting, we get garbage. This just extends the existing workaround for ir_txf and ir_tg4+gsampler2DRect to also consider ir_tex+gsampler2DRect. Fixes broken rendering in 'tesseract' when 'mesa_texrectoffset_bug' is not enabled; also fixes the new piglit test 'tests/spec/glsl-1.30/execution/fs-textureOffset-Rect'. Has been broken ~forever; suggesting including this in only 10.0 because the lowering pass doesn't exist in 9.2 or earlier so would require quite a different patch. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: Lee Salzman <lsalzman@gmail.com> Cc: "10.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
31ec2f8338
commit
9e99735f30
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ brw_lower_unnormalized_offset_visitor::visit_leave(ir_texture *ir)
|
|||
if (!ir->offset)
|
||||
return visit_continue;
|
||||
|
||||
if (ir->op == ir_tg4) {
|
||||
if (ir->op == ir_tg4 || ir->op == ir_tex) {
|
||||
if (ir->sampler->type->sampler_dimensionality != GLSL_SAMPLER_DIM_RECT)
|
||||
return visit_continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue