Browse Source

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>
tags/12.0-branchpoint
Ilia Mirkin 9 years ago
parent
commit
903640c2ac

+ 3
- 0
src/compiler/glsl/builtin_variables.cpp View File

add_const("gl_MaxTessControlUniformComponents", state->Const.MaxTessControlUniformComponents); add_const("gl_MaxTessControlUniformComponents", state->Const.MaxTessControlUniformComponents);
add_const("gl_MaxTessEvaluationUniformComponents", state->Const.MaxTessEvaluationUniformComponents); add_const("gl_MaxTessEvaluationUniformComponents", state->Const.MaxTessEvaluationUniformComponents);
} }

if (state->is_version(450, 320))
add_const("gl_MaxSamples", state->Const.MaxSamples);
} }





+ 3
- 0
src/compiler/glsl/glsl_parser_extras.cpp View File

this->Const.MaxTessControlUniformComponents = ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxUniformComponents; this->Const.MaxTessControlUniformComponents = ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxUniformComponents;
this->Const.MaxTessEvaluationUniformComponents = ctx->Const.Program[MESA_SHADER_TESS_EVAL].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->current_function = NULL;
this->toplevel_ir = NULL; this->toplevel_ir = NULL;
this->found_return = false; this->found_return = false;

+ 3
- 0
src/compiler/glsl/glsl_parser_extras.h View File

unsigned MaxTessControlTotalOutputComponents; unsigned MaxTessControlTotalOutputComponents;
unsigned MaxTessControlUniformComponents; unsigned MaxTessControlUniformComponents;
unsigned MaxTessEvaluationUniformComponents; unsigned MaxTessEvaluationUniformComponents;

/* GL 4.5 / OES_sample_variables */
unsigned MaxSamples;
} Const; } Const;


/** /**

Loading…
Cancel
Save