diff options
author | Karol Herbst <[email protected]> | 2018-11-29 15:21:12 +0100 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2019-01-21 20:36:41 +0100 |
commit | 8bb46de08b310b902f49795be45608293e21255e (patch) | |
tree | 228268450a023d42a4418222e77502a31dd83a67 /src/compiler/shader_enums.h | |
parent | 2aa78e46e9746174e24a192eefd4e3fee703a357 (diff) |
mesa: add MESA_SHADER_KERNEL
used for CL kernels
Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/shader_enums.h')
-rw-r--r-- | src/compiler/shader_enums.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index f023b48cbb3..1dff01484b5 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -26,6 +26,8 @@ #ifndef SHADER_ENUMS_H #define SHADER_ENUMS_H +#include <stdbool.h> + #ifdef __cplusplus extern "C" { #endif @@ -46,8 +48,16 @@ typedef enum MESA_SHADER_GEOMETRY = 3, MESA_SHADER_FRAGMENT = 4, MESA_SHADER_COMPUTE = 5, + /* must be last so it doesn't affect the GL pipeline */ + MESA_SHADER_KERNEL = 6, } gl_shader_stage; +static inline bool +gl_shader_stage_is_compute(gl_shader_stage stage) +{ + return stage == MESA_SHADER_COMPUTE || stage == MESA_SHADER_KERNEL; +} + /** * Number of STATE_* values we need to address any GL state. * Used to dimension arrays. @@ -70,8 +80,16 @@ const char *_mesa_shader_stage_to_string(unsigned stage); */ const char *_mesa_shader_stage_to_abbrev(unsigned stage); +/** + * GL related stages (not including CL) + */ #define MESA_SHADER_STAGES (MESA_SHADER_COMPUTE + 1) +/** + * All stages + */ +#define MESA_ALL_SHADER_STAGES (MESA_SHADER_KERNEL + 1) + /** * Indexes for vertex program attributes. |