[Mesa-dev] [PATCH 0/2] Add a SSBO load optimization pass

Iago Toral Quiroga itoral at igalia.com
Tue Oct 20 00:11:15 PDT 2015


The general idea of this optimization is explained in the commit log of
the first patch, but it basically allows to re-use the results of previous
SSBO loads in situations that should be safe instead of issuing a new
SSBO load every time.

Makes the following shader:

buffer SSBO {
    mat4 sm4;
};

uniform mat4 um4;

void main() {
    sm4 *= um4;
}

Go from 16 SSBO loads to only 4.

I have not seen any regressions in piglit or dEQP's SSBO functional
tests.

Jordan: hopefully this is enough to fix that CTS test that was producing
spilling issues for you. Notice that this does not address the core problem
there (hopefully Curro's patches will address that), but it helps and if
nothing else, it should improve SSBO performance.

Iago Toral Quiroga (2):
  glsl: Implement a SSBO load optimization pass
  i965: Use the ssbo load cache optimization

 src/glsl/Makefile.sources              |   1 +
 src/glsl/ir_optimization.h             |   1 +
 src/glsl/opt_ssbo_load.cpp             | 338 +++++++++++++++++++++++++++++++++
 src/mesa/drivers/dri/i965/brw_link.cpp |   5 +
 4 files changed, 345 insertions(+)
 create mode 100644 src/glsl/opt_ssbo_load.cpp

-- 
1.9.1



More information about the mesa-dev mailing list