Minor fix to build with MSVC: Removes constructor ambiguity

Fixes error C2440: 'return': cannot convert from 'dawn_native::Aspect' to 'Result<dawn_native::Aspect,dawn_native::ErrorData>'

Change-Id: Ia63ced7fe9582c88a4173db008226733bdd06cac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36080
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
This commit is contained in:
Carl Woffenden 2021-01-04 13:28:29 +00:00 committed by Commit Bot service account
parent 86980018b3
commit 9f0b827df1
1 changed files with 2 additions and 1 deletions

View File

@ -655,7 +655,8 @@ namespace dawn_native {
switch (view.aspect) { switch (view.aspect) {
case wgpu::TextureAspect::All: case wgpu::TextureAspect::All:
if (HasOneBit(format.aspects)) { if (HasOneBit(format.aspects)) {
return Aspect{format.aspects}; Aspect single = format.aspects;
return single;
} else { } else {
return DAWN_VALIDATION_ERROR( return DAWN_VALIDATION_ERROR(
"A single aspect must be selected for multi-planar formats in " "A single aspect must be selected for multi-planar formats in "