aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_variable.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-05-03 15:37:14 +0000
committermarha <marha@users.sourceforge.net>2011-05-03 15:37:14 +0000
commite4bd55e182560fa87af77ee3ec49fc1a907ead85 (patch)
treef77ade9dac153a4f45e08ccaf260de8d8ddbbb17 /mesalib/src/glsl/ir_variable.cpp
parente8af1ef3142aaaf2d17f2d3710e23eee1baf8a61 (diff)
parentcc93496bdbb3e7aea51033ece75fa85cfb5845d4 (diff)
downloadvcxsrv-e4bd55e182560fa87af77ee3ec49fc1a907ead85.tar.gz
vcxsrv-e4bd55e182560fa87af77ee3ec49fc1a907ead85.tar.bz2
vcxsrv-e4bd55e182560fa87af77ee3ec49fc1a907ead85.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/glsl/ir_variable.cpp')
-rw-r--r--mesalib/src/glsl/ir_variable.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ir_variable.cpp b/mesalib/src/glsl/ir_variable.cpp
index a86f1c6ed..8495043fe 100644
--- a/mesalib/src/glsl/ir_variable.cpp
+++ b/mesalib/src/glsl/ir_variable.cpp
@@ -767,6 +767,22 @@ generate_ARB_shader_stencil_export_variables(exec_list *instructions,
}
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