mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
Make texture view default format robust against invalid aspects
Computation of the default depends on the aspect, but the aspect may be invalid. Make the default computation robust such that it picks some valid aspect if a valid one is not provided. This will make computing the default OK, but still fail validation of the aspect later. Bug: chromium:1314049 Change-Id: I2dcfe7962c7e30ac627605b6d0f1c269b3a6af6e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86020 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
@@ -1630,7 +1630,10 @@ namespace dawn::native {
|
||||
const TextureViewDescriptor* descriptor) {
|
||||
DAWN_TRY(ValidateIsAlive());
|
||||
DAWN_TRY(ValidateObject(texture));
|
||||
TextureViewDescriptor desc = GetTextureViewDescriptorWithDefaults(texture, descriptor);
|
||||
|
||||
TextureViewDescriptor desc;
|
||||
DAWN_TRY_ASSIGN(desc, GetTextureViewDescriptorWithDefaults(texture, descriptor));
|
||||
|
||||
if (IsValidationEnabled()) {
|
||||
DAWN_TRY_CONTEXT(ValidateTextureViewDescriptor(this, texture, &desc),
|
||||
"validating %s against %s.", &desc, texture);
|
||||
|
||||
Reference in New Issue
Block a user