[Mesa-dev] [PATCH 04/18] mesa: Expose texture buffer objects when the context is GL 3.1 core.
Eric Anholt
eric at anholt.net
Fri Aug 24 13:19:06 PDT 2012
Ian Romanick <idr at freedesktop.org> writes:
> From: Eric Anholt <eric at anholt.net>
>
> v2: Use API_OPENGL_CORE.
>
> v3: Only require desktop GL. If a driver can't support TexBOs in a non-core
> context, it should not enable them.
From the v3 comment, it sounds like you intend that i965 should not set
GL_ARB_texture_buffer_object, since it can't do TBO in non-core. That
was what my v2 did, but...
> +static const int extra_texture_buffer_object[] = {
> + EXTRA_VERSION_31,
> + EXT(ARB_texture_buffer_object),
> + EXTRA_END
> +};
Here, it's still changing from logic that is "support if ARB_tbo" to
"support if ARB_tbo or GL 3.1", good.
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 8ec48eb..2595717 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -754,7 +754,8 @@ _mesa_select_tex_object(struct gl_context *ctx,
> case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
> return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_2D_ARRAY_INDEX] : NULL;
> case GL_TEXTURE_BUFFER:
> - return ctx->Extensions.ARB_texture_buffer_object
> + return _mesa_is_desktop_gl(ctx)
> + && ctx->Extensions.ARB_texture_buffer_object
> ? texUnit->CurrentTex[TEXTURE_BUFFER_INDEX] : NULL;
but here we're changing from "support if ARB_tbo" to "support if ARB_tbo
and desktop". So, i965, not exposing ARB_tbo, would fail to work in a
3.1 core context. Similarly for the rest of the file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120824/0776a5ae/attachment.pgp>
More information about the mesa-dev
mailing list