[Mesa-dev] [PATCH mesa 1/6] tgsi_build: Fix return of uninitialized memory in tgsi_*_instruction_memory
Marek Olšák
maraeo at gmail.com
Wed Mar 16 09:52:13 UTC 2016
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Wed, Mar 16, 2016 at 10:23 AM, Hans de Goede <hdegoede at redhat.com> wrote:
> tgsi_default_instruction_memory / tgsi_build_instruction_memory were
> returning uninitialized memory for tgsi_instruction_memory.Texture and
> tgsi_instruction_memory.Format. Note 0 means not set, and thus is a
> correct default initializer for these.
>
> Fixes: 3243b6fc97 ("tgsi: add Texture and Format to tgsi_instruction_memory")
> Cc: Nicolai Hähnle <nicolai.haehnle at amd.com>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> src/gallium/auxiliary/tgsi/tgsi_build.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
> index a3e659b..7e30bb6 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_build.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
> @@ -781,6 +781,8 @@ tgsi_default_instruction_memory( void )
> struct tgsi_instruction_memory instruction_memory;
>
> instruction_memory.Qualifier = 0;
> + instruction_memory.Texture = 0;
> + instruction_memory.Format = 0;
> instruction_memory.Padding = 0;
>
> return instruction_memory;
> @@ -796,6 +798,8 @@ tgsi_build_instruction_memory(
> struct tgsi_instruction_memory instruction_memory;
>
> instruction_memory.Qualifier = qualifier;
> + instruction_memory.Texture = 0;
> + instruction_memory.Format = 0;
> instruction_memory.Padding = 0;
> instruction->Memory = 1;
>
> --
> 2.7.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