[Mesa-dev] [PATCH] mesa: remove erroneous check for API_OPENGL_CORE in _mesa_TexBuffer
Chad Versace
chad.versace at linux.intel.com
Mon Jan 28 14:37:31 PST 2013
On 01/28/2013 02:01 PM, Christoph Bumiller wrote:
> From: Christoph Bumiller <christoph.bumiller at speed.at>
>
> Only the test of the extension enable should be relevant.
I don't think this change is correct.
For most extensions, including GL_ARB_texture_buffer_object, the Intel driver
enables the extension flags according only to hardware capabilities. That is,
the decision to enable a flag is independent of the context API. See
intel_extensions.c.
Removing this API check may incorrectly allow glTexBufferARB on Intel drivers
in a non-core GL context. I could be wrong (I don't fully understand how
GL dispatch works), but this change still makes me uncomfortable.
> ---
> src/mesa/main/teximage.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 31a559e..5a27797 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -4005,8 +4005,7 @@ _mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer)
> GET_CURRENT_CONTEXT(ctx);
> FLUSH_VERTICES(ctx, 0);
>
> - if (!(ctx->API == API_OPENGL_CORE &&
> - ctx->Extensions.ARB_texture_buffer_object)) {
> + if (!ctx->Extensions.ARB_texture_buffer_object) {
> _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBuffer");
> return;
> }
>
More information about the mesa-dev
mailing list