Commit Graph

137 Commits

Author SHA1 Message Date
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
Brian Paul
053875a8b1 st/mesa: support for primitive restart 2010-10-21 19:03:38 -06:00
Kristian Høgsberg
f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Dave Airlie
5f612f5c00 st/mesa: enable stencil shader export extension if supported 2010-10-13 09:30:05 +10:00
Dave Airlie
71a079fb4e mesa/st: initial attempt at RG support for gallium drivers
passes all piglit RG tests with softpipe.
2010-10-02 17:03:15 +10:00
Eric Anholt
73578ba9c4 mesa: Remove SGI_color_matrix.
Another optional ARB_imaging subset extension.
2010-09-23 13:25:45 -07:00
Brian Paul
e7087175f8 mesa: don't advertise bogus GL_ARB_shading_language_120 extension
Instead of using the invalid GL_ARB_shading_language_120 extension to
determine the GLSL version, use a new ctx->Const.GLSLVersion field.
Updated the intel and r600 drivers, but untested.

See fd.o bug 29910

NOTE: This is a candidate for the 7.9 branch (but let's wait and see if
there's any regressions).
2010-09-21 18:13:04 -06:00
Vinson Lee
9f7f7b3ff8 mesa/st: Silence uninitialized variable warning. 2010-09-15 18:47:17 -07:00
Luca Barbieri
fbc7c9b7a9 mesa/st: ask GLSL to not emit noise since we have a dummy implementation
Note, BTW, that the Gallium implementation returns 0.5, which seems
to violate the GLSL spec, where it should return 0.0 instead.

Not sure whether changing it to 0 is correct or not.
2010-09-14 06:08:03 +02:00
Luca Barbieri
b37459388b mesa/st: set compiler options based on Gallium shader caps
This turns on if conversion and unlimited loop unrolling if control
flow is not supported.

NOTE: this will change the behavior of r300g and any other driver
that doesn't advertise control flow
2010-09-14 06:08:03 +02:00
Luca Barbieri
a508d2dddc gallium: introduce get_shader_param (ALL DRIVERS CHANGED) (v3)
Changes in v3:
- Also change trace, which I forgot about

Changes in v2:
- No longer adds tessellation shaders

Currently each shader cap has FS and VS versions.

However, we want a version of them for geometry, tessellation control,
and tessellation evaluation shaders, and want to be able to easily
query a given cap type for a given shader stage.

Since having 5 duplicates of each shader cap is unmanageable, add
a new get_shader_param function that takes both a shader cap from a
new enum and a shader stage.

Drivers with non-unified shaders will first switch on the shader
and, within each case, switch on the cap.

Drivers with unified shaders instead first check whether the shader
is supported, and then switch on the cap.

MAX_CONST_BUFFERS is now per-stage.
The geometry shader cap is removed in favor of checking whether the
limit of geometry shader instructions is greater than 0, which is also
used for tessellation shaders.

WARNING: all drivers changed and compiled but only nvfx tested
2010-09-14 06:07:41 +02:00
Luca Barbieri
e591c4625c glsl: add several EmitNo* options, and MaxUnrollIterations
This increases the chance that GLSL programs will actually work.

Note that continues and returns are not yet lowered, so linking
will just fail if not supported.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-09-08 20:36:37 -07:00
Luca Barbieri
6d3a2c97f4 glsl: make compiler options per-target
This allows us to specify different options, especially useful for chips
without unified shaders.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-09-08 20:36:37 -07:00