From: Rob Clark Date: Tue, 29 Jan 2013 00:50:07 +0000 (-0600) Subject: image: make getDrawBufferImage() work for ES or !ARB_draw_buffers X-Git-Url: https://git.cworth.org/git?p=apitrace;a=commitdiff_plain;h=df80495e48ee0b82a7f4f2882072608fce317b87 image: make getDrawBufferImage() work for ES or !ARB_draw_buffers Without this 'apitrace dump-images' was failing for me (GLES, freedreno gallium driver) because attachment would be GL_NONE. Signed-off-by: Rob Clark Reviewed-by: Carl Worth Signed-off-by: José Fonseca --- diff --git a/retrace/glstate_images.cpp b/retrace/glstate_images.cpp index 7b0a424..f3949b5 100644 --- a/retrace/glstate_images.cpp +++ b/retrace/glstate_images.cpp @@ -745,6 +745,8 @@ getDrawBufferImage() { if (draw_buffer == GL_NONE) { return NULL; } + } else { + draw_buffer = GL_COLOR_ATTACHMENT0; } if (!getFramebufferAttachmentDesc(context, framebuffer_target, draw_buffer, desc)) { @@ -756,6 +758,8 @@ getDrawBufferImage() { if (draw_buffer == GL_NONE) { return NULL; } + } else { + draw_buffer = GL_COLOR_ATTACHMENT0; } if (!getDrawableBounds(&desc.width, &desc.height)) {