summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/prog_print.c3
-rw-r--r--src/mesa/program/program.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index 02ba01eca7b..4a5c1c1fb11 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -1021,6 +1021,9 @@ _mesa_write_shader_to_file(const struct gl_shader *shader)
case MESA_SHADER_GEOMETRY:
type = "geom";
break;
+ case MESA_SHADER_COMPUTE:
+ type = "comp";
+ break;
}
_mesa_snprintf(filename, sizeof(filename), "shader_%u.%s", shader->Name, type);
diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h
index 71b0a4af26d..4351e05331a 100644
--- a/src/mesa/program/program.h
+++ b/src/mesa/program/program.h
@@ -202,6 +202,8 @@ _mesa_program_enum_to_shader_stage(GLenum v)
return MESA_SHADER_FRAGMENT;
case GL_GEOMETRY_PROGRAM_NV:
return MESA_SHADER_GEOMETRY;
+ case GL_COMPUTE_PROGRAM_NV:
+ return MESA_SHADER_COMPUTE;
default:
ASSERT(0);
return ~0;
@@ -219,6 +221,8 @@ _mesa_shader_stage_to_program(unsigned stage)
return GL_FRAGMENT_PROGRAM_ARB;
case MESA_SHADER_GEOMETRY:
return GL_GEOMETRY_PROGRAM_NV;
+ case MESA_SHADER_COMPUTE:
+ return GL_COMPUTE_PROGRAM_NV;
}
assert(!"Unexpected shader stage in _mesa_shader_stage_to_program");