From: Brian Paul Date: Wed, 27 Dec 2017 18:36:03 +0000 (-0700) Subject: svga: move variant->fs_shadow_compare_units assignment X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c174ee9f9dc8ae29df3218e6b293ad309e6a9a86;p=mesa.git 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 --- 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); }