Commit Graph

414 Commits

Author SHA1 Message Date
Ian Romanick
7ef1869d69 mesa: Don't advertise extensions that are part of GL 1.2 in a core context
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-13 16:19:36 -07:00
Ian Romanick
4d39b86315 mesa: Don't advertise deprecated extensions in a core context
It may be possible to trim the list of extensions futher.  These are
just the obvious extensions that add functionality that the core context
explicitly forbids.  Apple's core-context extension list is *just* the
extensions on top of the core GL version.  I'm not sure we want to go
that far, but removing some things that have been in core since 2.1 may
be okay.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-13 16:19:36 -07:00
Pauli Nieminen
8129dabb5f mesa: Make ARB_sampler_objects mandatory
To allow meta acceleration operations to use sampler objects the
ARB_sampler_objects extension needs to be mandatory for all drivers.
Because the extension doesn't have any hardware dependencies it is
trivial to implement.

Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-08-01 15:31:17 -07:00
Jordan Justen
09714c09a4 mesa: add support for using API_OPENGL_CORE
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-30 16:18:57 -07:00
Marek Olšák
d24ece97e5 mesa: add ARB_transform_feedback_instanced extension enable flag
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-12 13:05:59 +02:00
Marek Olšák
21cb5ed20d glsl: implement ARB_transform_feedback3 in the linker
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-12 13:05:58 +02:00
Marek Olšák
5094533040 mesa: add ARB_timer_query to the extension list
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-07-10 19:04:12 +02:00
Gwenole Beauchesne
69f031cc19 mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x. 2012-07-04 15:26:22 -04:00
Marek Olšák
2668aaa557 Revert "mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x."
This reverts commit d1665388ce.
2012-07-04 01:39:52 +02:00
Gwenole Beauchesne
d1665388ce mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x. 2012-07-03 16:23:38 -04:00
Brian Paul
b73cf49c91 mesa: set GL_ARB_uniform_buffer_object extension year to 2009 2012-06-21 13:08:34 -06:00
Fredrik Höglund
ae5d7d5e89 mesa: Add support for GL_ARB_base_instance
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-06-19 07:57:22 -06:00
Kristian Høgsberg
2d7b2d7a87 gles2: Add GL_NV_read_buffer extension
This lets us select the front buffer for reading under GLES2.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-18 11:53:18 -04:00
Olivier Galibert
199771bc32 glsl: Scaffolding for ARB_shader_bit_encoding.
That adds support for activating the extension.  It doesn't actually
*do* anything yet, of course.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-07 00:06:00 -07:00
Kenneth Graunke
d4667516b6 mesa: Remove the OES_draw_texture extension from ES2.
This extension appears to be written against ES 1.0.
In ES 2.0, you really want to be using FBOs instead.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23 17:03:35 -07:00
Eric Anholt
3362c7d9b6 mesa: Prevent buffer underrun when handling MESA_GL_EXTENSION_OVERRIDE. 2012-05-04 14:00:32 -07:00
Dylan Noblesmith
75fe7d1995 mesa: don't cast away const
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-04-13 14:25:08 +00:00
Chad Versace
36fef005b1 main: Fix memory leak in _mesa_make_extension_string()
I forgot to free the string returned by strdup().

Note: This is a candidate for the stable branches.
CC: Johannes Obermayr <johannesobermayr@gmx.de>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-04-09 17:31:51 -07:00
Neil Roberts
03f617f413 Add support for GL_EXT_unpack_subimage on GLES2
This extension just permits GL_UNPACK_ROW_LENGTH, GL_UNPACK_SKIP_ROWS
and GL_UNPACK_SKIP_PIXELS to be passed to glPixelStore on GLES2 so it
is trivial to implement.
2012-03-27 08:28:06 -04:00
Benjamin Franzke
860f4846c7 gles: Enable the GL_EXT_read_format_bgra extension
Also fixes the usage of GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES,
which may be set to a BGRA format e.g. for a MESA_FORMAT_ARGB8888 fb.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-27 09:03:19 +02:00
Marek Olšák
bb1d126b23 mesa: expose ARB_debug_output 2012-03-10 21:42:06 +01:00
Dave Airlie
b72d5767e3 extensions: remove unused code.
Comparing an unsigned to < 0 is pointless.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-12 16:09:50 +00:00
Chia-I Wu
d4a38e86d4 mesa: add support for GL_OES_compressed_ETC1_RGB8_texture
Add support for GL_OES_compressed_ETC1_RGB8_texture to core mesa.  There is no
driver support yet.

Unlike desktop GL compressed texture formats, GLES compressed texture formats
usually can only be used with glCompressedTexImage2D.  All other gl*Tex*Image*
functions are updated to check for that.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-02 08:43:46 +08:00
Marek Olšák
bbcb648bc2 mesa: rename the AMD_conservative_depth extension flag to ARB
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-11-22 20:56:50 +01:00
Chia-I Wu
db73264e14 mesa: add GL_OES_EGL_image_external to the extension list
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-03 15:09:44 +08:00
Nicholas Miell
740467dd62 mesa: Add the basics for the NV_fog_distance extension
No driver implements it yet.
2011-11-01 11:37:10 +01:00
Brian Paul
12d69fca09 swrast: implement GL_ARB_texture_storage 2011-10-31 10:52:57 -06:00
Brian Paul
a7d9e449f0 mesa: init extension entry for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Ian Romanick
763b00f2c5 mesa: Remove ARB_draw_buffers extension enable flag
All drivers in Mesa have supported this extension for eons.  This
extension is an optional features in desktop OpenGL (via
GL_ARB_draw_buffers) and OpenGL ES 2.x (via GL_NV_draw_buffers).

The extension is not usable in OpenGL ES 1.x.  There is no
glDrawBuffers* entry point in OpenGL ES 1.x contexts, and glGet*v
generate errors when MAX_DRAW_BUFFERS or DRAW_BUFFERi is queried.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:58 -07:00
Ian Romanick
a92f02d04a mesa: Advertise NV_fbo_color_attachments on OpenGL ES 2.0
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:57 -07:00
Ian Romanick
cb016bbb1d mesa: Advertise NV_draw_buffers in OpenGL ES 2.0
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-04 12:25:57 -07:00
Ian Romanick
ed48df8424 mesa: Remove ARB_texture_mirrored_repeat extension enable flag
All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

This extension was previously not supported on mach64, mga, and savage
(Savage3D and other pre-Savage4).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-29 10:41:04 -07:00
Ian Romanick
b0824bd860 mesa: Remove EXT_blend_subtract extension enable flag
All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

This extension was previously not supported on i810, mach64, mga,
savage, sis, and tdfx (Voodoo Banshee and Voodoo3).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-29 10:41:01 -07:00
Ian Romanick
1d5e49bf05 mesa: Remove EXT_stencil_wrap extension enable flag
All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

This extension was previously not supported on mach64.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-29 10:40:58 -07:00
Ian Romanick
f9a2352c95 mesa: Remove EXT_texture_lod_bias extension enable flag
All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

This extension was previously not supported on mach64, mga, or r128.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-29 10:40:55 -07:00
Ian Romanick
bde8bd99b6 mesa: Remove EXT_texture_env_combine extension enable flag
All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.  The existing support is already partially
broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x).
This patch does not change the situation in any way.

It looks like the only hardware supported by Mesa that cannot do
ARB_texture_env_combine is pre-NV10 NVIDA chips.  It appears that
these chips cannot do the GL_SUBTRACT mode.  Based on looking at older
copies of nvOpenGLspecs.pdf found on the net, NVIDIA never supported
ARB_texture_env_combine on those chips either.

This extension was previously not supported on mach64, mga (G200),
r128, savage, sis, and tdfx (Voodoo Banshee and Voodoo3).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-29 10:40:51 -07:00
Ian Romanick
5c4f914f9a mesa: Remove EXT_texture_env_add extension enable flag
All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.  The existing support is already partially
broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x).
This patch does not change the situation in any way.

This extension was previously not supported on mach64, mga (G200),
savage (Savage3D and other pre-Savage4), sis, and tdfx (Voodoo
Banshee).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-29 10:40:47 -07:00
Ian Romanick
677743f7d5 mesa: Remove ARB_multitexture extension enable flag
All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.  The existing support is already partially
broken in Mesa (e.g., querying GL_CLIENT_ACTIVE_TEXTURE in OpenGL ES
2.x).  This patch does not change the situation in any way.

This extension was previously not supported on i810, mga (G200), or
tdfx (Voodoo Banshee).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-29 10:40:39 -07:00
Ian Romanick
e0553f6d4b mesa: Remove EXT_abgr extension enable flag
All drivers remaining in Mesa support this extension.  This extension
is required in desktop OpenGL.  The existing support is already partially
broken in Mesa (e.g., using format=GL_ABGR for glTexImage2D in OpenGL ES 2.x).
This patch does not change the situation in any way.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-26 12:14:14 -07:00
Ian Romanick
29386d1f2d mesa: Remove EXT_bgra and EXT_texture_format_BGRA8888 extension enable flags
All drivers remaining in Mesa support this extension.  This extension
is either required or optional features in desktop OpenGL, OpenGL ES
1.x, and OpenGL ES 2.x.

EXT_texture_format_BGRA8888 is mostly a subset of EXT_bgra.  The only
difference seems to be that EXT_texture_format_BGRA8888 allows GL_BGRA
as an internal format to glTexImage2D and friends.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-26 12:14:14 -07:00
Ian Romanick
425284e882 mesa: Remove OES_read_format extension enable flag
This extension is always enabled, and drivers do not have
to option to disable it.

I kept this one separate from the others because I was a little
uncertain about the changes to get.c.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2011-09-26 12:14:13 -07:00
Ian Romanick
e5301b82ff mesa: Remove all mention of EXT_vertex_array_set
Mesa has never any portion of this extension, and neither has any
other vendor.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-26 12:14:13 -07:00
Ian Romanick
740a9a4952 mesa: Fix extension year for EXT_texture_env_combine
The year 2006 apparently came from the "Last Modified Date" in the
spec header.  however, the revision history at the bottom say "2/22/00
mjk - added NVIDIA Implementation Details."  From that we can safely
infer that the spec is from at least 2000, and it may even be older.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-26 12:14:13 -07:00
Ian Romanick
34eae1c72a mesa: Remove many extension enable flags
The following extensions are always enabled, and drivers do not have
to option to disable them:

    GL_ARB_multisample
    GL_ARB_texture_compression
    GL_ARB_vertex_buffer_object / GL_OES_mapbuffer
    GL_EXT_copy_texture
    GL_EXT_multi_draw_arrays / GL_SUN_multi_draw_arrays
    GL_EXT_polygon_offset
    GL_EXT_subtexture
    GL_EXT_texture_edge_clamp / GL_SGIS_texture_edge_clamp
    GL_EXT_vertex_array
    GL_SGIS_generate_mipmap

This set was picked because the are all either required or optional
features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x.  The
existing support for some is already partially broken in Mesa (e.g.,
proxy texture targets in OpenGL ES).  This patch does not change the
situation in any way.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-26 12:14:13 -07:00
Brian Paul
9e9a76eea1 mesa: remove support for GL_APPLE_client_storage extension
AFAIK, there are few users of this extension and I can see a couple
reasons why this is probably broken in Mesa anyway.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-22 10:45:09 -06:00
Ian Romanick
76e5020e90 mesa: Delete stale comment about MESAX extensions
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-09-19 12:02:21 -07:00
Ian Romanick
113e8167de mesa: Remove support for GL_EXT_blend_logic_op
Support is removed for four reasons:

1. The implementation was broken with respect to separate blend
equations.  The GL_EXT_blend_equation_separate spec says:

    "If EXT_blend_logic_op and EXT_blend_equation_separate are both
    supported, the logic op blend equation should be supported separately
    for RGB and alpha as with the other blend equation modes."

But Mesa's implementation of GL_LOGIC_OP specifically forbids this.

2. No hardware supported by Mesa can support separate blend equations
involving GL_LOGIC_OP.

3. No applications could be found that use this extension.

4. No other Linux OpenGL drivers support this extension.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Cc: Brian Paul <brianp@vmware.com>
2011-09-19 12:02:20 -07:00
Ian Romanick
636dd62131 mesa: Remove unused _mesa_enable_imaging_extensions function
The last user of this function was driInitExtensions, and that function
was removed in a previous commit.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-09-19 12:02:20 -07:00
Ian Romanick
24a113093b mesa: Advertise GL_OES_compressed_paletted_texture in OpenGL ES1.x
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Jin Yang <jin.a.yang@intel.com>
2011-09-19 10:04:47 -07:00
Marek Olšák
9222c497f9 mesa: fix more valgrind warnings
==27540== Invalid read of size 4
==27540==    at 0x96277B7: _mesa_make_extension_string (string3.h:144)
==27540==    by 0x9604E78: _mesa_make_current (context.c:1514)
==27540==    by 0x9602A8B: st_api_make_current (st_manager.c:789)
==27540==    by 0x45406E7: ???
==27540==  Address 0xad35b30 is 3,688 bytes inside a block of size 3,691 alloc'd
==27540==    at 0x4025315: calloc (vg_replace_malloc.c:467)
==27540==    by 0x9627641: _mesa_make_extension_string (extensions.c:910)
==27540==    by 0x9604E78: _mesa_make_current (context.c:1514)
==27540==    by 0x9602A8B: st_api_make_current (st_manager.c:789)
==27540==    by 0x45406E7: ???

And:

==28351== Invalid write of size 2
==28351==    at 0x4C087CC: _mesa_make_extension_string (string3.h:144)
==28351==    by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351==    by 0x4BD4CAB: st_api_make_current (st_manager.c:789)
==28351==  Address 0x48dd1f3 is 19 bytes inside a block of size 20 alloc'd
==28351==    at 0x4025315: calloc (vg_replace_malloc.c:467)
==28351==    by 0x4C08711: _mesa_make_extension_string (extensions.c:778)
==28351==    by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351==    by 0x4BD4CAB: st_api_make_current (st_manager.c:789)
==28351==
==28351== Invalid read of size 4
==28351==    at 0x4C087EC: _mesa_make_extension_string (extensions.c:806)
==28351==    by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351==    by 0x4BD4CAB: st_api_make_current (st_manager.c:789)
==28351==  Address 0x48dd1f4 is 0 bytes after a block of size 20 alloc'd
==28351==    at 0x4025315: calloc (vg_replace_malloc.c:467)
==28351==    by 0x4C08711: _mesa_make_extension_string (extensions.c:778)
==28351==    by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351==    by 0x4BD4CAB: st_api_make_current (st_manager.c:789)

The first part adds 2, because ' ' and '\0' may be written at the end
of the buffer.
2011-09-10 19:40:36 +02:00