Commit Graph

414 Commits

Author SHA1 Message Date
Marek Olšák
2a5cbc5306 mesa: fix a valgrind warning
==5715== Invalid read of size 4
==5715==    at 0x4AA590B: _mesa_make_extension_string (extensions.c:908)
==5715==    by 0x4A83198: _mesa_make_current (context.c:1514)
==5715==    by 0x4A71CAB: st_api_make_current (st_manager.c:789)
==5715==  Address 0x4795730 is 0 bytes inside a block of size 1 alloc'd
==5715==    at 0x4025315: calloc (vg_replace_malloc.c:467)
==5715==    by 0x4AA5B4C: _mesa_make_extension_string (extensions.c:772)
==5715==    by 0x4A83198: _mesa_make_current (context.c:1514)
==5715==    by 0x4A71CAB: st_api_make_current (st_manager.c:789)
2011-09-10 15:12:54 +02:00
Ian Romanick
eba527bf9f mesa: Remove API facing bits of EXT_paletted_texture and EXT_shared_texture_palette
This was also discussed at XDS 2010.  However, actually making the
change was delayed because several drivers still exposed these
extensions to significant benefit (e.g., tdfx).  Now that those
drivers have been removed, this code can be removed as well.

v2: A lot of bits that were missed in the previous patch have been removed.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:08:25 -07:00
Kenneth Graunke
b9eb4d8a59 glsl: Implement the GL_ARB_conservative_depth extension.
It's the same as GL_AMD_conservative_depth.  The specs have slight
differences in wording, but don't differ in content or behavior.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-08-25 08:07:21 -07:00
Andreas Faenger
8a98aabe0b swrast: anisotropic filtering extension
Anisotropic filtering extension for swrast intended to be used by osmesa
to create high quality renderings.
Based on Higher Quality Elliptical Weighted Avarage Filter (EWA).
A 2nd implementation using footprint assembly is also provided.

Signed-off-by: Brian Paul <brianp@vmware.com>
2011-05-18 08:14:33 -06:00
Kenneth Graunke
1d4eb8d5d8 mesa: Add ARB_shader_texture_lod to the extension list; off by default.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-09 11:23:54 -07:00
Marek Olšák
a19c42ffc6 mesa: implement AMD_seamless_cubemap_per_texture 2011-05-06 20:06:30 +02:00
Marek Olšák
5ba2e7adf0 mesa: implement AMD_shader_stencil_export
It's just an alias of the ARB variant with some GLSL compiler changes.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-05-03 12:03:22 +02:00
Marek Olšák
a677952e68 mesa: make AMD_draw_buffers_blend an alias of the ARB variant
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-05-03 00:35:50 +02:00
Marek Olšák
9d7698c468 mesa: implement EXT_texture_shared_exponent
swrast support done.

There is no renderbuffer support in swrast, because it's not required
by the extension.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-29 11:31:55 +02:00
Brian Paul
6b329b9274 Squashed commit of the following:
commit 864fe253b04105b7469e5f7b064dc37637b944f8
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Apr 21 20:13:07 2011 -0600

    mesa: s/exec/disp/ in _mesa_init_histogram_dispatch()

    This function isn't normally compiled (FEATURE_histogram).

commit f4bf45e2b94b582cacd19cdca873c5be627e4250
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:58 2011 -0600

    mesa: hook up GL_ARB_robustness dispatch functions

    ...and advertise the extension.

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 2b89e38e5f572dc40cebc06381ae7c5d04386998
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:58 2011 -0600

    mesa: regenerated API files for GL_ARB_robustness

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 5d5ebfb7135cec9d833adef86cbf4d0f3d9beca8
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    glapi: add ARB_robustness xml

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 0159d1d6d99f4bbc18381dc2081c20d3aff17ac9
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: implement GL_ARB_robustness functions

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 938fd71f4c4742f274922d53492a7290ab8d9c9b
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: add context fields for GL_ARB_robustness

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 72075137bc79e65be03dac7e97b6dba93c3a86a4
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: standardize more bounds-checking error messages

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 32a3fc23746db49da903fbc08afa0135af3007d2
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: standardize some bounds-checking error messages

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit cecbf1f4d164207de373dec0cadee2e84e1f9656
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: add more bounds-checking support for client memory buffers

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit edc895b52383d5bd274422db56adead1d81daf5f
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: add bounds-checking support for client memory buffers

    Signed-off-by: Brian Paul <brianp@vmware.com>

commit 3a96ef28a538f158a219b406cd090dee70470c85
Author: nobled <nobled@dreamwidth.org>
Date:   Thu Apr 21 07:53:57 2011 -0600

    mesa: use is_bufferobj() helper function

    Signed-off-by: Brian Paul <brianp@vmware.com>
2011-04-26 14:54:41 -06:00
Marek Olšák
15f99d1362 mesa: finish up ARB_texture_float
Squashed commit of the following:

Author: Marek Olšák <maraeo@gmail.com>

    mesa: handle floating-point formats in _mesa_base_fbo_format
    mesa: add ARB/ATI_texture_float, remove MESAX_texture_float

commit 123bb110852739dffadcc81ad80b005b1c4f586d
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Wed Aug 25 01:35:42 2010 +0200

    mesa: compute floatMode for FBOs and return it on RGBA_FLOAT_MODE
2011-04-15 05:08:00 +02:00
Eric Anholt
a9a02c8a39 mesa: Expose ATI_draw_buffers.
This is the same as ARB_draw_buffers (which derived from it), except
for s/ARB/ATI/.  The glapi bits were already in place, and what was
missing was just the ARB_fp part.  The new Humble Bundle game "trine"
tries to use this extension without checking that it's exposed, which
this works around.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36182
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-04-13 18:07:32 -07:00
Vinson Lee
8800a798d1 mesa: Fix allocation size of extension_indices array.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-06 16:14:22 -07:00
Marek Olšák
0be369975f mesa: initial EXT_texture_snorm support
The component ordering of some formats has been been reversed to match
Gallium types.
2011-03-29 12:04:55 +02:00
Marek Olšák
e5c6a92a12 mesa: implement clamping controls (ARB_color_buffer_float)
Squashed commit of the following:

Author: Marek Olšák <maraeo@gmail.com>

    mesa: fix getteximage so that it doesn't clamp values
    mesa: update the compute_version function
    mesa: add display list support for ARB_color_buffer_float
    mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float

commit b2f6ddf907935b2594d2831ddab38cf57a1729ce
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 31 16:50:57 2010 +0200

    mesa: document known possible deviations from ARB_color_buffer_float

commit 5458935be800c1b19d1c9d1569dc4fa30a97e8b8
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 24 21:54:56 2010 +0200

    mesa: expose GL_ARB_color_buffer_float

commit aef5c3c6be6edd076e955e37c80905bc447f8a82
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:12:34 2010 +0200

    mesa, mesa/st: handle read color clamping properly

    (I'll squash the st/mesa part to a separate commit. -Marek)

    We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where
    the operation mandates it.

    TODO: did I get the set of operations mandating it right?

commit 3a9cb5e59b676b6148c50907ce6eef5441677e36
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:09:41 2010 +0200

    mesa: respect color clamping in texenv programs (v2)

    Changes in v2:
    - Fix attributes other than vertex color sometimes getting clamped

commit de26f9e47e886e176aab6e5a2c3d4481efb64362
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:05:53 2010 +0200

    mesa: restore color clamps on glPopAttrib

commit a55ac3c300c189616627c05d924c40a8b55bfafa
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:04:26 2010 +0200

    mesa: clamp color queries if and only if fragment clamping is enabled

commit 9940a3e31c2fb76cc3d28b15ea78dde369825107
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Wed Aug 25 00:00:16 2010 +0200

    mesa: introduce derived _ClampXxxColor state resolving FIXED_ONLY

    To do this, we make ClampColor call FLUSH_VERTICES with the appropriate
    _NEW flag.

    We introduce _NEW_FRAG_CLAMP since fragment clamping has wide-ranging
    effects, despite being in the Color attrib group.

    This may be easily changed by s/_NEW_FRAG_CLAMP/_NEW_COLOR/g

commit 6244c446e3beed5473b4e811d10787e4019f59d6
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 17:58:24 2010 +0200

    mesa: add unclamped color parameters
2011-03-29 12:04:55 +02:00
Brian Paul
e4852ae4d2 mesa: minor whitespace fixes 2011-03-24 13:38:27 -06:00
Brian Paul
82dd62fb22 mesa: new MESA_EXTENSION_MAX_YEAR env var
If set to year X, only report extensions up to that year.  This is a
work-around for games that try to copy the extensions string to a fixed
size buffer and overflow.  If a game was released in year X, setting
MESA_EXTENSION_MAX_YEAR to that year will likely fix the problem.
2011-03-24 11:39:23 -06:00
José Fonseca
8767fe2437 mesa: Sort extensions in extension string by year.
The years were obtained automatically by scraping the first year from
the spec text file.  They are approximate.
2011-03-16 11:38:53 +00:00
Marek Olšák
867f9b07d4 mesa: add NV_texture_barrier 2011-03-15 15:47:27 +01:00
Marek Olšák
69f16accd0 mesa: add ATI_texture_compression_3dc
LUMINANCE_ALPHA_LATC2 = LUMINANCE_ALPHA_3DC, so this is easy.

Note that there is no specification for 3DC, just a few white papers
from ATI.
2011-03-08 23:52:37 +01:00
Marek Olšák
7d16e2c0cd mesa: add EXT_texture_compression_latc
The encoding/decoding algorithms are shared with RGTC.
Thanks to some magic with the base format, the RGTC texstore functions work
for LATC too.

swrast passes the related piglit tests besides two things:
- The alpha channel is wrong (it's always 1), however the incorrect alpha
  channel makes some other tests fail too, so I guess it's unrelated to LATC.
- Signed LATC fetches aren't correct yet (signed values are clamped to [0,1]),
  however RGTC has the same problem.

Further testing (with other of my patches) shows that hardware drivers
and softpipe work.

BTW, ETQW uses this extension.
2011-03-08 23:52:37 +01:00
Brian Paul
9d20849516 mesa: remove GL_SGI_texture_color_table support
It was only implemented in the swrast driver and probably not used by
any applications.  A modern app would use a dependent/chained texture
lookup in the fragment shader.
2011-02-28 18:24:30 -07:00
Kenneth Graunke
0a163cf56d glsl: Enable GL_OES_texture_3D extension for ES2. 2011-02-28 10:35:57 -08:00
Dave Airlie
903726d285 swrast: add RGTC support 2011-02-28 13:35:35 +10:00
Chad Versace
c494763579 mesa: Fix available APIs for AMD_conservative_depth
Remove ES2, since AMD_conservative_depth is not listed in the OpenGL ES
extension registry.
2011-01-28 11:19:51 -08:00
Zack Rusin
59dbdbbb7d mesa: fix compilation
this isn't c++ please don't mix declerations with code
2011-01-26 21:20:53 -05:00
Chad Versace
ad3dc370d8 mesa: Allow extensions in MESA_EXTENSION_OVERRIDE to be prefixed with '+'
If an extension is prefixed with '+', attempt to enable it.  This
introduces symmetry with the prefix '-', which is already allowed.
2011-01-26 16:37:45 -08:00
Chad Versace
7cbcf4c583 mesa: Simplify logic in get_extension_override()
* Reduce max indentation level from 7 to 3.
* Eliminate counter variables.
* Remove function append().
2011-01-26 16:37:45 -08:00
Chad Versace
1aeecaa433 mesa: Add AMD_conservative_depth to extension list
The extension is off by default.

First in a patchset that implements support for AMD_conservative_depth in
the compiler.
2011-01-26 16:37:44 -08:00
Marek Olšák
f154cd2315 mesa: add ARB_framebuffer_sRGB as alias of the EXT variant
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-01-23 20:59:46 +01:00
Dave Airlie
edc2dd8e47 mesa/swrast: implement EXT_texture_sRGB_decode
This implements the extension by choosing a different set of texture
fetch functions when the texture parameter changes.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-16 12:54:06 +10:00
Brian Paul
74713e2d29 mesa: begin implementation of GL_ARB_draw_buffers_blend 2011-01-15 18:35:39 -07:00
Brian Paul
652901e95b Merge branch 'draw-instanced'
Conflicts:
	src/gallium/auxiliary/draw/draw_llvm.c
	src/gallium/drivers/llvmpipe/lp_state_fs.c
	src/glsl/ir_set_program_inouts.cpp
	src/mesa/tnl/t_vb_program.c
2011-01-15 10:24:08 -07:00
Eric Anholt
9c6954fc9d mesa: Add extension enable bit for GL_ARB_ES2_compatibility. 2011-01-14 15:28:50 -08:00
Chad Versace
78838b2d1b mesa: Change OES_standard_derivatives to be stand-alone extension
Add a bit in struct gl_extensions for OES_standard_derivatives, and enable
the bit by default. Advertise the extension only if the bit is enabled.

Previously, OES_standard_derivatives was advertised in GLES2 contexts
if ARB_framebuffer_object was enabled.
2011-01-13 17:26:28 -08:00
Vinson Lee
31b1051663 mesa: Move loop variable declarations outside for loop in extensions.c.
Fixes MSVC build.
2011-01-12 17:43:28 -08:00
Vinson Lee
356e2e962f mesa: Move declaration before code in extensions.c.
Fixes SCons build.
2011-01-12 16:23:11 -08:00
Chad Versace
a7b5664c05 mesa: Change OES_point_sprite to depend on ARB_point_sprite
The extension string in GLES1 contexts always advertised
GL_OES_point_sprite. Now advertisement depends on ARB_point_sprite being
enabled.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
2011-01-12 15:45:03 -08:00
Chad Versace
039150169e mesa: Change dependencies of some OES extension strings
Change all OES extension strings that depend on ARB_framebuffer_object to
instead depend on EXT_framebuffer_object.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
2011-01-12 15:45:03 -08:00
Chad Versace
19418e921a mesa: Add/remove extensions in extension string
Add GL_OES_stencil8 to ES2.

Remove the following:
   GL_OES_compressed_paletted_texture : ES1
   GL_OES_depth32                     : ES1, ES2
   GL_OES_stencil1                    : ES1, ES2
   GL_OES_stencil4                    : ES1, ES2
Mesa advertised these extensions, but did not actually support them.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
2011-01-12 15:45:03 -08:00
Chad Versace
9b260c377f mesa: Refactor handling of extension strings
Place GL, GLES1, and GLES2 extensions in a unified extension table. This
allows one to enable, disable, and query the status of GLES1 and GLES2
extensions by name.

When tested on Intel Ironlake, this patch did not alter the extension
string [as given by glGetString(GL_EXTENSIONS)] for any API.

Reviewed-by: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-01-12 15:45:03 -08:00
Vinson Lee
db61b9ce39 mesa: Directly include mfeatures.h in files that perform feature tests. 2011-01-07 00:13:00 -08:00
Dave Airlie
ff7aa554a1 mesa/swrast/st: add ARB_occlusion_query2 support.
This gets my vote for most pointless extension of all time, I'm guessing
some driver could possibly optimise for this instead of counting it might
just get a true/false, but I'm not really sure.

need this to eventually advertise 3.3 despite its total uselessness.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-18 17:33:25 +10:00
Kenneth Graunke
d0f8eea9a0 Remove OES_compressed_paletted_texture from the ES2 extension list.
We don't support it.
2010-12-16 17:40:50 -08:00
Brian Paul
bb7c2691d2 mesa, st/mesa: disable GL_ARB_geometry_shader4
The new GLSL compiler doesn't support geom shaders yet so disable the
GL_ARB_geometry_shader4 extension.  Undo this when geom shaders work again.

NOTE: This is a candidate for the 7.10 branch.
2010-12-13 17:02:48 -07:00
Brian Paul
b7c38734c9 mesa: enable GL_ARB_draw_instanced for software drivers 2010-12-10 09:29:41 -07:00
Chia-I Wu
d2028ba339 mesa: Do not advertise GL_OES_texture_3D.
GL_OES_texture_3D has a GLSL counterpart.  Since it is not implemented,
GL_OES_texture_3D should not be advertised.
2010-12-08 22:35:40 +08:00
Brian Paul
22c7a69d7b mesa: add extension table entry for GL_EXT_gpu_shader4 2010-10-28 21:17:42 -06:00
Ian Romanick
f48915ec52 swrast: Enable GL_EXT_separate_shader_objects in software paths 2010-10-27 13:35:53 -07:00
Ian Romanick
b97794c041 mesa: Add infrastructure to track GL_EXT_separate_shader_objects 2010-10-27 13:35:53 -07:00