[Mesa-dev] [PATCH] mesa/st/glsl_to_tgsi: fixup copy-paste mistake
Gert Wollny
gw.fossdev at gmail.com
Sun Aug 12 13:53:26 UTC 2018
Indeed, thanks for checking
Reviewed-By: Gert Wollny <gw.fossdev at gmail.com>
Am Sonntag, den 12.08.2018, 15:49 +0200 schrieb Erik Faye-Lund:
> This is clearly a copy-paste error; if we validate the reladdr2-
> pointer, we don't want to traverse to the reladdr-pointer. Especially
> since the check above shows that reladdr could be NULL here.
>
> Noticed by Coverity.
>
> CID: 1438389, 1438390
> Fixes: 568bda2f2d3 ("mesa/st/glsl_to_tgsi: Split arrays whose
> elements are only accessed directly")
> Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
> ---
> src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
> 1 file changed, 1 insertion(+), 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 a2083a4f85..2b9183abbb 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -5493,7 +5493,7 @@ void test_indirect_access(const st_reg& reg,
> bool *has_indirect_access)
> if (reg.reladdr)
> test_indirect_access(*reg.reladdr, has_indirect_access);
> if (reg.reladdr2)
> - test_indirect_access(*reg.reladdr, has_indirect_access);
> + test_indirect_access(*reg.reladdr2,
> has_indirect_access);
> }
> }
> }
More information about the mesa-dev
mailing list