diff options
author | Brian Paul <[email protected]> | 2017-12-27 11:05:52 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-12-27 11:34:51 -0700 |
commit | 3e59e442c3a668628bc780a6834059ed69afacb2 (patch) | |
tree | f1c9722ba5761a87d8bffbdcf75213428da11ed9 | |
parent | 3260a96c17a5738004cd7b126d934331b119c8ce (diff) |
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 <[email protected]>
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index 3e4a6eddb41..2f16935afd4 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -6550,8 +6550,6 @@ svga_tgsi_vgpu10_translate(struct svga_context *svga, } } - variant->fs_shadow_compare_units = emit->fs.shadow_compare_units; - if (SVGA_DEBUG & DEBUG_TGSI) { debug_printf("#####################################\n"); debug_printf("### TGSI Shader %u\n", shader->id); @@ -6666,6 +6664,8 @@ svga_tgsi_vgpu10_translate(struct svga_context *svga, */ variant->uses_flat_interp = emit->uses_flat_interp; + variant->fs_shadow_compare_units = emit->fs.shadow_compare_units; + if (tokens != shader->tokens) { tgsi_free_tokens(tokens); } |