diff options
author | Chris Forbes <[email protected]> | 2013-11-29 21:44:13 +1300 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2013-12-07 17:15:05 +1300 |
commit | 88dc24663079d3b7ae62a953a770887dc0b709da (patch) | |
tree | 17b79d415259fc8c531e3fb6d682e6843b258f51 /src | |
parent | 2625a34bfcaccddf787eba443c118936ff95e1db (diff) |
mesa: Require per-sample shading if the `sample` qualifier is used.
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/program/program.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index 01f8c6f1147..cdf1c03fa91 100644 --- a/src/mesa/program/program.c +++ b/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); |