Gallium does create the front buffer (with DRI2 at least), but it's
created only when it's used. glDrawBuffer(GL_FRONT) creates it
usually.

Marek

On Mon, Aug 17, 2015 at 5:23 AM, Dave Airlie <airl...@gmail.com> wrote:
> From: Dave Airlie <airl...@redhat.com>
>
> It appears CTS does a lot of
>
> glGetFrameBufferAttachmentParameteriv with GL_FRONT_LEFT,
>
> but gallium doesn't create a GL_FRONT_LEFT attachment,
> so these all fail badly, now I'd like to argue the test suite
> should probably only hit GL_BACK_LEFT but I'm guessing that
> won't go down well.
>
> I'm not really sure about this solution so just RFC it for now.
>
> Signed-off-by: Dave Airlie <airl...@redhat.com>
> ---
>  src/mesa/state_tracker/st_manager.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_manager.c 
> b/src/mesa/state_tracker/st_manager.c
> index 2e2c8ff..5836a50 100644
> --- a/src/mesa/state_tracker/st_manager.c
> +++ b/src/mesa/state_tracker/st_manager.c
> @@ -324,6 +324,12 @@ st_framebuffer_add_renderbuffer(struct st_framebuffer 
> *stfb,
>
>     if (idx != BUFFER_DEPTH) {
>        _mesa_add_renderbuffer(&stfb->Base, idx, rb);
> +      if (idx == BUFFER_BACK_LEFT) {
> +         rb = st_new_renderbuffer_fb(format, stfb->iface->visual->samples, 
> sw);
> +         if (!rb)
> +            return FALSE;
> +         _mesa_add_renderbuffer(&stfb->Base, BUFFER_FRONT_LEFT, rb);
> +      }
>     }
>     else {
>        if (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_ZS, 
> 0))
> --
> 2.4.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to