From cc93496bdbb3e7aea51033ece75fa85cfb5845d4 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 3 May 2011 12:48:26 +0000 Subject: xkeyboard libxcb pixman mesa git update 2 May 2011 --- mesalib/src/glsl/ir_variable.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mesalib/src/glsl/ir_variable.cpp') diff --git a/mesalib/src/glsl/ir_variable.cpp b/mesalib/src/glsl/ir_variable.cpp index f35771756..b8487694c 100644 --- a/mesalib/src/glsl/ir_variable.cpp +++ b/mesalib/src/glsl/ir_variable.cpp @@ -766,6 +766,22 @@ generate_ARB_shader_stencil_export_variables(exec_list *instructions, fd->warn_extension = "GL_ARB_shader_stencil_export"; } +static void +generate_AMD_shader_stencil_export_variables(exec_list *instructions, + struct _mesa_glsl_parse_state *state, + bool warn) +{ + /* gl_FragStencilRefAMD is only available in the fragment shader. + */ + ir_variable *const fd = + add_variable(instructions, state->symbols, + "gl_FragStencilRefAMD", glsl_type::int_type, + ir_var_out, FRAG_RESULT_STENCIL); + + if (warn) + fd->warn_extension = "GL_AMD_shader_stencil_export"; +} + static void generate_120_fs_variables(exec_list *instructions, struct _mesa_glsl_parse_state *state) @@ -818,6 +834,10 @@ initialize_fs_variables(exec_list *instructions, if (state->ARB_shader_stencil_export_enable) generate_ARB_shader_stencil_export_variables(instructions, state, state->ARB_shader_stencil_export_warn); + + if (state->AMD_shader_stencil_export_enable) + generate_AMD_shader_stencil_export_variables(instructions, state, + state->AMD_shader_stencil_export_warn); } void -- cgit v1.2.3