mesa: make glFramebuffer* check immutable texture level bounds
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 7 Oct 2017 18:19:42 +0000 (11:19 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 7 Oct 2017 20:26:55 +0000 (13:26 -0700)
commit37e128b9b7fc99bc57edb031e0481658e524f1a4
tree04fd13bb855c108b649f5830b6df29f579c6fd01
parent5a47abb63e11853bf1f2f72e3c5371a720346b7d
mesa: make glFramebuffer* check immutable texture level bounds

When a texture is immutable, we can't tack on extra levels
after-the-fact like we could with glTexImage. So check against that
level limit and return an error if it's surpassed.

This fixes:
KHR-GL45.geometry_shader.layered_fbo.fb_texture_invalid_level_number

(Based on a patch by Ilia Mirkin.)

Reviewed-by: Antia Puentes <apuentes@igalia.com> [imirkin v2]
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/fbobject.c