Keith Packard <kei...@keithp.com> writes: > Eric Anholt <e...@anholt.net> writes: > >> I think it's a safe enough assumption that we're not generating non-OOM >> errors. And, now that we're logging errors, we should get reports of >> them sooner than we used to. > > Would it be sensible to wrap the glGetError call like this? > > GLenum > glamor_check_gl_oom() { > GLenum last_oom = GL_NO_ERROR; > GLenum error; > > while ((error = glGetError()) != GL_NO_ERROR) { > if (error == GL_OUT_OF_MEMORY) > last_oom = error; > } > return last_oom; > } > > I admit I haven't looked at the Mesa glGetError() implementation, so I > don't know if there's a queue of errors, or just a bitfield.
"When an error is detected, a flag is set and the code is recorded. Further errors, if they occur, do not affect this recorded code. When GetError is called, the code is returned and the flag is cleared, so that a further error will again record its code."
signature.asc
Description: PGP signature
_______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel