[Mesa-dev] [PATCH 01/17] i965: Restore a lost comment about TXF offset bugs.

Chris Forbes chrisf at ijw.co.nz
Tue Oct 14 00:46:49 PDT 2014


I haven't tested to make sure this doesn't regress anything, but all
looks sensible.

For the series:

Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>

On Tue, Oct 14, 2014 at 5:54 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> 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 at whitecape.org>
> ---
>  src/mesa/drivers/dri/i965/brw_lower_unnormalized_offset.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
>
> 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 c95d7f3..8c59b9e 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);
> --
> 2.1.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list