gallium: use gl shader types as the basis for the gallium ones
This should enable a rename transistion. Trace needs to swap over to a non-generated version, but that should be fine. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17747>
This commit is contained in:
@@ -44,16 +44,23 @@ extern "C" {
|
||||
* The GLSL linker assumes that if i<j, then the j-th shader is
|
||||
* executed later than the i-th shader.
|
||||
*/
|
||||
typedef enum
|
||||
typedef enum pipe_shader_type
|
||||
{
|
||||
MESA_SHADER_NONE = -1,
|
||||
MESA_SHADER_VERTEX = 0,
|
||||
PIPE_SHADER_VERTEX = MESA_SHADER_VERTEX,
|
||||
MESA_SHADER_TESS_CTRL = 1,
|
||||
PIPE_SHADER_TESS_CTRL = MESA_SHADER_TESS_CTRL,
|
||||
MESA_SHADER_TESS_EVAL = 2,
|
||||
PIPE_SHADER_TESS_EVAL = MESA_SHADER_TESS_EVAL,
|
||||
MESA_SHADER_GEOMETRY = 3,
|
||||
PIPE_SHADER_GEOMETRY = MESA_SHADER_GEOMETRY,
|
||||
MESA_SHADER_FRAGMENT = 4,
|
||||
PIPE_SHADER_FRAGMENT = MESA_SHADER_FRAGMENT,
|
||||
MESA_SHADER_COMPUTE = 5,
|
||||
PIPE_SHADER_COMPUTE = MESA_SHADER_COMPUTE,
|
||||
|
||||
PIPE_SHADER_TYPES = (PIPE_SHADER_COMPUTE + 1),
|
||||
/* Vulkan-only stages. */
|
||||
MESA_SHADER_TASK = 6,
|
||||
MESA_SHADER_MESH = 7,
|
||||
|
||||
@@ -43,7 +43,6 @@ assert sys.version_info >= (3, 6)
|
||||
#
|
||||
lst_enum_include = [
|
||||
"pipe_texture_target",
|
||||
"pipe_shader_type",
|
||||
"pipe_shader_cap",
|
||||
"pipe_shader_ir",
|
||||
"pipe_cap",
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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:
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user