summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_blend.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2014-01-06 18:45:49 +0000
committerJosé Fonseca <jfonseca@vmware.com>2014-01-07 16:04:42 +0000
commit2d368b982af5e6566c7da7fd2bc8b190af28188b (patch)
treee6102cbfd74fd819851fb45db42927d98b6eed15 /src/gallium/drivers/llvmpipe/lp_state_blend.c
parent95bf222603bbbb643a6119e370c6a616ccc5ceaf (diff)
llvmpipe: Basic implementation of pipe_context::set_sample_mask.HEADmaster
We don't support MSAA (ie, number of samples is always one) therefore sample_mask boils down to a synonym of the rasterizer_discard flag. Also, this change makes setup actually use the value received in lp_setup_set_rasterizer_discard instead of reaching out to llvmpipe upper layers to re-fetch it. Based on Si Chen's draft. With this patch `wgf11multisample Coverage passes 100%` on the UMD D3D10 state tracker. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Si Chen <sichen@vmware.com>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_blend.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_blend.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_blend.c b/src/gallium/drivers/llvmpipe/lp_state_blend.c
index 6bba9077d1..b0fc1d3812 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_blend.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_blend.c
@@ -177,6 +177,13 @@ static void
llvmpipe_set_sample_mask(struct pipe_context *pipe,
unsigned sample_mask)
{
+ struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
+
+ if (sample_mask != llvmpipe->sample_mask) {
+ llvmpipe->sample_mask = sample_mask;
+
+ llvmpipe->dirty |= LP_NEW_RASTERIZER;
+ }
}
void
@@ -194,4 +201,6 @@ llvmpipe_init_blend_funcs(struct llvmpipe_context *llvmpipe)
llvmpipe->pipe.set_stencil_ref = llvmpipe_set_stencil_ref;
llvmpipe->pipe.set_sample_mask = llvmpipe_set_sample_mask;
+
+ llvmpipe->sample_mask = ~0;
}