mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
Make reeantrant creation calls returning Ref for command encoding.
Fixed: dawn:723 Change-Id: I953e0aa7d663f68e15c021448a90ecf799fef891 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84766 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
46d5480d20
commit
e055ae5b52
@@ -987,11 +987,6 @@ namespace dawn::native {
|
||||
}
|
||||
CommandEncoder* DeviceBase::APICreateCommandEncoder(
|
||||
const CommandEncoderDescriptor* descriptor) {
|
||||
const CommandEncoderDescriptor defaultDescriptor = {};
|
||||
if (descriptor == nullptr) {
|
||||
descriptor = &defaultDescriptor;
|
||||
}
|
||||
|
||||
Ref<CommandEncoder> result;
|
||||
if (ConsumedError(CreateCommandEncoder(descriptor), &result,
|
||||
"calling %s.CreateCommandEncoder(%s).", this, descriptor)) {
|
||||
@@ -1359,6 +1354,11 @@ namespace dawn::native {
|
||||
|
||||
ResultOrError<Ref<CommandEncoder>> DeviceBase::CreateCommandEncoder(
|
||||
const CommandEncoderDescriptor* descriptor) {
|
||||
const CommandEncoderDescriptor defaultDescriptor = {};
|
||||
if (descriptor == nullptr) {
|
||||
descriptor = &defaultDescriptor;
|
||||
}
|
||||
|
||||
DAWN_TRY(ValidateIsAlive());
|
||||
if (IsValidationEnabled()) {
|
||||
DAWN_TRY(ValidateCommandEncoderDescriptor(this, descriptor));
|
||||
|
||||
Reference in New Issue
Block a user