main: Require that the texture exists in framebuffer_texture
Generate GL_INVALID_OPERATION if the texture hasn't been created. Signed-off-by: Fredrik Höglund <fredrik@kde.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
@@ -2603,7 +2603,7 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
|
||||
GLboolean err = GL_TRUE;
|
||||
|
||||
texObj = _mesa_lookup_texture(ctx, texture);
|
||||
if (texObj != NULL) {
|
||||
if (texObj != NULL && texObj->Target != 0) {
|
||||
if (textarget == 0) {
|
||||
if (layered) {
|
||||
/* We're being called by glFramebufferTexture() and textarget
|
||||
|
||||
Reference in New Issue
Block a user