reset command buffers on the thread they were spawned
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
336468cc31
commit
5187093ddc
|
@ -8218,6 +8218,7 @@ static Refresh_CommandBuffer* VULKAN_AcquireCommandBuffer(
|
||||||
uint8_t fixed
|
uint8_t fixed
|
||||||
) {
|
) {
|
||||||
VulkanRenderer *renderer = (VulkanRenderer*) driverData;
|
VulkanRenderer *renderer = (VulkanRenderer*) driverData;
|
||||||
|
VkResult result;
|
||||||
|
|
||||||
SDL_threadID threadID = SDL_ThreadID();
|
SDL_threadID threadID = SDL_ThreadID();
|
||||||
|
|
||||||
|
@ -8244,6 +8245,16 @@ static Refresh_CommandBuffer* VULKAN_AcquireCommandBuffer(
|
||||||
commandBuffer->renderPassInProgress = 0;
|
commandBuffer->renderPassInProgress = 0;
|
||||||
commandBuffer->renderPassColorTargetCount = 0;
|
commandBuffer->renderPassColorTargetCount = 0;
|
||||||
|
|
||||||
|
result = renderer->vkResetCommandBuffer(
|
||||||
|
commandBuffer->commandBuffer,
|
||||||
|
VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
|
||||||
|
);
|
||||||
|
|
||||||
|
if (result != VK_SUCCESS)
|
||||||
|
{
|
||||||
|
LogVulkanResultAsError("vkResetCommandBuffer", result);
|
||||||
|
}
|
||||||
|
|
||||||
VULKAN_INTERNAL_BeginCommandBuffer(renderer, commandBuffer);
|
VULKAN_INTERNAL_BeginCommandBuffer(renderer, commandBuffer);
|
||||||
|
|
||||||
return (Refresh_CommandBuffer*) commandBuffer;
|
return (Refresh_CommandBuffer*) commandBuffer;
|
||||||
|
@ -8418,21 +8429,8 @@ static void VULKAN_INTERNAL_CleanCommandBuffer(
|
||||||
) {
|
) {
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
VulkanUniformBuffer *uniformBuffer;
|
VulkanUniformBuffer *uniformBuffer;
|
||||||
VkResult result;
|
|
||||||
DescriptorSetData *descriptorSetData;
|
DescriptorSetData *descriptorSetData;
|
||||||
|
|
||||||
result = renderer->vkResetCommandBuffer(
|
|
||||||
commandBuffer->commandBuffer,
|
|
||||||
VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
|
|
||||||
);
|
|
||||||
|
|
||||||
if (result != VK_SUCCESS)
|
|
||||||
{
|
|
||||||
LogVulkanResultAsError("vkResetCommandBuffer", result);
|
|
||||||
}
|
|
||||||
|
|
||||||
commandBuffer->submitted = 0;
|
|
||||||
|
|
||||||
/* Bound uniform buffers are now available */
|
/* Bound uniform buffers are now available */
|
||||||
|
|
||||||
for (i = 0; i < commandBuffer->boundUniformBufferCount; i += 1)
|
for (i = 0; i < commandBuffer->boundUniformBufferCount; i += 1)
|
||||||
|
|
Loading…
Reference in New Issue