[Mesa-dev] [RFC 12/24] nvc0/ir: fix constraints for OP_SUSTx on Kepler

Ilia Mirkin imirkin at alum.mit.edu
Wed Apr 13 20:31:04 UTC 2016


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Tue, Apr 12, 2016 at 7:57 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Destination type is actually always 32-bits, so typeSizeof() returns 4
> and no sources are condensed.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> index 500ab89..7e8bb17 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> @@ -2131,7 +2131,9 @@ RegAlloc::InsertConstraintsPass::texConstraintNVE0(TexInstruction *tex)
>     condenseDefs(tex);
>
>     if (tex->op == OP_SUSTB || tex->op == OP_SUSTP) {
> -      condenseSrcs(tex, 3, (3 + typeSizeof(tex->dType) / 4) - 1);
> +      int n = tex->srcCount(0xff);
> +      if (n > 4)
> +         condenseSrcs(tex, 3, n - 1);
>     } else
>     if (isTextureOp(tex->op)) {
>        int n = tex->srcCount(0xff, true);
> --
> 2.8.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list