diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2014-09-01 01:36:43 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2014-10-15 17:04:27 -0700 |
commit | a2c3cfbb4d9547f2faa44df4ca996095ce852b9e (patch) | |
tree | f5c1fcd3a2deb5207a5bcd1fb6578f2728814323 /src | |
parent | 652b8fbbbb0132c634c90e4d1fdbca9497b7cd94 (diff) |
i965: Restore a lost comment about TXF offset bugs.
Eric's original code to work around TXF offset bugs contained a comment
explaining the problem, which was lost when Chris generalized it to an
IR transformation (in commit 598ca510b8a118c3c7e18b5d031a2b116120e0a6).
This commit adds the original comment to the newer code.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp b/src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp index c95d7f3cac7..8c59b9e415b 100644 --- a/src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp +++ b/src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp @@ -66,6 +66,11 @@ brw_lower_unnormalized_offset_visitor::visit_leave(ir_texture *ir) void *mem_ctx = ralloc_parent(ir); if (ir->op == ir_txf) { + /* It appears that the ld instruction used for txf does its + * address bounds check before adding in the offset. To work + * around this, just add the integer offset to the integer texel + * coordinate, and don't put the offset in the header. + */ ir_variable *var = new(mem_ctx) ir_variable(ir->coordinate->type, "coordinate", ir_var_temporary); |