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 <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
parent
0228625411
commit
f1e81a87c8
|
@ -771,7 +771,6 @@ namespace dawn_native { namespace opengl {
|
||||||
const TexelBlockInfo& blockInfo = formatInfo.GetAspectInfo(src.aspect).block;
|
const TexelBlockInfo& blockInfo = formatInfo.GetAspectInfo(src.aspect).block;
|
||||||
|
|
||||||
gl.BindBuffer(GL_PIXEL_PACK_BUFFER, buffer->GetHandle());
|
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);
|
gl.PixelStorei(GL_PACK_ROW_LENGTH, dst.bytesPerRow / blockInfo.byteSize);
|
||||||
|
|
||||||
GLenum glAttachment;
|
GLenum glAttachment;
|
||||||
|
@ -831,7 +830,6 @@ namespace dawn_native { namespace opengl {
|
||||||
}
|
}
|
||||||
|
|
||||||
gl.PixelStorei(GL_PACK_ROW_LENGTH, 0);
|
gl.PixelStorei(GL_PACK_ROW_LENGTH, 0);
|
||||||
gl.PixelStorei(GL_PACK_IMAGE_HEIGHT, 0);
|
|
||||||
|
|
||||||
gl.BindBuffer(GL_PIXEL_PACK_BUFFER, 0);
|
gl.BindBuffer(GL_PIXEL_PACK_BUFFER, 0);
|
||||||
gl.DeleteFramebuffers(1, &readFBO);
|
gl.DeleteFramebuffers(1, &readFBO);
|
||||||
|
|
Loading…
Reference in New Issue