vulkan: return VK_NOT_READY when no queries are available
Fixes a validation issue. The issue is that the function gets called before we've sumitted a frame for decoding to that context. However, we cannot run queries before they've been reset, which happens at submission time. As we'd need to otherwise run a command queue at init-time, just check if submissions have happened.
This commit is contained in:
@@ -456,6 +456,9 @@ VkResult ff_vk_exec_get_query(FFVulkanContext *s, FFVkExecContext *e,
|
||||
int64_t res = 0;
|
||||
VkQueryResultFlags qf = 0;
|
||||
|
||||
if (!e->had_submission)
|
||||
return VK_NOT_READY;
|
||||
|
||||
qf |= pool->query_64bit ?
|
||||
VK_QUERY_RESULT_64_BIT : 0x0;
|
||||
qf |= pool->query_statuses ?
|
||||
@@ -779,6 +782,8 @@ int ff_vk_exec_submit(FFVulkanContext *s, FFVkExecContext *e)
|
||||
}
|
||||
}
|
||||
|
||||
e->had_submission = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user