summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nvc0/nvc0_program.h
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-04-09 12:00:54 -0400
committerIlia Mirkin <[email protected]>2016-05-11 20:39:27 -0400
commitba3f0b6d5920165c735d51500544da8c29b09060 (patch)
tree1841622f00dda8dcd00a75a86eb89ffa252ecd1b /src/gallium/drivers/nouveau/nvc0/nvc0_program.h
parentf5fe9030021af830e6c4453f4ad1521cbb697c81 (diff)
nvc0: fix gl_SampleMaskIn computation
The SAMPLEMASK semantic should only return the bits set covered by the current invocation. However we were always retrieving the covmask, which returns the covered samples of the whole pixel. When not doing per-sample invocation, this is precisely what we want. However when doing per-sample invocation, we have to select the sampleid'th bit and only return that. Furthermore, this means that we have to have a 1:1 correlation for invocations and samples. This fixes most dEQP-GLES31.functional.shaders.sample_variables.sample_mask_in.* tests. A few failures remain due to disagreements about nr_samples==1 logic as well as what happens with MSAA x2 RTs when the shading fraction is 0.5. Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0/nvc0_program.h')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_program.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.h b/src/gallium/drivers/nouveau/nvc0/nvc0_program.h
index bd852e27c36..08af3c823b8 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.h
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.h
@@ -48,6 +48,7 @@ struct nvc0_program {
uint8_t early_z;
uint8_t colors;
uint8_t color_interp[2];
+ bool sample_mask_in;
bool force_persample_interp;
bool flatshade;
} fp;