1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2024-12-10 22:24:14 +01:00
This commit is contained in:
Unknown 2019-12-14 19:48:30 +00:00
parent 3539f894fd
commit 422662de4a

View File

@ -72,14 +72,14 @@ void createFullscreenQuad(VkDevice device, VkBuffer* fsqVertexBuffer, VkDeviceMe
void createDescriptorPool(VkDevice device, VkDescriptorPool* descriptorPool, VkDescriptorSetLayout* blitDsl) void createDescriptorPool(VkDevice device, VkDescriptorPool* descriptorPool, VkDescriptorSetLayout* blitDsl)
{ {
VkDescriptorPoolSize descriptorPoolSizes[1]; VkDescriptorPoolSize descriptorPoolSizes[1];
descriptorPoolSizes[0].descriptorCount = 1; descriptorPoolSizes[0].descriptorCount = 100;
descriptorPoolSizes[0].type = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER; descriptorPoolSizes[0].type = VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER;
VkDescriptorPoolCreateInfo descriptorPoolCI = {}; VkDescriptorPoolCreateInfo descriptorPoolCI = {};
descriptorPoolCI.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; descriptorPoolCI.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
descriptorPoolCI.poolSizeCount = 1; descriptorPoolCI.poolSizeCount = 1;
descriptorPoolCI.pPoolSizes = descriptorPoolSizes; descriptorPoolCI.pPoolSizes = descriptorPoolSizes;
descriptorPoolCI.maxSets = 1; descriptorPoolCI.maxSets = 100;
descriptorPoolCI.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; descriptorPoolCI.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
rpi_vkCreateDescriptorPool(device, &descriptorPoolCI, 0, descriptorPool); rpi_vkCreateDescriptorPool(device, &descriptorPoolCI, 0, descriptorPool);
@ -606,8 +606,6 @@ VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyBufferToImage(
_buffer* buf = srcBuffer; _buffer* buf = srcBuffer;
_image* img = dstImage; _image* img = dstImage;
setupEmulationResources(device);
for(uint32_t c = 0; c < regionCount; ++c) for(uint32_t c = 0; c < regionCount; ++c)
{ {
//TODO support this //TODO support this
@ -710,6 +708,8 @@ VKAPI_ATTR void VKAPI_CALL rpi_vkCmdCopyBufferToImage(
rpi_vkDestroyRenderPass(device, offscreenRenderPass, 0); rpi_vkDestroyRenderPass(device, offscreenRenderPass, 0);
rpi_vkDestroyFramebuffer(device, offscreenFramebuffer, 0); rpi_vkDestroyFramebuffer(device, offscreenFramebuffer, 0);
} }
img->layout = dstImageLayout;
} }
VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBlitImage( VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBlitImage(