i965: Add optimization pass to let us use the replicate data message

Graphics / Mesa 3D Graphics Library / Mesa - Kristian Høgsberg [bitplanet.net] - 15 August 2014 13:25 UTC

The data port has a SIMD16 'replicate data' message, which lets us write the same color for all 16 pixels by sending the four floats in the lower half of a register instead of sending 4 times 16 identical component values in 8 registers.

The message comes with a lot of restrictions and could be made generally useful by recognizing when those restriction are satisfied. For now, this lets us enable the optimization when we know it's safe, but we don't enable it by default. The optimization works for simple color clear shaders only, but does recognized and support multiple render targets.

f9dc7aa i965: Add optimization pass to let us use the replicate data message
src/mesa/drivers/dri/i965/brw_context.h | 1 +
src/mesa/drivers/dri/i965/brw_defines.h | 1 +
src/mesa/drivers/dri/i965/brw_fs.cpp | 97 ++++++++++++++++++++++++
src/mesa/drivers/dri/i965/brw_fs.h | 3 +
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 5 +-
5 files changed, 106 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share