|
|
|
@ -303,9 +303,13 @@ BufferCacheRuntime::BufferCacheRuntime(const Device& device_, MemoryAllocator& m |
|
|
|
DescriptorPool& descriptor_pool) |
|
|
|
: device{device_}, memory_allocator{memory_allocator_}, scheduler{scheduler_}, |
|
|
|
staging_pool{staging_pool_}, guest_descriptor_queue{guest_descriptor_queue_}, |
|
|
|
uint8_pass(device, scheduler, descriptor_pool, staging_pool, compute_pass_descriptor_queue), |
|
|
|
quad_index_pass(device, scheduler, descriptor_pool, staging_pool, |
|
|
|
compute_pass_descriptor_queue) { |
|
|
|
if (device.GetDriverID() != VK_DRIVER_ID_QUALCOMM_PROPRIETARY) { |
|
|
|
// TODO: FixMe: Uint8Pass compute shader does not build on some Qualcomm drivers.
|
|
|
|
uint8_pass = std::make_unique<Uint8Pass>(device, scheduler, descriptor_pool, staging_pool, |
|
|
|
compute_pass_descriptor_queue); |
|
|
|
} |
|
|
|
quad_array_index_buffer = std::make_shared<QuadArrayIndexBuffer>(device_, memory_allocator_, |
|
|
|
scheduler_, staging_pool_); |
|
|
|
quad_strip_index_buffer = std::make_shared<QuadStripIndexBuffer>(device_, memory_allocator_, |
|
|
|
@ -442,7 +446,9 @@ void BufferCacheRuntime::BindIndexBuffer(PrimitiveTopology topology, IndexFormat |
|
|
|
topology == PrimitiveTopology::QuadStrip); |
|
|
|
} else if (vk_index_type == VK_INDEX_TYPE_UINT8_EXT && !device.IsExtIndexTypeUint8Supported()) { |
|
|
|
vk_index_type = VK_INDEX_TYPE_UINT16; |
|
|
|
std::tie(vk_buffer, vk_offset) = uint8_pass.Assemble(num_indices, buffer, offset); |
|
|
|
if (uint8_pass) { |
|
|
|
std::tie(vk_buffer, vk_offset) = uint8_pass->Assemble(num_indices, buffer, offset); |
|
|
|
} |
|
|
|
} |
|
|
|
if (vk_buffer == VK_NULL_HANDLE) { |
|
|
|
// Vulkan doesn't support null index buffers. Replace it with our own null buffer.
|
|
|
|
|