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@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Kenneth Graunke 2015-04-07 15:18:43 -07:00
parent feafe70399
commit 4b27391cad
3 changed files with 18 additions and 19 deletions

View file

@ -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"

View file

@ -26,6 +26,23 @@
#ifndef SHADER_ENUMS_H
#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.
*/

View file

@ -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