Commit 331581e9 by Shahbaz Youssefi Committed by Commit Bot

Make copy*Texture parameters consistent for level indices

They were passed as size_t, while GL level indices are GLint throughout ANGLE. Bug: angleproject:4880 Change-Id: I43bc9f01a607e457b55a061f473450d3360db808 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380230 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com>
parent fbafb46c
......@@ -20,7 +20,7 @@ angle::Result TextureImpl::copyTexture(const gl::Context *context,
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -33,7 +33,7 @@ angle::Result TextureImpl::copyTexture(const gl::Context *context,
angle::Result TextureImpl::copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -55,8 +55,8 @@ angle::Result TextureImpl::copy3DTexture(const gl::Context *context,
gl::TextureTarget target,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
size_t destLevel,
GLint sourceLevel,
GLint destLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -69,8 +69,8 @@ angle::Result TextureImpl::copy3DTexture(const gl::Context *context,
angle::Result TextureImpl::copy3DSubTexture(const gl::Context *context,
const gl::TextureTarget target,
const gl::Offset &destOffset,
size_t sourceLevel,
size_t destLevel,
GLint sourceLevel,
GLint destLevel,
const gl::Box &srcBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......
......@@ -97,7 +97,7 @@ class TextureImpl : public FramebufferAttachmentObjectImpl
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -105,7 +105,7 @@ class TextureImpl : public FramebufferAttachmentObjectImpl
virtual angle::Result copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -119,8 +119,8 @@ class TextureImpl : public FramebufferAttachmentObjectImpl
gl::TextureTarget target,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
size_t destLevel,
GLint sourceLevel,
GLint destLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -128,8 +128,8 @@ class TextureImpl : public FramebufferAttachmentObjectImpl
virtual angle::Result copy3DSubTexture(const gl::Context *context,
const gl::TextureTarget target,
const gl::Offset &destOffset,
size_t sourceLevel,
size_t destLevel,
GLint sourceLevel,
GLint destLevel,
const gl::Box &srcBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......
......@@ -73,7 +73,7 @@ class MockTextureImpl : public TextureImpl
const gl::ImageIndex &,
GLenum,
GLenum,
size_t,
GLint,
bool,
bool,
bool,
......@@ -82,7 +82,7 @@ class MockTextureImpl : public TextureImpl
angle::Result(const gl::Context *,
const gl::ImageIndex &,
const gl::Offset &,
size_t,
GLint,
const gl::Box &,
bool,
bool,
......
......@@ -273,7 +273,7 @@ class TextureD3D_2D : public TextureD3D
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -281,7 +281,7 @@ class TextureD3D_2D : public TextureD3D
angle::Result copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -405,7 +405,7 @@ class TextureD3D_Cube : public TextureD3D
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -413,7 +413,7 @@ class TextureD3D_Cube : public TextureD3D
angle::Result copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -538,7 +538,7 @@ class TextureD3D_3D : public TextureD3D
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -546,7 +546,7 @@ class TextureD3D_3D : public TextureD3D
angle::Result copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -668,7 +668,7 @@ class TextureD3D_2DArray : public TextureD3D
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -676,7 +676,7 @@ class TextureD3D_2DArray : public TextureD3D
angle::Result copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......
......@@ -833,7 +833,7 @@ angle::Result TextureGL::copyTexture(const gl::Context *context,
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -859,7 +859,7 @@ angle::Result TextureGL::copyTexture(const gl::Context *context,
angle::Result TextureGL::copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -878,7 +878,7 @@ angle::Result TextureGL::copySubTextureHelper(const gl::Context *context,
gl::TextureTarget target,
size_t level,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Rectangle &sourceArea,
const gl::InternalFormat &destFormat,
bool unpackFlipY,
......
......@@ -115,7 +115,7 @@ class TextureGL : public TextureImpl
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -123,7 +123,7 @@ class TextureGL : public TextureImpl
angle::Result copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -133,7 +133,7 @@ class TextureGL : public TextureImpl
gl::TextureTarget target,
size_t level,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Rectangle &sourceArea,
const gl::InternalFormat &destFormat,
bool unpackFlipY,
......
......@@ -83,7 +83,7 @@ class TextureMtl : public TextureImpl
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -91,7 +91,7 @@ class TextureMtl : public TextureImpl
angle::Result copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -243,7 +243,7 @@ class TextureMtl : public TextureImpl
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const gl::InternalFormat &internalFormat,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......
......@@ -845,7 +845,7 @@ angle::Result TextureMtl::copyTexture(const gl::Context *context,
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -874,7 +874,7 @@ angle::Result TextureMtl::copyTexture(const gl::Context *context,
angle::Result TextureMtl::copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -1673,7 +1673,7 @@ angle::Result TextureMtl::copySubTextureImpl(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const gl::InternalFormat &internalFormat,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -1683,7 +1683,7 @@ angle::Result TextureMtl::copySubTextureImpl(const gl::Context *context,
// Only 2D textures are supported.
ASSERT(sourceBox.depth == 1);
ASSERT(source->getType() == gl::TextureType::_2D);
gl::ImageIndex sourceIndex = gl::ImageIndex::Make2D(static_cast<GLint>(sourceLevel));
gl::ImageIndex sourceIndex = gl::ImageIndex::Make2D(sourceLevel);
ContextMtl *contextMtl = mtl::GetImpl(context);
TextureMtl *sourceMtl = mtl::GetImpl(source);
......
......@@ -89,7 +89,7 @@ angle::Result TextureNULL::copyTexture(const gl::Context *context,
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -101,7 +101,7 @@ angle::Result TextureNULL::copyTexture(const gl::Context *context,
angle::Result TextureNULL::copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......
......@@ -69,7 +69,7 @@ class TextureNULL : public TextureImpl
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevel,
GLint sourceLevel,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -77,7 +77,7 @@ class TextureNULL : public TextureImpl
angle::Result copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevel,
GLint sourceLevel,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......
......@@ -484,7 +484,7 @@ angle::Result TextureVk::copyTexture(const gl::Context *context,
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevelGL,
GLint sourceLevelGL,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -510,7 +510,7 @@ angle::Result TextureVk::copyTexture(const gl::Context *context,
angle::Result TextureVk::copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevelGL,
GLint sourceLevelGL,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -650,7 +650,7 @@ angle::Result TextureVk::copySubTextureImpl(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const gl::InternalFormat &destFormat,
size_t sourceLevelGL,
GLint sourceLevelGL,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -783,7 +783,7 @@ angle::Result TextureVk::copySubImageImplWithTransfer(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const vk::Format &destFormat,
size_t sourceLevelGL,
GLint sourceLevelGL,
size_t sourceLayer,
const gl::Box &sourceBox,
vk::ImageHelper *srcImage)
......@@ -905,7 +905,7 @@ angle::Result TextureVk::copySubImageImplWithDraw(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const vk::Format &destFormat,
size_t sourceLevelGL,
GLint sourceLevelGL,
const gl::Box &sourceBox,
bool isSrcFlipY,
bool unpackFlipY,
......@@ -1385,7 +1385,7 @@ angle::Result TextureVk::redefineLevel(const gl::Context *context,
}
angle::Result TextureVk::copyImageDataToBufferAndGetData(ContextVk *contextVk,
size_t sourceLevelGL,
GLint sourceLevelGL,
uint32_t layerCount,
const gl::Box &sourceArea,
uint8_t **outDataPtr)
......
......@@ -85,7 +85,7 @@ class TextureVk : public TextureImpl, public angle::ObserverInterface
const gl::ImageIndex &index,
GLenum internalFormat,
GLenum type,
size_t sourceLevelGL,
GLint sourceLevelGL,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
......@@ -93,7 +93,7 @@ class TextureVk : public TextureImpl, public angle::ObserverInterface
angle::Result copySubTexture(const gl::Context *context,
const gl::ImageIndex &index,
const gl::Offset &destOffset,
size_t sourceLevelGL,
GLint sourceLevelGL,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -272,7 +272,7 @@ class TextureVk : public TextureImpl, public angle::ObserverInterface
const vk::Format &vkFormat);
angle::Result copyImageDataToBufferAndGetData(ContextVk *contextVk,
size_t sourceLevelGL,
GLint sourceLevelGL,
uint32_t layerCount,
const gl::Box &sourceArea,
uint8_t **outDataPtr);
......@@ -317,7 +317,7 @@ class TextureVk : public TextureImpl, public angle::ObserverInterface
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const gl::InternalFormat &destFormat,
size_t sourceLevelGL,
GLint sourceLevelGL,
const gl::Box &sourceBox,
bool unpackFlipY,
bool unpackPremultiplyAlpha,
......@@ -328,7 +328,7 @@ class TextureVk : public TextureImpl, public angle::ObserverInterface
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const vk::Format &destFormat,
size_t sourceLevelGL,
GLint sourceLevelGL,
size_t sourceLayer,
const gl::Box &sourceBox,
vk::ImageHelper *srcImage);
......@@ -337,7 +337,7 @@ class TextureVk : public TextureImpl, public angle::ObserverInterface
const gl::ImageIndex &index,
const gl::Offset &destOffset,
const vk::Format &destFormat,
size_t sourceLevelGL,
GLint sourceLevelGL,
const gl::Box &sourceBox,
bool isSrcFlipY,
bool unpackFlipY,
......
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