Mesa (master): nir: Move gl_shader_stage enum from mtypes.h to shader_enums.h.
Kenneth Graunke
kwg at kemper.freedesktop.org
Fri Apr 10 09:23:13 UTC 2015
Module: Mesa
Branch: master
Commit: 4b27391cadcc789a3befbd2b5a846012afa069b8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4b27391cadcc789a3befbd2b5a846012afa069b8
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Apr 7 15:18:43 2015 -0700
nir: Move gl_shader_stage enum from mtypes.h to shader_enums.h.
I want to use this in some code that doesn't currently include mtypes.h.
It seems like a better place for it anyway.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/glsl/nir/nir.h | 1 +
src/glsl/shader_enums.h | 17 +++++++++++++++++
src/mesa/main/mtypes.h | 19 -------------------
3 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index f9ca0f7..17a9354 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -34,6 +34,7 @@
#include "util/set.h"
#include "util/bitset.h"
#include "nir_types.h"
+#include "glsl/shader_enums.h"
#include <stdio.h>
#include "nir_opcodes.h"
diff --git a/src/glsl/shader_enums.h b/src/glsl/shader_enums.h
index 7f59fdc..79e0f6b 100644
--- a/src/glsl/shader_enums.h
+++ b/src/glsl/shader_enums.h
@@ -27,6 +27,23 @@
#define SHADER_ENUMS_H
/**
+ * Shader stages. Note that these will become 5 with tessellation.
+ *
+ * The order must match how shaders are ordered in the pipeline.
+ * The GLSL linker assumes that if i<j, then the j-th shader is
+ * executed later than the i-th shader.
+ */
+typedef enum
+{
+ MESA_SHADER_VERTEX = 0,
+ MESA_SHADER_GEOMETRY = 1,
+ MESA_SHADER_FRAGMENT = 2,
+ MESA_SHADER_COMPUTE = 3,
+} gl_shader_stage;
+
+#define MESA_SHADER_STAGES (MESA_SHADER_COMPUTE + 1)
+
+/**
* Bitflags for system values.
*/
#define SYSTEM_BIT_SAMPLE_ID ((uint64_t)1 << SYSTEM_VALUE_SAMPLE_ID)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 3784e3b..6184028 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -389,25 +389,6 @@ typedef enum
BUFFER_BIT_COLOR6 | \
BUFFER_BIT_COLOR7)
-
-/**
- * Shader stages. Note that these will become 5 with tessellation.
- *
- * The order must match how shaders are ordered in the pipeline.
- * The GLSL linker assumes that if i<j, then the j-th shader is
- * executed later than the i-th shader.
- */
-typedef enum
-{
- MESA_SHADER_VERTEX = 0,
- MESA_SHADER_GEOMETRY = 1,
- MESA_SHADER_FRAGMENT = 2,
- MESA_SHADER_COMPUTE = 3,
-} gl_shader_stage;
-
-#define MESA_SHADER_STAGES (MESA_SHADER_COMPUTE + 1)
-
-
/**
* Framebuffer configuration (aka visual / pixelformat)
* Note: some of these fields should be boolean, but it appears that
More information about the mesa-commit
mailing list