Commit 3c9db122 by Jamie Madill

Fix pixel unpack buffers for some formats.

The renderability test got flipped in 6cf8e1b9. See dEQP test: texture.specification.teximage2d_pbo.rgba8_snorm_2d Note: this test still fails due to a bug in isMipmapComplete, which has a fix in a subsequent patch. Change-Id: Ied8ad7712bbb844132b6ac37426716780c9801c9 Reviewed-on: https://chromium-review.googlesource.com/240761Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarBrandon Jones <bajones@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 276171b4
...@@ -75,6 +75,8 @@ struct Extents ...@@ -75,6 +75,8 @@ struct Extents
Extents() : width(0), height(0), depth(0) { } Extents() : width(0), height(0), depth(0) { }
Extents(int width_, int height_, int depth_) : width(width_), height(height_), depth(depth_) { } Extents(int width_, int height_, int depth_) : width(width_), height(height_), depth(depth_) { }
bool empty() const { return (width * height * depth) == 0; }
}; };
struct Box struct Box
......
...@@ -1790,7 +1790,7 @@ gl::Error TextureD3D_3D::setImage(GLenum target, size_t level, GLenum internalFo ...@@ -1790,7 +1790,7 @@ gl::Error TextureD3D_3D::setImage(GLenum target, size_t level, GLenum internalFo
gl::ImageIndex index = gl::ImageIndex::Make3D(level); gl::ImageIndex index = gl::ImageIndex::Make3D(level);
// Attempt a fast gpu copy of the pixel data to the surface if the app bound an unpack buffer // Attempt a fast gpu copy of the pixel data to the surface if the app bound an unpack buffer
if (isFastUnpackable(unpack, sizedInternalFormat)) if (isFastUnpackable(unpack, sizedInternalFormat) && !size.empty())
{ {
// Will try to create RT storage if it does not exist // Will try to create RT storage if it does not exist
RenderTarget *destRenderTarget = NULL; RenderTarget *destRenderTarget = NULL;
......
...@@ -2740,7 +2740,7 @@ bool Renderer11::supportsFastCopyBufferToTexture(GLenum internalFormat) const ...@@ -2740,7 +2740,7 @@ bool Renderer11::supportsFastCopyBufferToTexture(GLenum internalFormat) const
} }
// We cannot support direct copies to non-color-renderable formats // We cannot support direct copies to non-color-renderable formats
if (d3d11FormatInfo.rtvFormat != DXGI_FORMAT_UNKNOWN) if (d3d11FormatInfo.rtvFormat == DXGI_FORMAT_UNKNOWN)
{ {
return false; return false;
} }
......
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