mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests/shader_runner_metal: Handle multisampled 2D texture arrays properly.
They're not supported by the shader runner anyway, but there's no reason to make the code subtly wrong.
This commit is contained in:
committed by
Henri Verbeet
parent
cbce3a8631
commit
eb9e254b8c
Notes:
Henri Verbeet
2025-04-14 17:16:19 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1448
@@ -199,9 +199,10 @@ static void init_resource_texture(struct metal_runner *runner,
|
||||
|
||||
desc = [[MTLTextureDescriptor alloc] init];
|
||||
if (params->desc.sample_count > 1)
|
||||
desc.textureType = MTLTextureType2DMultisample;
|
||||
else if (params->desc.depth > 1)
|
||||
desc.textureType = MTLTextureType2DArray;
|
||||
desc.textureType = params->desc.depth > 1 ? MTLTextureType2DMultisampleArray
|
||||
: MTLTextureType2DMultisample;
|
||||
else
|
||||
desc.textureType = params->desc.depth > 1 ? MTLTextureType2DArray : MTLTextureType2D;
|
||||
desc.pixelFormat = get_metal_pixel_format(params->desc.format);
|
||||
ok(desc.pixelFormat != MTLPixelFormatInvalid, "Unhandled pixel format %#x.\n", params->desc.format);
|
||||
desc.width = params->desc.width;
|
||||
|
Reference in New Issue
Block a user