glsl: emit row_major matrix's SSBO stores only for components in writemask
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Wed, 30 Sep 2015 13:03:15 +0000 (15:03 +0200)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 2 Oct 2015 06:34:25 +0000 (08:34 +0200)
commitf42466322a3c6f9dacf17caaf2b8f411e41ba7aa
tree7492ebcdcbb5f219bd21d6b5ea07b4c572e5d3d3
parenta552b77dccacbbf68af3c527273085224b2b4480
glsl: emit row_major matrix's SSBO stores only for components in writemask

When writing to a column of a row-major matrix, each component of the
vector is stored to non-consecutive memory addresses, so we generate
one instruction per component.

This patch skips the disabled components in the writemask, saving some
store instructions plus avoid storing wrong data on each disabled
component.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/glsl/lower_ubo_reference.cpp