[Mesa-dev] [PATCH 2/4] i965/fs: Only read output_components many components when writing an output

Kristian Høgsberg krh at bitplanet.net
Tue Sep 15 10:42:39 PDT 2015


On Mon, Sep 14, 2015 at 4:35 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> Cc: Kristian Høgsberg <krh at bitplanet.net>

Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

> ---
>  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> index cea16e0..8b61c86 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> @@ -974,8 +974,10 @@ fs_visitor::emit_urb_writes()
>                 sources[length++] = reg;
>              }
>           } else {
> -            for (int i = 0; i < 4; i++)
> +            for (int i = 0; i < output_components[varying]; i++)
>                 sources[length++] = offset(this->outputs[varying], bld, i);
> +            for (int i = output_components[varying]; i < 4; i++)
> +               sources[length++] = fs_reg(0);
>           }
>           break;
>        }
> --
> 2.5.0.400.gff86faf
>


More information about the mesa-dev mailing list