mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-13 09:50:17 +01:00
mesa: fix assertion in _mesa_drawbuffers()
Fixes failed assertion when _mesa_update_draw_buffers() was called with GL_DRAW_BUFFER == GL_FRONT_AND_BACK. The piglit gl30basic hit this. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
dd8f15a553
commit
39b40ad144
1 changed files with 3 additions and 2 deletions
|
|
@ -494,10 +494,11 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers,
|
|||
}
|
||||
|
||||
/*
|
||||
* If n==1, destMask[0] may have up to four bits set.
|
||||
* destMask[0] may have up to four bits set
|
||||
* (ex: glDrawBuffer(GL_FRONT_AND_BACK)).
|
||||
* Otherwise, destMask[x] can only have one bit set.
|
||||
*/
|
||||
if (n == 1) {
|
||||
if (_mesa_bitcount(destMask[0]) > 1) {
|
||||
GLuint count = 0, destMask0 = destMask[0];
|
||||
while (destMask0) {
|
||||
GLint bufIndex = ffs(destMask0) - 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue