mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
libs/vkd3d: Mark device as removed when command list in recording state is executed.
Fixes a GPU hang in test_device_removed_reason() on RADV. Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
ce9ec9a44a
commit
f0a1e14113
@@ -1943,9 +1943,11 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateFence(ID3D12Device *iface,
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d12_device_GetDeviceRemovedReason(ID3D12Device *iface)
|
||||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
struct d3d12_device *device = impl_from_ID3D12Device(iface);
|
||||
|
||||
return S_OK;
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return device->removed_reason;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_device_GetCopyableFootprints(ID3D12Device *iface,
|
||||
@@ -2245,6 +2247,8 @@ static HRESULT d3d12_device_init(struct d3d12_device *device,
|
||||
if ((device->parent = create_info->parent))
|
||||
IUnknown_AddRef(device->parent);
|
||||
|
||||
device->removed_reason = S_OK;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -2270,6 +2274,19 @@ HRESULT d3d12_device_create(struct vkd3d_instance *instance,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void d3d12_device_mark_as_removed(struct d3d12_device *device, HRESULT reason,
|
||||
const char *message, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, message);
|
||||
WARN("Device %p is lost (reason %#x, message \"%s\").\n",
|
||||
device, reason, vkd3d_dbg_vsprintf(message, args));
|
||||
va_end(args);
|
||||
|
||||
device->removed_reason = reason;
|
||||
}
|
||||
|
||||
IUnknown *vkd3d_get_device_parent(ID3D12Device *device)
|
||||
{
|
||||
struct d3d12_device *d3d12_device = impl_from_ID3D12Device(device);
|
||||
|
||||
Reference in New Issue
Block a user