[Mesa-dev] [PATCH v2] glsl: guard gl_NumSamples enablement on ARB_sample_shading
Anuj Phogat
anuj.phogat at gmail.com
Thu Jun 18 16:46:49 PDT 2015
On Thu, Jun 18, 2015 at 4:08 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> gl_NumSamples should only be enabled when ARB_sample_shading is enabled.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/glsl/builtin_variables.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
> index c52b252..a765d35 100644
> --- a/src/glsl/builtin_variables.cpp
> +++ b/src/glsl/builtin_variables.cpp
> @@ -764,7 +764,8 @@ builtin_variable_generator::generate_constants()
> void
> builtin_variable_generator::generate_uniforms()
> {
> - add_uniform(int_t, "gl_NumSamples");
> + if (state->is_version(400, 0) || state->ARB_sample_shading_enable)
> + add_uniform(int_t, "gl_NumSamples");
> add_uniform(type("gl_DepthRangeParameters"), "gl_DepthRange");
> add_uniform(array(vec4_t, VERT_ATTRIB_MAX), "gl_CurrentAttribVertMESA");
> add_uniform(array(vec4_t, VARYING_SLOT_MAX), "gl_CurrentAttribFragMESA");
> --
> 2.3.6
>
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
More information about the mesa-dev
mailing list