mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
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>
This commit is contained in:
parent
fd4488c3ab
commit
04ec461fb4
@ -4340,13 +4340,8 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler
|
|||||||
{
|
{
|
||||||
use_private_variable = true;
|
use_private_variable = true;
|
||||||
write_mask = VKD3DSP_WRITEMASK_ALL;
|
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
|
else
|
||||||
{
|
{
|
||||||
if (builtin)
|
if (builtin)
|
||||||
@ -4393,7 +4388,7 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler
|
|||||||
if (use_private_variable)
|
if (use_private_variable)
|
||||||
storage_class = SpvStorageClassPrivate;
|
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;
|
var_id = RB_ENTRY_VALUE(entry, const struct vkd3d_symbol, entry)->id;
|
||||||
else if (!use_private_variable)
|
else if (!use_private_variable)
|
||||||
var_id = id;
|
var_id = id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user