mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
st/mesa: set force_persample_interp if ARB_sample_shading is used
This is only a half of the work. The next patch will handle gl_SampleID/SamplePos, which is the other half of ARB_sample_shading. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
f3b37e321f
commit
4e9fc7e4e2
4 changed files with 12 additions and 0 deletions
|
|
@ -237,6 +237,14 @@ static void update_raster_state( struct st_context *st )
|
||||||
/* _NEW_MULTISAMPLE */
|
/* _NEW_MULTISAMPLE */
|
||||||
raster->multisample = ctx->Multisample._Enabled;
|
raster->multisample = ctx->Multisample._Enabled;
|
||||||
|
|
||||||
|
/* _NEW_MULTISAMPLE | _NEW_BUFFERS */
|
||||||
|
raster->force_persample_interp =
|
||||||
|
st->can_force_persample_interp &&
|
||||||
|
ctx->Multisample._Enabled &&
|
||||||
|
ctx->Multisample.SampleShading &&
|
||||||
|
ctx->Multisample.MinSampleShadingValue *
|
||||||
|
ctx->DrawBuffer->Visual.samples > 1;
|
||||||
|
|
||||||
/* _NEW_SCISSOR */
|
/* _NEW_SCISSOR */
|
||||||
raster->scissor = ctx->Scissor.EnableFlags;
|
raster->scissor = ctx->Scissor.EnableFlags;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ update_fp( struct st_context *st )
|
||||||
|
|
||||||
/* Ignore sample qualifier while computing this flag. */
|
/* Ignore sample qualifier while computing this flag. */
|
||||||
key.persample_shading =
|
key.persample_shading =
|
||||||
|
!st->can_force_persample_interp &&
|
||||||
_mesa_get_min_invocations_per_fragment(st->ctx, &stfp->Base, true) > 1;
|
_mesa_get_min_invocations_per_fragment(st->ctx, &stfp->Base, true) > 1;
|
||||||
|
|
||||||
st->fp_variant = st_get_fp_variant(st, stfp, &key);
|
st->fp_variant = st_get_fp_variant(st, stfp, &key);
|
||||||
|
|
|
||||||
|
|
@ -237,6 +237,8 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
|
||||||
PIPE_BIND_SAMPLER_VIEW);
|
PIPE_BIND_SAMPLER_VIEW);
|
||||||
st->prefer_blit_based_texture_transfer = screen->get_param(screen,
|
st->prefer_blit_based_texture_transfer = screen->get_param(screen,
|
||||||
PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER);
|
PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER);
|
||||||
|
st->can_force_persample_interp = screen->get_param(screen,
|
||||||
|
PIPE_CAP_FORCE_PERSAMPLE_INTERP);
|
||||||
|
|
||||||
st->needs_texcoord_semantic =
|
st->needs_texcoord_semantic =
|
||||||
screen->get_param(screen, PIPE_CAP_TGSI_TEXCOORD);
|
screen->get_param(screen, PIPE_CAP_TGSI_TEXCOORD);
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ struct st_context
|
||||||
boolean has_etc1;
|
boolean has_etc1;
|
||||||
boolean has_etc2;
|
boolean has_etc2;
|
||||||
boolean prefer_blit_based_texture_transfer;
|
boolean prefer_blit_based_texture_transfer;
|
||||||
|
boolean can_force_persample_interp;
|
||||||
|
|
||||||
boolean needs_texcoord_semantic;
|
boolean needs_texcoord_semantic;
|
||||||
boolean apply_texture_swizzle_to_border_color;
|
boolean apply_texture_swizzle_to_border_color;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue