[Mesa-dev] [PATCH 00/14] swr: resource-related (and misc) fixes

Ilia Mirkin imirkin at alum.mit.edu
Sat Nov 12 23:00:25 UTC 2016

This is a bit of a hodge-podge, but largely related to improving texture
resource manipulation - mapping, texturing, rendering, etc. There's a WIP
commit at the end which was required to make swr not crash on piglit exit
half the time, but I think it needs to be redone in a proper way.

The meat is in the "swr: rework resource layout and surface setup" commit.
This redoes surface layout for swr to match with the rasterizer's
expectations. This way we can tell it which array index or LOD to render to.
This will also be important for layered rendering when GS support comes
along. It also paves the way to supporting the swr backend's tiling to
improve cache performance.

Unfortunately it does mean more overhead for all textures, not just the
renderable ones. I thought this was acceptable, as supporting multiple
different layout mechanisms seems a little confusing.

This series overall fixes ~600 piglit tests. You can see this series (+ one
more commit that's not really ready) at


I highly recommend testing this in your higher-core/higher-perf environments
than my desktop SKL (or, *gasp*, SDE on a Core i7-920).

Ilia Mirkin (14):
  swr: [rasterizer memory] add support for R32_FLOAT_X8X24 formats
  swr: [rasterizer memory] round up when dividing by block sizes
  swr: [rasterizer memory] fix store tile for 128-bit ymajor tiling
  swr: [rasterizer jitter] don't bother quantizing unused channels
  swr: add archrast generated files to gitignore
  swr: fix texture layout for compressed formats
  swr: mark both frag and vert textures read, don't forget about cbs
  swr: no support for shader stencil export
  swr: mark rgb9_e5 as unrenderable
  swr: disable blending for integer formats
  swr: rework resource layout and surface setup
  swr: remove unnecessary -1 entries in format mapping table
  swr: remove formats from mapping table that don't have StoreTile impls
  WIP swr: make sure that all rendering is finished on shader destroy

 src/gallium/drivers/swr/.gitignore                 |   4 +
 .../drivers/swr/rasterizer/jitter/blend_jit.cpp    |   2 +-
 .../drivers/swr/rasterizer/memory/LoadTile.h       |   1 +
 .../drivers/swr/rasterizer/memory/StoreTile.h      |   3 +-
 .../swr/rasterizer/memory/TilingFunctions.h        |  15 +-
 src/gallium/drivers/swr/swr_context.cpp            | 108 ++++--
 src/gallium/drivers/swr/swr_draw.cpp               |   4 +-
 src/gallium/drivers/swr/swr_resource.h             |   8 +-
 src/gallium/drivers/swr/swr_screen.cpp             | 397 +++++++++------------
 src/gallium/drivers/swr/swr_shader.cpp             |  28 +-
 src/gallium/drivers/swr/swr_state.cpp              | 197 ++++++----
 11 files changed, 433 insertions(+), 334 deletions(-)


More information about the mesa-dev mailing list