On Fri, Jul 4, 2014 at 8:10 AM, Marek Olšák <[email protected]> wrote:
> From: Marek Olšák <[email protected]>
>
> It has 5 coordinates: (x,y,z,depth,lodbias)
>
> Cc: [email protected]

Reviewed-by: Ilia Mirkin <[email protected]>

Although I still haven't worked out what else is wrong with nouveau...
nv50 hits an assert, while nvc0 just generates wrong code. But it does
look like your patch is correct.

> ---
>  src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp 
> b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index 9e19431..65ef89c 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -2820,7 +2820,13 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
>        }
>        break;
>     case ir_txb:
> -      opcode = is_cube_array ? TGSI_OPCODE_TXB2 : TGSI_OPCODE_TXB;
> +      if (is_cube_array ||
> +          sampler_type == glsl_type::samplerCubeShadow_type) {
> +         opcode = TGSI_OPCODE_TXB2;
> +      }
> +      else {
> +         opcode = TGSI_OPCODE_TXB;
> +      }
>        ir->lod_info.bias->accept(this);
>        lod_info = this->result;
>        if (ir->offset) {
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to