gettextureimage: verify cube map is complete
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 5 Apr 2018 09:00:46 +0000 (09:00 +0000)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Fri, 13 Apr 2018 15:47:27 +0000 (17:47 +0200)
commit8d411eb6b36cb1d8c5e8582d9c6cf30f80859027
treed322f529533dcb558da32d2cbcde3ddc0a007c5c
parent42891dbaa12a67162ea219fface71726696971e2
gettextureimage: verify cube map is complete

According to OpenGL 4.6 spec, section 8.11.4 ("Texture Image Queries"),
relative to errors for GetTexImage, GetTextureImage, and GetnTexImage:

  "An INVALID_OPERATION error is generated by GetTextureImage if the
   effective target is TEXTURE_CUBE_MAP or TEXTURE_CUBE_MAP_ARRAY, and
   the texture object is not cube complete or cube array complete,
   respectively."

This fixes arb_get_texture_sub_image piglit tests.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/main/texgetimage.c