summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-10-20 00:12:53 +0200
committerMarek Olšák <[email protected]>2015-10-20 12:51:51 +0200
commitb99645f8190b267231443829aefad1e73c4c25d4 (patch)
tree85592d4d157943e68064a371fb8783f23aa53a97
parentf4e938e9aee14d42e2175c84ebe7ee32b0bcf8c5 (diff)
st/mesa: negate the can_force_persample_interp flag
Reviewed-by: Ilia Mirkin <[email protected]>
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c2
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c2
-rw-r--r--src/mesa/state_tracker/st_context.c5
-rw-r--r--src/mesa/state_tracker/st_context.h2
4 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index 0f01e9939de..55d5e66243c 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -239,7 +239,7 @@ static void update_raster_state( struct st_context *st )
/* _NEW_MULTISAMPLE | _NEW_BUFFERS */
raster->force_persample_interp =
- st->can_force_persample_interp &&
+ !st->force_persample_in_shader &&
ctx->Multisample._Enabled &&
ctx->Multisample.SampleShading &&
ctx->Multisample.MinSampleShadingValue *
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index 394145409b3..0f9ea101889 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -76,7 +76,7 @@ update_fp( struct st_context *st )
* Ignore sample qualifier while computing this flag.
*/
key.persample_shading =
- !st->can_force_persample_interp &&
+ st->force_persample_in_shader &&
!(stfp->Base.Base.SystemValuesRead & (SYSTEM_BIT_SAMPLE_ID |
SYSTEM_BIT_SAMPLE_POS)) &&
_mesa_get_min_invocations_per_fragment(st->ctx, &stfp->Base, true) > 1;
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 6256c0b0d82..70e006912dc 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -235,8 +235,9 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
PIPE_BIND_SAMPLER_VIEW);
st->prefer_blit_based_texture_transfer = screen->get_param(screen,
PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER);
- st->can_force_persample_interp = screen->get_param(screen,
- PIPE_CAP_FORCE_PERSAMPLE_INTERP);
+ st->force_persample_in_shader =
+ screen->get_param(screen, PIPE_CAP_SAMPLE_SHADING) &&
+ !screen->get_param(screen, PIPE_CAP_FORCE_PERSAMPLE_INTERP);
st->has_shareable_shaders = screen->get_param(screen,
PIPE_CAP_SHAREABLE_SHADERS);
st->needs_texcoord_semantic =
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 446fe5de889..ec95259b67a 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -98,7 +98,7 @@ struct st_context
boolean has_etc1;
boolean has_etc2;
boolean prefer_blit_based_texture_transfer;
- boolean can_force_persample_interp;
+ boolean force_persample_in_shader;
boolean has_shareable_shaders;
boolean needs_texcoord_semantic;