Commit bbc6a275 authored by Dave Airlie's avatar Dave Airlie

mesa: don't use genned but unnamed xfb objects.

If we try to draw or query an XFB object that hasn't been bound,
we shouldn't return any information.

This fixes a couple if cases in:

The ObjectLabel test is inspired by another test.
Reviewed-by: default avatarIan Romanick <>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <>
Signed-off-by: default avatarDave Airlie <>
parent eafe3905
......@@ -665,6 +665,15 @@ _mesa_validate_DrawTransformFeedback(struct gl_context *ctx,
return GL_FALSE;
/* From the GL 4.5 specification, page 429:
* "An INVALID_VALUE error is generated if id is not the name of a
* transform feedback object."
if (!obj->EverBound) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDrawTransformFeedback*(name)");
return GL_FALSE;
if (stream >= ctx->Const.MaxVertexStreams) {
_mesa_error(ctx, GL_INVALID_VALUE,
......@@ -176,9 +176,13 @@ get_label_pointer(struct gl_context *ctx, GLenum identifier, GLuint name,
/* From the GL 4.5 specification, page 536:
* "An INVALID_VALUE error is generated if name is not the name of a
* valid object of the type specified by identifier."
struct gl_transform_feedback_object *tfo =
_mesa_lookup_transform_feedback_object(ctx, name);
if (tfo)
if (tfo && tfo->EverBound)
labelPtr = &tfo->Label;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment