From f1e81a87c8626849d0741110b71682c0a07fadc9 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Thu, 28 Jan 2021 19:15:55 +0000 Subject: [PATCH] Remove glPixelStore GL_PACK_IMAGE_HEIGHT calls. This enum is unsupported in OpenGL ES. If this is actually a problem for WebGPU, we may need to add validation for WebGPU-compat to prevent reading from a texture to a buffer with a different image stride. I'm not sure if that's currently possible, and it doesn't seem to be covered by tests. Change-Id: Ia39d0dae122acfba3c663ae5956a981a0acb5e07 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38740 Reviewed-by: Corentin Wallez Reviewed-by: Austin Eng Commit-Queue: Stephen White --- src/dawn_native/opengl/CommandBufferGL.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/dawn_native/opengl/CommandBufferGL.cpp b/src/dawn_native/opengl/CommandBufferGL.cpp index 696fa4fb4d..6edc7688cd 100644 --- a/src/dawn_native/opengl/CommandBufferGL.cpp +++ b/src/dawn_native/opengl/CommandBufferGL.cpp @@ -771,7 +771,6 @@ namespace dawn_native { namespace opengl { const TexelBlockInfo& blockInfo = formatInfo.GetAspectInfo(src.aspect).block; gl.BindBuffer(GL_PIXEL_PACK_BUFFER, buffer->GetHandle()); - gl.PixelStorei(GL_PACK_IMAGE_HEIGHT, dst.rowsPerImage * blockInfo.height); gl.PixelStorei(GL_PACK_ROW_LENGTH, dst.bytesPerRow / blockInfo.byteSize); GLenum glAttachment; @@ -831,7 +830,6 @@ namespace dawn_native { namespace opengl { } gl.PixelStorei(GL_PACK_ROW_LENGTH, 0); - gl.PixelStorei(GL_PACK_IMAGE_HEIGHT, 0); gl.BindBuffer(GL_PIXEL_PACK_BUFFER, 0); gl.DeleteFramebuffers(1, &readFBO);