Return Dawn result upon submit.

Missing OOM error should submit fail to create a descriptor heap.

BUG=dawn:177

Change-Id: I6ccc10f3e0b8de0bd21caa9aca35f4f269ce51e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11540
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Bryan Bernhart
2019-09-23 21:21:10 +00:00
committed by Commit Bot service account
parent 27a35eb2a9
commit 41f8aa550b
17 changed files with 86 additions and 55 deletions

View File

@@ -22,7 +22,7 @@ namespace dawn_native { namespace opengl {
Queue::Queue(Device* device) : QueueBase(device) {
}
void Queue::SubmitImpl(uint32_t commandCount, CommandBufferBase* const* commands) {
MaybeError Queue::SubmitImpl(uint32_t commandCount, CommandBufferBase* const* commands) {
Device* device = ToBackend(GetDevice());
for (uint32_t i = 0; i < commandCount; ++i) {
@@ -30,6 +30,7 @@ namespace dawn_native { namespace opengl {
}
device->SubmitFenceSync();
return {};
}
}} // namespace dawn_native::opengl

View File

@@ -27,7 +27,7 @@ namespace dawn_native { namespace opengl {
Queue(Device* device);
private:
void SubmitImpl(uint32_t commandCount, CommandBufferBase* const* commands) override;
MaybeError SubmitImpl(uint32_t commandCount, CommandBufferBase* const* commands) override;
};
}} // namespace dawn_native::opengl