diff options
author | Laura Ekstrand <laura@jlekstrand.net> | 2014-11-18 11:50:28 -0800 |
---|---|---|
committer | Laura Ekstrand <laura@jlekstrand.net> | 2014-11-18 11:50:28 -0800 |
commit | 4ef1df094f229b8d164b9c955eb60a1f7fdad00b (patch) | |
tree | e67d15cf3860723b7e07f9b7f83101545f8dc43a | |
parent | 964e77487c2b5fa172012b64afe947dde8f12885 (diff) |
Allocates texture storage for GL_TEXTURE_CUBE_MAP correctly.
-rw-r--r-- | tests/spec/arb_direct_state_access/gettextureimage-targets.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/spec/arb_direct_state_access/gettextureimage-targets.c b/tests/spec/arb_direct_state_access/gettextureimage-targets.c index 20d1e260c..b827a128c 100644 --- a/tests/spec/arb_direct_state_access/gettextureimage-targets.c +++ b/tests/spec/arb_direct_state_access/gettextureimage-targets.c @@ -131,8 +131,13 @@ getTexImage(bool doPBO, GLenum target, GLubyte data[][IMAGE_SIZE], case GL_TEXTURE_CUBE_MAP: num_faces = 6; glCreateTextures(target, 1, &name); + /* This is invalid. You must use 2D storage call for cube. */ glTextureStorage3D(name, 1, internalformat, IMAGE_WIDTH, IMAGE_HEIGHT, num_faces); + pass &= piglit_check_gl_error(GL_INVALID_ENUM); + glTextureStorage2D(name, 1, internalformat, + IMAGE_WIDTH, IMAGE_HEIGHT); + /* This is legal. */ glTextureSubImage3D(name, 0, 0, 0, 0, IMAGE_WIDTH, IMAGE_HEIGHT, num_faces, GL_RGBA, GL_UNSIGNED_BYTE, data); |