From c174ee9f9dc8ae29df3218e6b293ad309e6a9a86 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 27 Dec 2017 11:36:03 -0700 Subject: [PATCH] svga: move variant->fs_shadow_compare_units assignment Fixes a crash since the variant object isn't allocated until later in the function. Not sure how this got through. Reviewed-by: Charmaine Lee --- src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index aa07ee1ace9..b9aaeba0bb9 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -7107,6 +7107,8 @@ svga_tgsi_vgpu10_translate(struct svga_context *svga, variant->fs_shadow_compare_units = emit->fs.shadow_compare_units; + variant->fs_shadow_compare_units = emit->fs.shadow_compare_units; + if (tokens != shader->tokens) { tgsi_free_tokens(tokens); } -- 2.30.2