mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Use vkd3d_create_vk_buffer_view() to create counter resource views.
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:
parent
c75f9ee39d
commit
3e33fb3212
@ -1590,11 +1590,16 @@ static void vkd3d_create_buffer_uav(struct d3d12_desc *descriptor, struct d3d12_
|
|||||||
|
|
||||||
if (counter_resource)
|
if (counter_resource)
|
||||||
{
|
{
|
||||||
|
const struct vkd3d_format *format;
|
||||||
|
|
||||||
assert(d3d12_resource_is_buffer(counter_resource));
|
assert(d3d12_resource_is_buffer(counter_resource));
|
||||||
assert(desc->u.Buffer.StructureByteStride);
|
assert(desc->u.Buffer.StructureByteStride);
|
||||||
if (!vkd3d_create_buffer_view(device, counter_resource, DXGI_FORMAT_R32_UINT,
|
|
||||||
desc->u.Buffer.CounterOffsetInBytes / sizeof(uint32_t), 1, 0, 0, &view->vk_counter_view))
|
format = vkd3d_get_format(DXGI_FORMAT_R32_UINT, false);
|
||||||
|
if (!vkd3d_create_vk_buffer_view(device, counter_resource, format,
|
||||||
|
desc->u.Buffer.CounterOffsetInBytes, sizeof(uint32_t), &view->vk_counter_view))
|
||||||
{
|
{
|
||||||
|
WARN("Failed to create counter buffer view.\n");
|
||||||
view->vk_counter_view = VK_NULL_HANDLE;
|
view->vk_counter_view = VK_NULL_HANDLE;
|
||||||
d3d12_desc_destroy(descriptor, device);
|
d3d12_desc_destroy(descriptor, device);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user