mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
mesa: Reject ResumeTransformFeedback if the wrong program is bound.
This is actually a pretty important error condition: otherwise, you could set up transform feedback with one program, and resume it with a program that generates a completely different set of outputs. Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
c732f68cf4
commit
9cc74c93f8
1 changed files with 11 additions and 0 deletions
|
|
@ -943,6 +943,17 @@ _mesa_ResumeTransformFeedback(void)
|
|||
return;
|
||||
}
|
||||
|
||||
/* From the ARB_transform_feedback2 specification:
|
||||
* "The error INVALID_OPERATION is generated by ResumeTransformFeedback if
|
||||
* the program object being used by the current transform feedback object
|
||||
* is not active."
|
||||
*/
|
||||
if (obj->shader_program != ctx->Shader.CurrentVertexProgram) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glResumeTransformFeedback(wrong vertex program bound)");
|
||||
return;
|
||||
}
|
||||
|
||||
FLUSH_VERTICES(ctx, 0);
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedback;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue