Validate the texture Aspect enum in ImageCopyTexture
Bug: chromium:1191389, chromium:1191770 Change-Id: I973b8951d43bd0463afcd05fdd7104184db1be2d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45841 Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
54e150b7c2
commit
d020de4501
|
@ -24,6 +24,7 @@
|
|||
#include "dawn_native/QuerySet.h"
|
||||
#include "dawn_native/RenderBundle.h"
|
||||
#include "dawn_native/RenderPipeline.h"
|
||||
#include "dawn_native/ValidationUtils_autogen.h"
|
||||
|
||||
namespace dawn_native {
|
||||
|
||||
|
@ -287,6 +288,7 @@ namespace dawn_native {
|
|||
return DAWN_VALIDATION_ERROR("mipLevel out of range");
|
||||
}
|
||||
|
||||
DAWN_TRY(ValidateTextureAspect(textureCopy.aspect));
|
||||
if (SelectFormatAspects(texture->GetFormat(), textureCopy.aspect) == Aspect::None) {
|
||||
return DAWN_VALIDATION_ERROR("Texture does not have selected aspect for texture copy.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue