summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/builtin_variables.cpp')
-rw-r--r--src/glsl/builtin_variables.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index d6bc3c07316..df560fbbf65 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -356,6 +356,7 @@ public:
void generate_vs_special_vars();
void generate_gs_special_vars();
void generate_fs_special_vars();
+ void generate_cs_special_vars();
void generate_varyings();
private:
@@ -868,6 +869,16 @@ builtin_variable_generator::generate_fs_special_vars()
/**
+ * Generate variables which only exist in compute shaders.
+ */
+void
+builtin_variable_generator::generate_cs_special_vars()
+{
+ /* TODO: finish this. */
+}
+
+
+/**
* Add a single "varying" variable. The variable's type and direction (input
* or output) are adjusted as appropriate for the type of shader being
* compiled. For geometry shaders using {ARB,EXT}_geometry_shader4,
@@ -888,6 +899,9 @@ builtin_variable_generator::add_varying(int slot, const glsl_type *type,
case MESA_SHADER_FRAGMENT:
add_input(slot, type, name);
break;
+ case MESA_SHADER_COMPUTE:
+ /* Compute shaders don't have varyings. */
+ break;
}
}
@@ -975,5 +989,8 @@ _mesa_glsl_initialize_variables(exec_list *instructions,
case MESA_SHADER_FRAGMENT:
gen.generate_fs_special_vars();
break;
+ case MESA_SHADER_COMPUTE:
+ gen.generate_cs_special_vars();
+ break;
}
}