[Mesa-dev] [PATCH 07/12] glsl: Add gl_Layer and gl_ViewportIndex builtins to fragment shader

Ian Romanick idr at freedesktop.org
Tue Jan 28 11:07:32 PST 2014


Patches 1-7 are

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 01/24/2014 11:51 PM, Chris Forbes wrote:
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
>  src/glsl/builtin_variables.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
> index d6bc3c0..bb499fa 100644
> --- a/src/glsl/builtin_variables.cpp
> +++ b/src/glsl/builtin_variables.cpp
> @@ -864,6 +864,11 @@ builtin_variable_generator::generate_fs_special_vars()
>     if (state->ARB_gpu_shader5_enable) {
>        add_system_value(SYSTEM_VALUE_SAMPLE_MASK_IN, array(int_t, 1), "gl_SampleMaskIn");
>     }
> +
> +   if (state->ARB_fragment_layer_viewport_enable) {
> +      add_input(VARYING_SLOT_LAYER, int_t, "gl_Layer");
> +      add_input(VARYING_SLOT_VIEWPORT, int_t, "gl_ViewportIndex");
> +   }
>  }
>  
>  
> 



More information about the mesa-dev mailing list