aboutsummaryrefslogtreecommitdiff
path: root/src/libANGLE/Image.cpp
diff options
context:
space:
mode:
authorJamie Madill <jmadill@chromium.org>2018-04-12 09:13:18 -0400
committerCommit Bot <commit-bot@chromium.org>2018-04-12 23:08:07 +0000
commitcc129377530b25d4d2b1c67e8f3ad49869ca8dba (patch)
tree77c2ee399d758355db17a4b0c5deadd484eb6ba8 /src/libANGLE/Image.cpp
parented8d5ec7333070baddc731babbca895537a73cf4 (diff)
downloadangle-cc129377530b25d4d2b1c67e8f3ad49869ca8dba.tar.gz
ImageIndex: Consolidate layer/cube face.
In terms of the Texture or Image resource, a cube face refers to a layer of a 2D texture. This layer has a special meaning for cube textures, but it is represented as a layer with a layer index. Cube array textures are no different, they just use a different indexing scheme for the array layers. This also cleans up the ImageIndex helper to have a class structure with private data, and cleans up a few cases to use generic Make functions and iterators where they were setting properties of the index directly. This will make it easier to have ImageIndexes address entire levels of a Cube map in the future, and makes the layer count logic in Vulkan cleaner. Bug: angleproject:2318 Change-Id: Iea9842e233f974a9896282ca224cb001f7882bd1 Reviewed-on: https://chromium-review.googlesource.com/987525 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Diffstat (limited to 'src/libANGLE/Image.cpp')
-rw-r--r--src/libANGLE/Image.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libANGLE/Image.cpp b/src/libANGLE/Image.cpp
index e0e40b010b..bfdb9267cd 100644
--- a/src/libANGLE/Image.cpp
+++ b/src/libANGLE/Image.cpp
@@ -26,7 +26,7 @@ gl::ImageIndex GetImageIndex(EGLenum eglTarget, const egl::AttributeMap &attribs
{
if (eglTarget == EGL_GL_RENDERBUFFER)
{
- return gl::ImageIndex::MakeInvalid();
+ return gl::ImageIndex();
}
gl::TextureTarget target = egl_gl::EGLImageTargetToTextureTarget(eglTarget);
@@ -40,7 +40,7 @@ gl::ImageIndex GetImageIndex(EGLenum eglTarget, const egl::AttributeMap &attribs
else
{
ASSERT(layer == 0);
- return gl::ImageIndex::MakeGeneric(target, mip);
+ return gl::ImageIndex::MakeFromTarget(target, mip);
}
}
} // anonymous namespace