diff options
author | Marek Olšák <[email protected]> | 2015-09-27 19:54:57 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-10-03 22:06:09 +0200 |
commit | 6b0f21cb287bde3acaba1b0d18ab1c291acf327f (patch) | |
tree | 7d528a5feb35865cdc05d59adc31799bca965559 /src/mesa/state_tracker/st_program.c | |
parent | 4e9fc7e4e2fa3b3c77d08c4db545dcc279e849e9 (diff) |
st/mesa: automatically set per-sample interpolation if using SampleID/Pos
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 9c271476dd2..a07f8fec309 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -619,7 +619,9 @@ st_translate_fragment_program(struct st_context *st, else interpLocation[slot] = TGSI_INTERPOLATE_LOC_CENTER; - if (key->persample_shading) + if (stfp->Base.Base.SystemValuesRead & (SYSTEM_BIT_SAMPLE_ID | + SYSTEM_BIT_SAMPLE_POS) || + key->persample_shading) interpLocation[slot] = TGSI_INTERPOLATE_LOC_SAMPLE; switch (attr) { |