Commit Graph

149 Commits

Author SHA1 Message Date
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
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
Ian Romanick
3538bffa72 st/mesa: Remove support for GL_EXT_blend_logic_op
It was broken, and it isn't really useful anyway.

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
Marek Olšák
f37a5081b2 st/mesa: clamp Max program param limits
Setting just MAX_PROGRAM_ENV_PARAMS to 4096 breaks everything,
so let's do this instead.

This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=40767

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-12 16:55:21 +02:00
Marek Olšák
3794291372 gallium: add PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS
v2: remove PIPE_CAP_ARRAY_TEXTURES in favor of the new CAP.
2011-09-10 08:53:29 +02:00
Brian Paul
b94a926f39 st/mesa: init program MaxLocalParams, MaxEnvParams limits
Use the same limit for all parameter classes.
2011-09-09 08:10:50 -06:00
Dave Airlie
f154ac9cc2 mesa/st: add support for 2101010 vertex format conversion.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-06 10:18:18 +01:00
Bryan Cain
4e64cfbb4e mesa: add a UniformBooleanTrue option
Drivers supporting native integers set UniformBooleanTrue to the integer value
that should be used for true when uploading uniform booleans.  This is ~0 for
Gallium and 1 for i965.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-05 19:51:29 -05:00
Dave Airlie
0b666106c5 gallium: add caps for MIN/MAX texel offsets.
As per Brian's suggestion, add caps for drivers that support texture
offsets to advertise a min/max via TGSI, also use it in the state tracker.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-02 10:48:09 +01:00
Bryan Cain
488fe51cf8 mesa: Replace the EmitNoIfs compiler flag with a MaxIfDepth flag.
This is a better, more fine-grained way of lowering if statements.  Fixes the
game And Yet It Moves on nv50.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-08-31 21:49:26 -05:00
Christoph Bumiller
57590e173b st/mesa: determine Const.MaxSamples in init_extensions
v2: Check for non-pow2 sample counts as well.
2011-08-04 15:38:49 +02:00
Bryan Cain
95739f19cc st/mesa: respect force_s3tc_enable environment variable
NOTE: This is a candidate for the 7.10 and 7.11 branches.
2011-07-26 12:54:40 -05:00
Marek Olšák
adea7ea0bc st/mesa: initial ARB_depth_buffer_float support 2011-07-10 21:41:17 +02:00
Marek Olšák
e28e3a774c st/mesa: expose ARB_shader_texture_lod if SM3 is supported
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-13 17:57:56 +02:00
Marek Olšák
a5f0a11477 gallium: implement seamless cubemap extensions
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-05-06 20:06:30 +02:00
Marek Olšák
fdff7e635b st/mesa: expose ARB_ES2_compatibility if GL_FIXED vertex format is supported
Tested with softpipe and llvmpipe.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-30 12:02:01 +02:00
Marek Olšák
e62530a6c0 st/mesa: support EXT_packed_float
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-29 11:31:55 +02:00
Marek Olšák
1da44f5923 st/mesa: support EXT_texture_shared_exponent
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-29 11:31:55 +02:00
Brian Paul
f9cc6acbfa st/mesa: raise shader MaxParameters if driver supports more
The default value is 64 but drivers usually advertise more, like 4096.
Allows ARB vp/fp programs to use more parameters.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2011-04-27 11:58:42 -06:00
Brian Paul
48aa772589 st/mesa: whitespace fixes 2011-04-27 09:05:30 -06:00
Marek Olšák
8e28d842d1 st/mesa: convert Mesa float formats to Gallium
Squashed commit of the following:

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

    st/mesa: require RGBA16F and RGBA32F to be renderable
    st/mesa: fix L32F and L16F format translation
    st/mesa: also convert the R/RG float formats

commit 49a9948b6a81b7d813304d081139d98e95ba5d1a
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Fri Aug 20 10:36:17 2010 +0200

    mesa/st: enable ARB_texture_float if supported formats allow it

commit 7383632f7b6f9021b65f4973b7e7c99f0e8ce9b2
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 24 21:00:46 2010 +0200

    mesa/st: support ARB_texture_float internal formats

commit 7c362cc06982586c2d29fac55f6bcc4bcd1550b5
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 24 21:00:33 2010 +0200

    mesa/st: convert L/A/I floating point formats
2011-04-15 05:08:00 +02:00
Brian Paul
34a5d3b9f4 mesa: plug in new functions for GL_ARB_sampler_objects
Build the new sources, plug the new functions into the dispatch table,
implement display list support.  And enable extension in the gallium
state tracker.
2011-04-10 13:12:49 -06:00
Marek Olšák
8d4ec87d7f gallium: remove PIPE_CAP_VERTEX_COLOR_CLAMP_CONTROL
The vertex color clamp control is a property of an API,
a lot like gl_rasterization_rules.

The state should be set according to the API being implemented, for example:
   OpenGL Compatibility: enabled by default
   OpenGL Core: disabled by default
   D3D11: always disabled

This patch also changes the way ARB_color_buffer_float is advertised.
If no SNORM or FLOAT render target is supported, fragment color clamping
is not required.
2011-03-29 12:50:27 +02:00
Marek Olšák
2af1da1546 gallium: add EXT_texture_snorm support 2011-03-29 12:04:55 +02:00
Luca Barbieri
47e3896dfd gallium: implement clamping controls (ARB_color_buffer_float)
BTW this changes the gallium interface.
Some rather cosmetic changes by Marek.

Squashed commit of the following:

commit 513b37d484f0318311e84bb86ed4c93cdff71f13
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:17:54 2010 +0200

    mesa/st: respect fragment clamping in st_DrawPixels

commit 546a31e42cad459d7a7a10ebf77fc5ffcf89e9b8
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:17:28 2010 +0200

    mesa/st: support fragment and vertex color clamping

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

    mesa/st: expose ARB_color_buffer_float if unclamping is supported

commit d0c5ea11b6f75f3da2f4ca989115f150ebc7cf8d
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 17:53:41 2010 +0200

    mesa/st: use unclamped colors

    This assumes that Gallium is to be interpreted as given drivers the
    responsibility to clamp these colors if necessary.

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

    We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where
    the operation mandates it. (see the removed XXX comment. -Marek)

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

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

    gallium: add color clamping to the interface
2011-03-29 12:04:55 +02:00
Marek Olšák
aea4ed41ed gallium: add texture barrier support to the interface and st/mesa (v2)
v2: change the gallium entry point to texture_barrier.
2011-03-15 15:58:12 +01:00
Marek Olšák
e968975cb5 gallium: remove the geom_flags param from is_format_supported 2011-03-11 21:39:30 +01:00
Marek Olšák
5257a6dbc6 st/mesa: implement ARB_sync
The ServerWaitSync implementation matches Intel's driver.

The extension is advertised when pipe_screen::fence_finish is set.
2011-03-08 23:52:37 +01:00
Marek Olšák
384845f335 st/mesa: add LATC and 3DC support
softpipe passes all tests.
2011-03-08 23:52:37 +01:00
Marek Olšák
95c7881ac8 gallium: split CAP_INSTANCE_DRAWING into INSTANCEID and INSTANCE_DIVISOR
ARB_instanced_arrays is a subset of D3D9.
ARB_draw_instanced is a subset of D3D10.

The point of this change is to allow D3D9-level drivers to enable
ARB_instanced_arrays without ARB_draw_instanced.
2011-03-05 17:40:19 +01:00
Dave Airlie
83ebc01c1d mesa/st: add RGTC format support.
this just adds a format check + format conversion.
2011-02-28 13:35:35 +10:00
José Fonseca
2a2b156ea5 mesa: Remove the DXT compression via blit path.
No longer used.
2011-02-16 16:50:24 +00:00
Dave Airlie
21b0996dfc mesa/st: enable GL_EXT_framebuffer_sRGB
If the formats don't match we need to update the surface with the new
format.

if we can render to SRGB formats, enable the extension

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-10 10:14:27 +10:00
Brian Paul
9b56a2cb62 st/mesa: support for 1D/2D texture arrays 2011-01-25 20:26:22 -07:00
Benjamin Franzke
b066983780 st/mesa: Enable EXT_texture_format_BGRA8888 for gles1/2 2011-01-24 16:41:29 -05:00
Brian Paul
afeebecd95 st/mesa: move PIPE_CAP_INDEP_BLEND_FUNC code 2011-01-17 16:51:12 -07:00
Dave Airlie
527bf67682 gallium: add EXT_texture_sRGB_decode.
This uses a sampler view to access the texture with the alternate format.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-16 12:54:07 +10:00
Brian Paul
74713e2d29 mesa: begin implementation of GL_ARB_draw_buffers_blend 2011-01-15 18:35:39 -07:00
Brian Paul
a6860f0913 st/mesa: GL_ARB_instanced_arrays support 2011-01-15 17:37:41 -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
Vinson Lee
edc09358f7 st/mesa: Include mfeatures.h in files that perform feature tests. 2011-01-09 01:04:19 -08:00
Marek Olšák
73e8a27387 st/mesa: advertise GL_ARB_half_float_pixel
This extension doesn't appear to need any driver-specific parts.
2011-01-04 21:59:56 +01: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
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
9cd277684d st/mesa: GL_ARB_draw_instanced depends on PIPE_CAP_INSTANCED_DRAWING 2010-12-05 13:34:02 -07:00
Brian Paul
c628fd743e mesa: replace #defines with new gl_shader_type enum 2010-11-23 15:52:43 -07:00
Marek Olšák
e7c74a7dfa st/mesa: set MaxUniformComponents
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-11-22 21:44:35 +01:00
Marek Olšák
9aa089eac0 gallium: add PIPE_SHADER_CAP_SUBROUTINES
This fixes piglit/glsl-vs-main-return and glsl-fs-main-return for the drivers
which don't support RET (i915g, r300g, r600g, svga).

ir_to_mesa does not currently generate subroutines, but it's a matter of time
till it's added. It would then break all the drivers which don't implement
them, so this CAP makes sense.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
2010-11-22 12:41:22 +01:00
Marek Olšák
e40a58b7f8 st/mesa: enable ARB_explicit_attrib_location and EXT_separate_shader_objects
Gallium drivers pass all piglit tests for the two (there are 12 tests
for separate_shader_objects and 5 tests for explicit_attrib_location),
and I was told the extensions don't need any driver-specific code.

I made them dependent on PIPE_CAP_GLSL.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-11-21 19:33:45 +01:00
Marek Olšák
cbfdf262cc gallium: add CAPs for indirect addressing and lower it in st/mesa when needed
Required because ATI and NVIDIA DX9 GPUs do not support indirect addressing
of temps, inputs, outputs, and consts (FS-only) or the hw support is so
limited that we cannot use it.

This should make r300g and possibly nvfx more feature complete.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
2010-11-12 03:13:22 +01:00