[PATCH] wined3d: Negiotiate less specific memory types on allocation failure.

Jan Sikorski jsikorski at codeweavers.com
Fri Jul 30 04:24:28 CDT 2021


> On 29 Jul 2021, at 18:36, Zebediah Figura (she/her) <zfigura at codeweavers.com> wrote:
> 
> This will still spew an ERR message, though, which seems less than ideal.

Maybe “Failed to find a suitable memory type” could be a WARN instead? I think other failures could stay ERR. I’d upgrade to an ERR at the call site as well.

> Also, the while loop seems awkward to me, couldn't we instead do something like (abbreviated):
> 
> if (!wined3d_context_vk_create_bo(memory_type)
>        && !wined3d_context_vk_create_bo(memory_type & ~HOST_CACHED)
>        && !wined3d_context_vk_create_bo(memory_type & ~DEVICE_LOCAL))

Yeah, it isn’t exactly equivalent (the loop could go DCV -> DV -> VC -> V), but I guess the last step isn’t helping much. I’ll do the simplified thing in v2.

- Jan


More information about the wine-devel mailing list