diff options
author | Philip Rebohle <philip.rebohle@tu-dortmund.de> | 2019-10-24 20:28:12 +0300 |
---|---|---|
committer | Alexandre Julliard <julliard@winehq.org> | 2019-10-27 21:17:19 +0300 |
commit | 04ec461fb4224e126d271760123bb6d756c06582 (patch) | |
tree | 22bf0ef9a5e597e484f17b04dcb0e222c9020c26 | |
parent | fd4488c3ab9ac3ae13bcf778d56b35e804b8d8a0 (diff) |
vkd3d-shader: Don't fetch output variable id before writing output info.
Otherwise, if a private variable is used for the given output,
vkd3d_dxbc_compiler_emit_store_shader_output will write to the
private variable again instead of the actual output, and some
outputs may never be emitted. This is common in hull shaders.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
-rw-r--r-- | libs/vkd3d-shader/spirv.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 4b93e01f..0fdfdcd9 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -4340,13 +4340,8 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler { use_private_variable = true; write_mask = VKD3DSP_WRITEMASK_ALL; - entry = rb_get(&compiler->symbol_table, ®_symbol); } } - else if ((entry = rb_get(&compiler->symbol_table, ®_symbol))) - { - id = RB_ENTRY_VALUE(entry, const struct vkd3d_symbol, entry)->id; - } else { if (builtin) @@ -4393,7 +4388,7 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler if (use_private_variable) storage_class = SpvStorageClassPrivate; - if (entry) + if ((entry = rb_get(&compiler->symbol_table, ®_symbol))) var_id = RB_ENTRY_VALUE(entry, const struct vkd3d_symbol, entry)->id; else if (!use_private_variable) var_id = id; |