1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 04:29:15 +01:00

[d3d9] CheckDeviceFormat will error out for Vertex/IndexBuffer RTypes

This commit is contained in:
WinterSnowfall 2025-03-05 13:12:22 +02:00
parent 46471a6ad8
commit 04cef0025a
No known key found for this signature in database

View File

@ -114,7 +114,10 @@ namespace dxvk {
DWORD Usage,
D3DRESOURCETYPE RType,
D3D9Format CheckFormat) {
if(unlikely(AdapterFormat == D3D9Format::Unknown))
if (unlikely(AdapterFormat == D3D9Format::Unknown))
return D3DERR_INVALIDCALL;
if (unlikely(RType == D3DRTYPE_VERTEXBUFFER || RType == D3DRTYPE_INDEXBUFFER))
return D3DERR_INVALIDCALL;
if (!IsSupportedAdapterFormat(AdapterFormat))
@ -168,9 +171,6 @@ namespace dxvk {
if (RType == D3DRTYPE_CUBETEXTURE && mapping.Aspect != VK_IMAGE_ASPECT_COLOR_BIT)
return D3DERR_NOTAVAILABLE;
if (RType == D3DRTYPE_VERTEXBUFFER || RType == D3DRTYPE_INDEXBUFFER)
return D3D_OK;
// Let's actually ask Vulkan now that we got some quirks out the way!
VkFormat format = mapping.FormatColor;
if (unlikely(mapping.ConversionFormatInfo.FormatColor != VK_FORMAT_UNDEFINED)) {