diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index 7c7c7afe037..30b8d432e08 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -44,16 +44,23 @@ extern "C" { * The GLSL linker assumes that if i= (3, 6) # lst_enum_include = [ "pipe_texture_target", - "pipe_shader_type", "pipe_shader_cap", "pipe_shader_ir", "pipe_cap", diff --git a/src/gallium/auxiliary/driver_trace/tr_screen.h b/src/gallium/auxiliary/driver_trace/tr_screen.h index 2350ec95f59..76b04e9d98d 100644 --- a/src/gallium/auxiliary/driver_trace/tr_screen.h +++ b/src/gallium/auxiliary/driver_trace/tr_screen.h @@ -45,6 +45,12 @@ extern "C" { */ #define TRACE_FLAG_USER_BUFFER (1 << 31) +static inline const char * +tr_util_pipe_shader_type_name(gl_shader_stage stage) +{ + return gl_shader_stage_name(stage); +} + struct trace_screen { diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index eeaa8a30c5d..ff858881fbf 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -30,6 +30,8 @@ #include "p_compiler.h" +#include "compiler/shader_enums.h" + #ifdef __cplusplus extern "C" { #endif @@ -546,19 +548,6 @@ enum pipe_resource_usage { PIPE_USAGE_STAGING, /* fast CPU access */ }; -/** - * Shaders - */ -enum pipe_shader_type { - PIPE_SHADER_VERTEX, - PIPE_SHADER_TESS_CTRL, - PIPE_SHADER_TESS_EVAL, - PIPE_SHADER_GEOMETRY, - PIPE_SHADER_FRAGMENT, - PIPE_SHADER_COMPUTE, - PIPE_SHADER_TYPES, -}; - /** * Primitive types: */