vkd3d-shader/msl: Handle the VKD3DSIM_LINEAR interpolation modifier on inputs.

This commit is contained in:
Feifan He
2024-11-22 15:45:54 +08:00
committed by Henri Verbeet
parent 8ae6a04561
commit 67dd1d2b0c
Notes: Henri Verbeet 2024-12-03 14:57:01 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1291
7 changed files with 33 additions and 24 deletions

View File

@@ -768,13 +768,6 @@ static void msl_generate_input_struct_declarations(struct msl_generator *gen)
continue;
}
if (e->interpolation_mode != VKD3DSIM_NONE)
{
msl_compiler_error(gen, VKD3D_SHADER_ERROR_MSL_INTERNAL,
"Internal compiler error: Unhandled interpolation mode %#x.", e->interpolation_mode);
continue;
}
if(e->register_count > 1)
{
msl_compiler_error(gen, VKD3D_SHADER_ERROR_MSL_INTERNAL,
@@ -818,6 +811,18 @@ static void msl_generate_input_struct_declarations(struct msl_generator *gen)
break;
}
switch (e->interpolation_mode)
{
/* The default interpolation attribute. */
case VKD3DSIM_LINEAR:
case VKD3DSIM_NONE:
break;
default:
msl_compiler_error(gen, VKD3D_SHADER_ERROR_MSL_INTERNAL,
"Internal compiler error: Unhandled interpolation mode %#x.", e->interpolation_mode);
break;
}
vkd3d_string_buffer_printf(buffer, ";\n");
}