aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/program.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/program/program.c')
-rw-r--r--mesalib/src/mesa/program/program.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mesalib/src/mesa/program/program.c b/mesalib/src/mesa/program/program.c
index 01f8c6f11..cdf1c03fa 100644
--- a/mesalib/src/mesa/program/program.c
+++ b/mesalib/src/mesa/program/program.c
@@ -1049,6 +1049,14 @@ _mesa_get_min_invocations_per_fragment(struct gl_context *ctx,
* has no effect."
*/
if (ctx->Multisample.Enabled) {
+ /* The ARB_gpu_shader5 specification says:
+ *
+ * "Use of the "sample" qualifier on a fragment shader input
+ * forces per-sample shading"
+ */
+ if (prog->IsSample)
+ return MAX2(ctx->DrawBuffer->Visual.samples, 1);
+
if (prog->Base.SystemValuesRead & (SYSTEM_BIT_SAMPLE_ID |
SYSTEM_BIT_SAMPLE_POS))
return MAX2(ctx->DrawBuffer->Visual.samples, 1);