vkd3d-shader/msl: Reject cube and multi-sample texel fetches in msl_ld().

The cube variants are simply disallowed in Direct3D, and currently
mishandled by msl_ld(). It's less clear whether multi-sample fetches
should be allowed, and how they're supposed to behave if they are,
although typically the "ld2dms" instruction would be used for those.
They're not supported on the MSL side either way.
This commit is contained in:
Henri Verbeet
2025-05-26 13:14:19 +02:00
parent 671fbfea7d
commit 02d7d6038d
Notes: Henri Verbeet 2025-06-05 16:18:34 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1535

View File

@@ -763,6 +763,13 @@ static void msl_ld(struct msl_generator *gen, const struct vkd3d_shader_instruct
data_type = VKD3D_DATA_FLOAT;
}
if (resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_2DMS
|| resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_CUBE
|| resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY
|| resource_type == VKD3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY)
msl_compiler_error(gen, VKD3D_SHADER_ERROR_MSL_UNSUPPORTED,
"Texel fetches from resource type %#x are not supported.", resource_type);
if (!(resource_type_info = msl_get_resource_type_info(resource_type)))
{
msl_compiler_error(gen, VKD3D_SHADER_ERROR_MSL_INTERNAL,