Revert "getteximage: Return correct error value when texure object is not found"
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 22 Jun 2017 16:16:16 +0000 (18:16 +0200)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 22 Jun 2017 16:48:18 +0000 (18:48 +0200)
commit87a2d3963a3d879ced67ba2d9a81e336a5ac0cdf
tree7234c828b358aacdc58b30d386d2357483f96aa1
parentc87f73724efbec493d0149738d3a7ea11bfab222
Revert "getteximage: Return correct error value when texure object is not found"

From OpenGL 4.5 spec PDF, section '8.11. Texture Queries', page 236:
  "An INVALID_VALUE error is generated if texture is not the name of
   an existing texture object."

Same wording applies to the compressed version.

But turns out this is a spec bug, and Khronos is fixing it for the next
revisions.

The proposal is to return INVALID_OPERATION in these cases.

This reverts commit 633c959faeae5099fd095f27da7b954e4a36254b.

v2:
- Use _mesa_lookup_texture_err (Samuel Pitoiset)

v3:
- _mesa_lookup_texture_err() already handles texture > 0 (Samuel
Pitoiset)
- Just revert 633c959fae (Juan A. Suarez)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
src/mesa/main/texgetimage.c