diff options
author | Vasiliy Ulyanov <v.ulyanov@samsung.com> | 2015-06-09 18:53:47 +0300 |
---|---|---|
committer | jinhyung.jo <jinhyung.jo@samsung.com> | 2015-08-04 17:27:57 +0900 |
commit | 05c8e349471708a054f8450b78300c72a0c57536 (patch) | |
tree | 0ba4763373ee95083444629f26ef729f3fd51924 | |
parent | bee7ea68c0d17fb66884f9639c882bffbccc1be0 (diff) | |
download | emulator-yagl-05c8e349471708a054f8450b78300c72a0c57536.tar.gz emulator-yagl-05c8e349471708a054f8450b78300c72a0c57536.tar.bz2 emulator-yagl-05c8e349471708a054f8450b78300c72a0c57536.zip |
YaGL: Generate error for rectangular cubemap images
According to the OGLES2.0 spec:
void TexImage2D(enum target, int level,
int internalformat, sizei width, sizei height,
int border, enum format, enum type, void *data);
When the target parameter to TexImage2D is one of the six cube map
two-dimensional image targets, the error INVALID_VALUE is generated
if the width and height parameters are not equal.
Change-Id: Ideb9172fa721cd7c92d1ef98a397d9fe48690e66
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
-rw-r--r-- | GLES_common/yagl_gles_calls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/GLES_common/yagl_gles_calls.c b/GLES_common/yagl_gles_calls.c index 7a8be78..f25a103 100644 --- a/GLES_common/yagl_gles_calls.c +++ b/GLES_common/yagl_gles_calls.c @@ -2243,6 +2243,11 @@ YAGL_API void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLs goto out; } + if (squashed_target == GL_TEXTURE_CUBE_MAP && width != height) { + YAGL_SET_ERR(GL_INVALID_VALUE); + goto out; + } + tex_target_state = yagl_gles_context_get_active_texture_target_state(ctx, texture_target); |