Commit 846ca843 by Jamie Madill

Fix 2D tex array buffer unpacking.

In some cases, when an unpack buffer is enabled, we would use the incorrect layer offset, because we would think the pixel pointer was NULL. Use a new parameter instead of the double "null" meaning to fix this. This fixes several tests in the dEQP texture specification group. (EG: dEQP-GLES3.functional.texture.specification.teximage3d_pbo) BUG=angle:899 Change-Id: If96bba6987a04653301efc348d32de372a237aa1 Reviewed-on: https://chromium-review.googlesource.com/244092Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org>
parent 9d294c33
...@@ -67,12 +67,15 @@ class TextureD3D : public TextureImpl ...@@ -67,12 +67,15 @@ class TextureD3D : public TextureImpl
ImageD3D *getBaseLevelImage() const; ImageD3D *getBaseLevelImage() const;
protected: protected:
gl::Error setImage(const gl::ImageIndex &index, GLenum type, const gl::PixelUnpackState &unpack, const uint8_t *pixels); gl::Error setImage(const gl::ImageIndex &index, GLenum type,
const gl::PixelUnpackState &unpack, const uint8_t *pixels,
ptrdiff_t layerOffset);
gl::Error subImage(const gl::ImageIndex &index, const gl::Box &area, GLenum format, GLenum type, gl::Error subImage(const gl::ImageIndex &index, const gl::Box &area, GLenum format, GLenum type,
const gl::PixelUnpackState &unpack, const uint8_t *pixels); const gl::PixelUnpackState &unpack, const uint8_t *pixels, ptrdiff_t layerOffset);
gl::Error setCompressedImage(const gl::ImageIndex &index, const gl::PixelUnpackState &unpack, const uint8_t *pixels); gl::Error setCompressedImage(const gl::ImageIndex &index, const gl::PixelUnpackState &unpack,
const uint8_t *pixels, ptrdiff_t layerOffset);
gl::Error subImageCompressed(const gl::ImageIndex &index, const gl::Box &area, GLenum format, gl::Error subImageCompressed(const gl::ImageIndex &index, const gl::Box &area, GLenum format,
const gl::PixelUnpackState &unpack, const uint8_t *pixels); const gl::PixelUnpackState &unpack, const uint8_t *pixels, ptrdiff_t layerOffset);
bool isFastUnpackable(const gl::PixelUnpackState &unpack, GLenum sizedInternalFormat); bool isFastUnpackable(const gl::PixelUnpackState &unpack, GLenum sizedInternalFormat);
gl::Error fastUnpackPixels(const gl::PixelUnpackState &unpack, const uint8_t *pixels, const gl::Box &destArea, gl::Error fastUnpackPixels(const gl::PixelUnpackState &unpack, const uint8_t *pixels, const gl::Box &destArea,
GLenum sizedInternalFormat, GLenum type, RenderTargetD3D *destRenderTarget); GLenum sizedInternalFormat, GLenum type, RenderTargetD3D *destRenderTarget);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment