mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
glsl: add gl_MaxSamples, new in GL 4.5 / GL ES 3.2
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
4fea98991c
commit
903640c2ac
3 changed files with 9 additions and 0 deletions
|
|
@ -878,6 +878,9 @@ builtin_variable_generator::generate_constants()
|
|||
add_const("gl_MaxTessControlUniformComponents", state->Const.MaxTessControlUniformComponents);
|
||||
add_const("gl_MaxTessEvaluationUniformComponents", state->Const.MaxTessEvaluationUniformComponents);
|
||||
}
|
||||
|
||||
if (state->is_version(450, 320))
|
||||
add_const("gl_MaxSamples", state->Const.MaxSamples);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -179,6 +179,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
|
|||
this->Const.MaxTessControlUniformComponents = ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxUniformComponents;
|
||||
this->Const.MaxTessEvaluationUniformComponents = ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxUniformComponents;
|
||||
|
||||
/* GL 4.5 / OES_sample_variables */
|
||||
this->Const.MaxSamples = ctx->Const.MaxSamples;
|
||||
|
||||
this->current_function = NULL;
|
||||
this->toplevel_ir = NULL;
|
||||
this->found_return = false;
|
||||
|
|
|
|||
|
|
@ -461,6 +461,9 @@ struct _mesa_glsl_parse_state {
|
|||
unsigned MaxTessControlTotalOutputComponents;
|
||||
unsigned MaxTessControlUniformComponents;
|
||||
unsigned MaxTessEvaluationUniformComponents;
|
||||
|
||||
/* GL 4.5 / OES_sample_variables */
|
||||
unsigned MaxSamples;
|
||||
} Const;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue