[Mesa-dev] [PATCH 0/6] ARB_color_buffer_float and EXT_texture_snorm

Marek Olšák maraeo at gmail.com
Sun Mar 20 18:12:29 PDT 2011


Hi,

this patch series adds two new OpenGL extensions to Mesa:
- ARB_color_buffer_float, a subset of GL3.0
- EXT_texture_snorm, a part of which is also a subset of GL3.1

The work on ARB_color_buffer_float (it's about clamping controls,
not float buffers) was originally started by Luca Barbieri.
I have taken over his code, fixed some bugs, and added display
list support.

All drivers can implement ARB_color_buffer_float, even those
which only support GL_RGBA8. Such drivers only need to implement
the enable/disable switch of vertex color clamping.

I have implemented EXT_texture_snorm on top of the clamping
controls and they seem important for rendering into signed
normalized textures. I was mainly using the GL3.1 spec, because
the EXT_texture_snorm spec is kinda incomplete.

Some signed normalized formats are already implemented in master,
but the Mesa texstore functions are all broken (probably never
been tested).

Piglit should contain all the necessary tests for both
the extensions. You can test ARB_color_buffer_float with either
RGBA8 or RGBA8_SNORM. I think the RGBA8_SNORM tests cover all
aspects of ARB_color_buffer_float, so we don't actually need
float textures to test it.

softpipe should support SNORM textures just fine but not SNORM
renderbuffers I think. Nevertheless, the renderbuffer support is
not required by the extension.

Please review.

Marek


Luca Barbieri (1):
      gallium: implement clamping controls (ARB_color_buffer_float)

Marek Olšák (5):
      mesa: implement clamping controls (ARB_color_buffer_float)
      mesa: initial EXT_texture_snorm support
      mesa: implement texstore and texfetch hooks for signed normalized formats
      gallium: add EXT_texture_snorm support
      st/mesa: choose an appropriate texture format for DrawPixels

 docs/ARB_color_buffer_float.txt               |    4 +
 src/gallium/auxiliary/util/u_format.csv       |    8 +
 src/gallium/docs/source/cso/rasterizer.rst    |   27 ++
 src/gallium/include/pipe/p_defines.h          |    2 +
 src/gallium/include/pipe/p_format.h           |    9 +
 src/gallium/include/pipe/p_state.h            |    2 +
 src/mapi/glapi/gen/ARB_color_buffer_float.xml |   25 ++
 src/mapi/glapi/gen/Makefile                   |    1 +
 src/mapi/glapi/gen/gl_API.xml                 |    1 +
 src/mesa/drivers/dri/i915/i915_fragprog.c     |    2 +-
 src/mesa/drivers/dri/i965/brw_program.c       |    2 +-
 src/mesa/main/api_exec.c                      |    2 +
 src/mesa/main/attrib.c                        |   21 +-
 src/mesa/main/blend.c                         |   37 ++-
 src/mesa/main/clear.c                         |   20 +-
 src/mesa/main/colortab.c                      |    7 +-
 src/mesa/main/dlist.c                         |   27 ++
 src/mesa/main/extensions.c                    |    4 +-
 src/mesa/main/fbobject.c                      |   38 +++-
 src/mesa/main/ff_fragment_shader.cpp          |    4 +-
 src/mesa/main/fog.c                           |    5 +
 src/mesa/main/formats.c                       |  100 +++++++-
 src/mesa/main/formats.h                       |   15 +-
 src/mesa/main/get.c                           |   45 ++++-
 src/mesa/main/image.c                         |   28 ++-
 src/mesa/main/macros.h                        |    3 +-
 src/mesa/main/mtypes.h                        |   22 ++-
 src/mesa/main/pack.c                          |   11 -
 src/mesa/main/state.c                         |   40 +++-
 src/mesa/main/texenv.c                        |   21 +-
 src/mesa/main/texfetch.c                      |   86 ++++++--
 src/mesa/main/texfetch_tmp.h                  |  227 ++++++++++++++++--
 src/mesa/main/texformat.c                     |   49 +++--
 src/mesa/main/teximage.c                      |   31 +++-
 src/mesa/main/texparam.c                      |   21 ++-
 src/mesa/main/texstore.c                      |  319 ++++++++++++++++++-------
 src/mesa/main/version.c                       |    3 +
 src/mesa/program/arbprogparse.c               |    5 +-
 src/mesa/program/prog_statevars.c             |   32 +++-
 src/mesa/program/prog_statevars.h             |    1 +
 src/mesa/program/programopt.c                 |    5 +-
 src/mesa/program/programopt.h                 |    2 +-
 src/mesa/state_tracker/st_atom_blend.c        |    2 +-
 src/mesa/state_tracker/st_atom_depth.c        |    2 +-
 src/mesa/state_tracker/st_atom_rasterizer.c   |    8 +-
 src/mesa/state_tracker/st_cb_clear.c          |    4 +-
 src/mesa/state_tracker/st_cb_drawpixels.c     |   47 ++++-
 src/mesa/state_tracker/st_cb_readpixels.c     |    7 +-
 src/mesa/state_tracker/st_extensions.c        |   13 +
 src/mesa/state_tracker/st_format.c            |  232 ++++++++++++++++++-
 50 files changed, 1392 insertions(+), 237 deletions(-)
 create mode 100644 docs/ARB_color_buffer_float.txt
 create mode 100644 src/mapi/glapi/gen/ARB_color_buffer_float.xml


More information about the mesa-dev mailing list