microsoft/compiler: Handle structs in I/O signatures

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>
This commit is contained in:
Jesse Natalie 2022-02-02 05:43:21 -08:00 committed by Marge Bot
parent eb0cefae6d
commit 0044e80b82
2 changed files with 3 additions and 1 deletions

View File

@ -43,6 +43,7 @@ enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type
case GLSL_TYPE_UINT64: return DXIL_PROG_SIG_COMP_TYPE_UINT64;
case GLSL_TYPE_INT64: return DXIL_PROG_SIG_COMP_TYPE_SINT64;
case GLSL_TYPE_BOOL: return DXIL_PROG_SIG_COMP_TYPE_UINT32;
case GLSL_TYPE_STRUCT: return DXIL_PROG_SIG_COMP_TYPE_UINT32;
default:
debug_printf("unexpected type: %s\n", glsl_get_type_name(type));
return DXIL_PROG_SIG_COMP_TYPE_UNKNOWN;

View File

@ -127,7 +127,8 @@ get_additional_semantic_info(nir_shader *s, nir_variable *var, struct semantic_i
dxil_get_prog_sig_comp_type(type);
bool is_depth = is_depth_output(info->kind);
info->sig_comp_type = dxil_get_comp_type(type);
info->sig_comp_type = glsl_type_is_struct(type) ?
DXIL_COMP_TYPE_U32 : dxil_get_comp_type(type);
bool is_gs_input = s->info.stage == MESA_SHADER_GEOMETRY &&
(var->data.mode & (nir_var_shader_in | nir_var_system_value));