[Mesa-dev] [PATCH 00/21] Another round of R600 improvements & fixes
maraeo at gmail.com
Wed Feb 29 08:52:53 PST 2012
here's another series of patches for r600g.
These 5 patches are mostly about improving queries:
r600g: move all query code into r600_query.c
r600g: release query buffers in destroy_query
r600g: don't suspend timer queries for u_blitter
r600g: correctly handle queries which don't need begin_query
r600g: remove obsolete todo comments
These make changes to how we use the scissor registers and also fixing GL_RASTERIZER_DISCARD.
r600g: rework scissor for evergreen
r600g: rework scissor for r600-r700
r600g: make some scissor regs invariant on evergreen
r600g: make some scissor regs invariant on r600-r700
r600g: rework rasterizer discard for evergreen
r600g: fix and improve rasterizer discard for r600-r700
Next up are small improvements to texturing. The support for new colorbuffer formats also means blitting is fully accelerated on those (previously it wasn't).
r600g: permit blitting between textures with STREAM and STAGING usage
r600g: remove support for SCALED colorbuffer formats
r600g: add support for missing texture formats
These are mostly improvements to streamout. I am not sure whether VS_GS_OUT_PRIM_TYPE should be initialized, I have done so just to be safe because I am having some issues with streamout.
r600g: if pixel shader is NULL, bind a dummy one
r600g: initialize SX_SURFACE_SYNC
r600g: initialize VS_GS_OUT_PRIM_TYPE
r600g: initialize DB_DEPTH_CONTROL at beginning of CS
winsys/radeon: add usage parameter to cs_is_buffer_referenced
The last 2 patches are the most important, but not yet working very well, so I am not going to push them.
r600g: accelerate buffer copying
r600g: implement wait-free buffer transfer for DISCARD flags
The problem is streamout is not reliable yet. Although all tests for glCopyBufferSubData and all but 2 GL2 transform feedback piglit tests pass, I have seen data corruption and lockups with Wine (even on RV670 and Evergreen, which we thought worked well). Or there might be some other bug that we just uncovered.
Efficient handling of the DISCARD transfer flags is crucial for performance. If those flags are ignored, both the CPU and the GPU may idle in the middle of rendering (because of the GEM_WAIT_IDLE ioctl), which makes every other optimization less useful. I have seen the last patch improve framerate in Wine.
src/gallium/drivers/r300/r300_transfer.c | 2 +-
src/gallium/drivers/r600/eg_sq.h | 2 +-
src/gallium/drivers/r600/evergreen_hw_context.c | 44 +--
src/gallium/drivers/r600/evergreen_state.c | 260 +++++++-----
src/gallium/drivers/r600/evergreend.h | 9 +
src/gallium/drivers/r600/r600.h | 12 -
src/gallium/drivers/r600/r600_asm.c | 2 +-
src/gallium/drivers/r600/r600_blit.c | 82 +++--
src/gallium/drivers/r600/r600_buffer.c | 65 +++-
src/gallium/drivers/r600/r600_hw_context.c | 451 +-------------------
src/gallium/drivers/r600/r600_pipe.c | 32 +-
src/gallium/drivers/r600/r600_pipe.h | 43 ++-
src/gallium/drivers/r600/r600_query.c | 514 +++++++++++++++++++++--
src/gallium/drivers/r600/r600_shader.c | 10 +-
src/gallium/drivers/r600/r600_state.c | 210 ++++++----
src/gallium/drivers/r600/r600_state_common.c | 74 +++-
src/gallium/drivers/r600/r600_texture.c | 17 +-
src/gallium/drivers/r600/r600d.h | 9 +
src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 18 +-
src/gallium/winsys/radeon/drm/radeon_winsys.h | 3 +-
20 files changed, 1096 insertions(+), 763 deletions(-)
More information about the mesa-dev