mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-14 09:18:20 +02:00
mesa: Accept GL_BACK in get_fb0_attachment with ARB_ES3_1_compatibility.
According to the ARB_ES3_1_compatibility specification,
glGetFramebufferAttachmentParameteriv is supposed to accept BACK,
and it behaves exactly like BACK_LEFT.
Fixes a GL error in GFXBench 5 Aztec Ruins.
Cc: "17.3 17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 4f538c3f99)
This commit is contained in:
parent
71ea414782
commit
67fc6d43bd
1 changed files with 9 additions and 0 deletions
|
|
@ -330,6 +330,15 @@ get_fb0_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
|
|||
return &fb->Attachment[BUFFER_BACK_LEFT];
|
||||
case GL_BACK_RIGHT:
|
||||
return &fb->Attachment[BUFFER_BACK_RIGHT];
|
||||
case GL_BACK:
|
||||
/* The ARB_ES3_1_compatibility spec says:
|
||||
*
|
||||
* "Since this command can only query a single framebuffer
|
||||
* attachment, BACK is equivalent to BACK_LEFT."
|
||||
*/
|
||||
if (ctx->Extensions.ARB_ES3_1_compatibility)
|
||||
return &fb->Attachment[BUFFER_BACK_LEFT];
|
||||
return NULL;
|
||||
case GL_AUX0:
|
||||
if (fb->Visual.numAuxBuffers == 1) {
|
||||
return &fb->Attachment[BUFFER_AUX0];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue