mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Pass read range to ID3D12Resource_Map().
Avoids D3D12 Debug Layer warnings.
This commit is contained in:
@@ -657,6 +657,7 @@ static void get_buffer_readback_with_command_list(ID3D12Resource *buffer, DXGI_F
|
|||||||
D3D12_HEAP_PROPERTIES heap_properties;
|
D3D12_HEAP_PROPERTIES heap_properties;
|
||||||
D3D12_RESOURCE_DESC resource_desc;
|
D3D12_RESOURCE_DESC resource_desc;
|
||||||
ID3D12Resource *resource;
|
ID3D12Resource *resource;
|
||||||
|
D3D12_RANGE read_range;
|
||||||
ID3D12Device *device;
|
ID3D12Device *device;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
@@ -687,7 +688,10 @@ static void get_buffer_readback_with_command_list(ID3D12Resource *buffer, DXGI_F
|
|||||||
rb->height = 1;
|
rb->height = 1;
|
||||||
rb->row_pitch = resource_desc.Width;
|
rb->row_pitch = resource_desc.Width;
|
||||||
rb->data = NULL;
|
rb->data = NULL;
|
||||||
hr = ID3D12Resource_Map(resource, 0, NULL, &rb->data);
|
|
||||||
|
read_range.Begin = 0;
|
||||||
|
read_range.End = resource_desc.Width;
|
||||||
|
hr = ID3D12Resource_Map(resource, 0, &read_range, &rb->data);
|
||||||
ok(SUCCEEDED(hr), "Failed to map readback buffer, hr %#x.\n", hr);
|
ok(SUCCEEDED(hr), "Failed to map readback buffer, hr %#x.\n", hr);
|
||||||
|
|
||||||
ID3D12Device_Release(device);
|
ID3D12Device_Release(device);
|
||||||
|
Reference in New Issue
Block a user