OpenGL: Return error when calling writeTexture() on stencil aspect
This patch adds a missing check in QueueGL::WriteTexture() to return a validation error when we try to call writeTexture() on the stencil aspect on OpenGL backends as copying from a buffer into a stencil texture is not supported on OpenGL. BUG=dawn:439 Change-Id: I203d40aefe346aea663a492c5a065248b74f8ea3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56002 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
parent
f7cde7e5a4
commit
3d5402c0a4
|
@ -56,6 +56,10 @@ namespace dawn_native { namespace opengl {
|
||||||
const void* data,
|
const void* data,
|
||||||
const TextureDataLayout& dataLayout,
|
const TextureDataLayout& dataLayout,
|
||||||
const Extent3D& writeSizePixel) {
|
const Extent3D& writeSizePixel) {
|
||||||
|
if (destination.aspect == wgpu::TextureAspect::StencilOnly) {
|
||||||
|
return DAWN_VALIDATION_ERROR("Writes to stencil textures unsupported on OpenGL");
|
||||||
|
}
|
||||||
|
|
||||||
TextureCopy textureCopy;
|
TextureCopy textureCopy;
|
||||||
textureCopy.texture = destination.texture;
|
textureCopy.texture = destination.texture;
|
||||||
textureCopy.mipLevel = destination.mipLevel;
|
textureCopy.mipLevel = destination.mipLevel;
|
||||||
|
|
Loading…
Reference in New Issue