Module: Mesa
Branch: master
Commit: 5fd848f6c9ee86b3d0e024cfa6255cd2d721462f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5fd848f6c9ee86b3d0e024cfa6255cd2d721462f

Author: Neil Roberts <n...@linux.intel.com>
Date:   Thu Feb  4 16:12:06 2016 +0000

program: Use _mesa_geometric_samples to calculate gl_NumSamples

Otherwise it won't take into account the default samples for
framebuffers with no attachments.

Reviewed-by: Ilia Mirkin <imir...@alum.mit.edu>

---

 src/mesa/program/prog_statevars.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/program/prog_statevars.c 
b/src/mesa/program/prog_statevars.c
index 12490d0..eed2412 100644
--- a/src/mesa/program/prog_statevars.c
+++ b/src/mesa/program/prog_statevars.c
@@ -40,6 +40,7 @@
 #include "prog_statevars.h"
 #include "prog_parameter.h"
 #include "main/samplerobj.h"
+#include "framebuffer.h"
 
 
 #define ONE_DIV_SQRT_LN2 (1.201122408786449815)
@@ -352,7 +353,7 @@ _mesa_fetch_state(struct gl_context *ctx, const 
gl_state_index state[],
       }
       return;
    case STATE_NUM_SAMPLES:
-      ((int *)value)[0] = ctx->DrawBuffer->Visual.samples;
+      ((int *)value)[0] = _mesa_geometric_samples(ctx->DrawBuffer);
       return;
    case STATE_DEPTH_RANGE:
       value[0] = ctx->ViewportArray[0].Near;                /* near       */

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to