Commit Graph

176 Commits

Author SHA1 Message Date
Marek Olšák
df809ae923 mesa: add const flags to skip MaxVarying and MaxUniform linker checks (v2)
This is only temporary until a better solution is available.

v2: print warnings and add gallium CAPs

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-12-13 17:49:00 +01:00
Marek Olšák
1ded658ce0 st/mesa: add color varyings to MaxVarying
The linker now adds color varyings to the number of used varyings and checks
against that limit.

NOTE: This is a candidate for the 7.11 branch.
2011-12-12 08:04:51 +01:00
Chia-I Wu
cde6c91fd5 st/mesa: add support for GL_OES_compressed_ETC1_RGB8_texture
Have st/mesa recognize MESA_FORMAT_ETC1_RGB8 then we are good to advertise the
extension.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-12-02 08:43:46 +08:00
Brian Paul
15245cbad4 st/mesa: fix indentation 2011-11-30 07:09:46 -07:00
Dave Airlie
9f9c8592e6 st/mesa: add ARB_texture_rgb10_a2ui support
Add support to the state tracker format and extension enablement code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-28 09:40:53 +00:00
Marek Olšák
bb71f9249a gallium: separate out floating-point CAPs into its own enum
The motivation behind this is to add some self-documentation in the code
about how each CAP can be used.

The idea is:
- enum pipe_cap is only valid in get_param
- enum pipe_capf is only valid in get_paramf

Which CAPs are floating-point have been determined based on how everybody
except svga implemented the functions. svga have been modified to match all
the other drivers.

Besides that, the floating-point CAPs are now prefixed with PIPE_CAPF_.
2011-11-22 20:56:50 +01:00
Marek Olšák
2a0126932b gallium: remove PIPE_CAP_GLSL and enable GLSL unconditionally
Only i965g does not enable GLSL, but that driver has been unmaintained and
bitrotting for quite a while anyway.
2011-11-22 20:56:50 +01:00
Marek Olšák
d2633af696 st/mesa: set geometry shader to NULL when doing internal drawing
The code expects the geometry shader to be NULL.
We don't have geometry shaders now, but it's good to be prepared.

v2: check for support in the cso context
2011-11-04 23:01:47 +01:00
Chia-I Wu
8cd0873d31 st/mesa: add support for GL_OES_EGL_image_external
To pipe drivers, external textures are just 2D textures.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-03 15:09:45 +08:00
Nicholas Miell
64cebb6c83 st/mesa: Enable NV_fog_distance for Gallium drivers
The fixed-function generated vertex program is all that's needed for
Gallium drivers.
2011-11-01 11:37:11 +01:00
Brian Paul
e0a0496971 st/mesa: implement GL_ARB_texture_storage 2011-10-31 10:52:57 -06:00
Eric Anholt
9c4b025287 mesa: Fold gallium's texture border stripping into a core Mesa option.
We wanted to reuse this in the Intel driver.

v2: Move the flag to ctx->Const

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-26 12:42:17 -07:00
Jakob Bornecrantz
72bd2b603b st/mesa: Implement primitive restart in software 2011-10-19 10:10:12 -06:00
Dave Airlie
866f9b18c6 gallium: rename ZS stencil type to UINT (v2)
these are never USCALED, always UINT in reality.

taken from some work by Christoph Bumiller

v2: fixup formatting of table + tabs

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-11 16:13:29 +01: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
Marek Olšák
ba89086e79 gallium: add PIPE_CAP_TEXTURE_BARRIER
Same issue as with conditional_render.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-30 23:19:52 +02:00
Marek Olšák
3d13b081c7 gallium: add PIPE_CAP_CONDITIONAL_RENDER
We were checking whether render_condition is set. That was not reliable,
because it's always set with trace and noop regardless of driver support.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-30 23:19:52 +02:00
Marek Olšák
f5bfe54a34 gallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS
This removes:
- PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS
- PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS
in favor of the that new per-shader cap.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-30 23:19:52 +02: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
Brian Paul
3bb41e7b2d st/mesa: include version.h and fix _mesa_override_glsl_version() call 2011-09-28 13:17:11 -06:00
Chad Versace
a1eff5570f mesa: Allow overriding GLSL version with environment variable
Override the context's GLSL version if the environment variable
MESA_GLSL_VERSION_OVERRIDE is set. Valid values for
MESA_GLSL_VERSION_OVERRIDE are integers, such as "130".

MESA_GLSL_VERSION_OVERRIDE has the same behavior as INTEL_GLSL_VERSION,
except that it applies to all drivers, not just Intel's. Since the former
supercedes the latter, this patch disables the latter.

Reviewed-by: Dave Airlie <airlied@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-09-28 11:29:52 -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
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