> +        /*
> +         * Note: the first call is here to lower RECT and TXP, the second one
> +         * to lower the TXS(lod) instructions generated by the RECT lowering
> +         * done in the first pass.
> +         *
> +         * FIXME: we should probably have a
> +         *
> +         *    do nir_lower_tex() while (progress)
> +         *
> +         * loop here, but it looks like nir_lower_tex() is not ready for that
> +         * (it keeps returning true and lowering the same instructions over 
> and
> +         * over again).
> +         */
> +        NIR_PASS(progress, nir, nir_lower_tex, &lower_tex_options);
> +        lower_tex_options.lower_rect = false;
> +        lower_tex_options.lower_txp = 0;
>          NIR_PASS(progress, nir, nir_lower_tex, &lower_tex_options);

Hmm, maybe we could just have a second indepedent lower_tex_options to
do just the lower_txs_lod lowering? No progress loop needed, no complex
explanation needed. It's a little strange, but it's okay :)

> +        case nir_texop_txs:
> +                emit_sysval_read(ctx, &instr->instr);
> +                return;

See op switch comment.

---

Everything later in the patch looks great!

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to