Vulkan: Remove two ASSERT(false) with more detailed reading of Vk spec.
QueueWaitIdle can fail but if it fails, the error codes show that we can't do anything about it so we just ignore the result. BufferGetMemoryRequirements should always return memory types bits that allow Dawn to select a good memory type of a resource. BUG=dawn:19 Change-Id: I52beebf9f2be2bfb997ca9c1bf306618a73c9c4b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12183 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
d59fec5d70
commit
2e666bd5de
|
@ -85,9 +85,12 @@ namespace dawn_native { namespace vulkan {
|
|||
mRecordingContext.used = false;
|
||||
fn.DestroyCommandPool(mVkDevice, mRecordingContext.commandPool, nullptr);
|
||||
|
||||
if (fn.QueueWaitIdle(mQueue) != VK_SUCCESS) {
|
||||
ASSERT(false);
|
||||
}
|
||||
VkResult waitIdleResult = fn.QueueWaitIdle(mQueue);
|
||||
// Ignore the result of QueueWaitIdle: it can return OOM which we can't really do anything
|
||||
// about, Device lost, which means workloads running on the GPU are no longer accessible
|
||||
// (so they are as good as waited on) or success.
|
||||
DAWN_UNUSED(waitIdleResult);
|
||||
|
||||
CheckPassedFences();
|
||||
|
||||
// Make sure all fences are complete by explicitly waiting on them all
|
||||
|
|
|
@ -98,12 +98,7 @@ namespace dawn_native { namespace vulkan {
|
|||
bool mappable,
|
||||
DeviceMemoryAllocation* allocation) {
|
||||
int bestType = FindBestTypeIndex(requirements, mappable);
|
||||
|
||||
// TODO(cwallez@chromium.org): I think the Vulkan spec guarantees this should never happen
|
||||
if (bestType == -1) {
|
||||
ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
ASSERT(bestType >= 0);
|
||||
|
||||
VkMemoryAllocateInfo allocateInfo;
|
||||
allocateInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
|
||||
|
|
Loading…
Reference in New Issue