mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 17:40:11 +01:00
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 <imirkin@alum.mit.edu>
This commit is contained in:
parent
4995d9c9a0
commit
5fd848f6c9
1 changed files with 2 additions and 1 deletions
|
|
@ -40,6 +40,7 @@
|
||||||
#include "prog_statevars.h"
|
#include "prog_statevars.h"
|
||||||
#include "prog_parameter.h"
|
#include "prog_parameter.h"
|
||||||
#include "main/samplerobj.h"
|
#include "main/samplerobj.h"
|
||||||
|
#include "framebuffer.h"
|
||||||
|
|
||||||
|
|
||||||
#define ONE_DIV_SQRT_LN2 (1.201122408786449815)
|
#define ONE_DIV_SQRT_LN2 (1.201122408786449815)
|
||||||
|
|
@ -352,7 +353,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case STATE_NUM_SAMPLES:
|
case STATE_NUM_SAMPLES:
|
||||||
((int *)value)[0] = ctx->DrawBuffer->Visual.samples;
|
((int *)value)[0] = _mesa_geometric_samples(ctx->DrawBuffer);
|
||||||
return;
|
return;
|
||||||
case STATE_DEPTH_RANGE:
|
case STATE_DEPTH_RANGE:
|
||||||
value[0] = ctx->ViewportArray[0].Near; /* near */
|
value[0] = ctx->ViewportArray[0].Near; /* near */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue