summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ddebug
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2015-12-09 04:56:15 +0100
committerRoland Scheidegger <[email protected]>2015-12-12 01:59:15 +0100
commitaf7ba989fb5a39925a0a1261ed281fe7f48a16cf (patch)
treec3d27e4eb71b4199b960209a6082ec8a53c85c1e /src/gallium/drivers/ddebug
parent27d5be0b8fafecefc4f0378ca940cea8c0415715 (diff)
llvmpipe: fix layer/vp input into fs when not written by prior stages
ARB_fragment_layer_viewport requires that if a fs reads layer or viewport index but it wasn't output by gs (or vs with other extensions), then it reads 0. This never worked for llvmpipe, and is surprisingly non-trivial to fix. The problem is the mechanism to handle non-existing outputs in draw is rather crude, it will simply redirect them to whatever is at output 0, thus later stages will just get garbage. So, rather than trying to fix this up (which looks non-trivial), fix this up in llvmpipe setup by detecting this case there and output a fixed zero directly. While here, also optimize the hw vertex layout a bit - previously if the gs outputted layer (or vp) and the fs read those inputs, we'd add them twice to the vertex layout, which is unnecessary. And do some minor cleanup, slots don't require that many bits, there was some bogus (but harmless) float/int mixup for psize slot too, make the slots all unsigned (we always put pos at pos zero thus everything else has to be positive if it exists), and make sure they are properly initialized (layer and vp index slot were not which looked fishy as they might not have got set back to zero when changing from a gs which outputs them to one which does not). This fixes the failures in piglit's arb_fragment_layer_viewport group (3 each for layer and vp). Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ddebug')
0 files changed, 0 insertions, 0 deletions