Commit 69c219dd authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Pass a draw count of 1 to Vulkan indirect draw commands.

Spotted by Philip Rebohle. This fixes rendering in "Discovery Tour by Assassin's Creed: Ancient Egypt".
parent 3178e909
......@@ -1813,23 +1813,14 @@ static void adapter_vk_draw_primitive(struct wined3d_device *device,
if (parameters->indirect)
{
struct wined3d_bo_vk *bo = wined3d_bo_vk(indirect_vk->b.buffer_object);
uint32_t stride, size;
wined3d_context_vk_reference_bo(context_vk, bo);
size = indirect_vk->b.resource.size - parameters->u.indirect.offset;
if (parameters->indexed)
{
stride = sizeof(VkDrawIndexedIndirectCommand);
VK_CALL(vkCmdDrawIndexedIndirect(vk_command_buffer, bo->vk_buffer,
bo->b.buffer_offset + parameters->u.indirect.offset, size / stride, stride));
}
bo->b.buffer_offset + parameters->u.indirect.offset, 1, sizeof(VkDrawIndexedIndirectCommand)));
else
{
stride = sizeof(VkDrawIndirectCommand);
VK_CALL(vkCmdDrawIndirect(vk_command_buffer, bo->vk_buffer,
bo->b.buffer_offset + parameters->u.indirect.offset, size / stride, stride));
}
bo->b.buffer_offset + parameters->u.indirect.offset, 1, sizeof(VkDrawIndirectCommand)));
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment