[Mesa-dev] [PATCH 00/20] MSAA support for Radeon SI and more

Marek Olšák maraeo at gmail.com
Wed Aug 7 17:21:01 PDT 2013


Hi everyone,

This is MSAA support for the radeonsi driver. It implements MSAA rendering, texturing, and colorbuffer compression. The only missing feature is the MSAA fast color clear; other than that, it operates at maximum performance the hardware is capable of.

I have some patches for the LLVM shader backend this work depends on. I'll send them soon.

In order to support texturing with compressed colorbuffers on SI, a special FMASK texture which holds colorbuffer compression data has to be bound to a shader, which means shaders must support 16 FMASK textures in addition to 16 textures exposed to OpenGL. I came up with a new mechanism for setting up shader resource descriptors specifically for FMASK, because the current mechanism doesn't allow fine-grained resource updates. The descriptors are stored in a buffer and updated using the WRITE_DATA packet, and the state management is pretty much the same as in r600g - it's based on r600_atom. There's more info about why this is a lot better in the commit that adds it. I think we could eventually use it for all shader resources and sampler states.

There are also some minor changes which are not related to MSAA. Also the whole r600_texture.c file from r600g is ported to radeonsi.

Patches 1-2:
One fix for TGSI and a small addition to tgsi_shader_info.

Patches 3-7:
Small cleanups of the radeonsi driver.

Patches 8-18:
These are the MSAA patches.

Patches 19-20:
Small unrelated radeonsi fixes.

 src/gallium/auxiliary/tgsi/tgsi_scan.c         |  13 ++
 src/gallium/auxiliary/tgsi/tgsi_scan.h         |   1 +
 src/gallium/auxiliary/tgsi/tgsi_util.c         |   4 +-
 src/gallium/drivers/r600/r600_blit.c           |   3 -
 src/gallium/drivers/r600/r600_texture.c        |   3 +-
 src/gallium/drivers/radeonsi/Makefile.sources  |   1 +
 src/gallium/drivers/radeonsi/r600_blit.c       | 327 +++++++++++++++++++++++++-----
 src/gallium/drivers/radeonsi/r600_hw_context.c |  22 +++
 src/gallium/drivers/radeonsi/r600_resource.h   |  38 +++-
 src/gallium/drivers/radeonsi/r600_texture.c    | 649 ++++++++++++++++++++++++++++++++++++++++--------------------
 src/gallium/drivers/radeonsi/radeonsi_pipe.c   |  28 +--
 src/gallium/drivers/radeonsi/radeonsi_pipe.h   |  40 +++-
 src/gallium/drivers/radeonsi/radeonsi_pm4.c    |   7 +
 src/gallium/drivers/radeonsi/radeonsi_pm4.h    |   2 +
 src/gallium/drivers/radeonsi/radeonsi_shader.c | 164 ++++++++++++---
 src/gallium/drivers/radeonsi/radeonsi_shader.h |  60 +++---
 src/gallium/drivers/radeonsi/radeonsi_uvd.c    |  12 +-
 src/gallium/drivers/radeonsi/si_commands.c     |   9 +
 src/gallium/drivers/radeonsi/si_descriptors.c  | 188 ++++++++++++++++++
 src/gallium/drivers/radeonsi/si_state.c        | 511 +++++++++++++++++++++++++++++++++++++++++------
 src/gallium/drivers/radeonsi/si_state.h        |  52 ++++-
 src/gallium/drivers/radeonsi/si_state_draw.c   |  55 +++++-
 src/gallium/drivers/radeonsi/sid.h             |  11 ++
 23 files changed, 1766 insertions(+), 434 deletions(-)

Please review.

Marek


More information about the mesa-dev mailing list