This would cause CoreValidation-Shader-InterfaceTypeMismatch validation errors from Wine's test_shader_interstage_interface() d3d11 test. This reverts parts of commits 1eb7eca411f71d8dec7cfae5c58c1dff9626a7e0 and 04ec461fb4224e126d271760123bb6d756c06582.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- libs/vkd3d-shader/spirv.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index a949e4a..40280eb 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -4438,8 +4438,13 @@ 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 (!use_private_variable && (entry = rb_get(&compiler->symbol_table, ®_symbol))) + { + id = RB_ENTRY_VALUE(entry, const struct vkd3d_symbol, entry)->id; + } else { if (builtin) @@ -4487,15 +4492,15 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler vkd3d_spirv_build_op_decorate(builder, id, SpvDecorationPatch, NULL, 0);
vkd3d_dxbc_compiler_decorate_xfb_output(compiler, id, output_component_count, signature_element); - - compiler->output_info[signature_idx].id = id; - compiler->output_info[signature_idx].component_type = component_type; }
+ compiler->output_info[signature_idx].id = id; + compiler->output_info[signature_idx].component_type = component_type; + if (use_private_variable) storage_class = SpvStorageClassPrivate;
- if ((entry = rb_get(&compiler->symbol_table, ®_symbol))) + if (entry) var_id = RB_ENTRY_VALUE(entry, const struct vkd3d_symbol, entry)->id; else if (!use_private_variable) var_id = id;