[Mesa-dev] [PATCH] nv50/ir: fix SUSTx constraints on Kepler
Ilia Mirkin
imirkin at alum.mit.edu
Thu May 19 23:19:42 UTC 2016
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
I actually think this is wrong for SUSTB, but ... meh.
Also, since we know the format, we could avoid computing the colors
that aren't present in the image, but again ... meh.
On Thu, May 19, 2016 at 6:52 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> To prevent out-of-bounds access and format mismatch we add a predicate
> on sustp, but we have to account for it when the sources are condensed
> because a predicate is a source. Using the range 3:6 will only condense
> the input data and it's always the case. This also fixes constraints
> when an indirect access is used.
>
> This fixes a rendering issue in the realistic rendering demo from UE4.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> index b893996..f6277d8 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
> @@ -2126,9 +2126,7 @@ RegAlloc::InsertConstraintsPass::texConstraintNVE0(TexInstruction *tex)
> condenseDefs(tex);
>
> if (tex->op == OP_SUSTB || tex->op == OP_SUSTP) {
> - int n = tex->srcCount(0xff);
> - if (n > 4)
> - condenseSrcs(tex, 3, n - 1);
> + condenseSrcs(tex, 3, 6);
> } else
> if (isTextureOp(tex->op)) {
> int n = tex->srcCount(0xff, true);
> --
> 2.8.2
>
> _______________________________________________
> 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