mesa, compiler: Move gl_texture_index to glsl_types.h

This move is done for decouple glsl_types.h from src/mesa/*

This is achieved by move gl_texture_index from src/mesa/main/menums.h to src/compiler/shader_enums.h
And move ATOMIC_COUNTER_SIZE,MAX_VERTEX_STREAMS from src/mesa/main/config.h to src/compiler/shader_enums.h

Move include main/[config|menums].h into glsl/glsl_parser_extras.h from glsl_types.h
As now glsl_types.h should not include headers from src/mesa/*

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23420>
This commit is contained in:
Yonggang Luo
2023-06-04 06:48:50 +08:00
committed by Marge Bot
parent ab73f717d9
commit 1b836a52ea
7 changed files with 28 additions and 29 deletions

View File

@@ -32,6 +32,10 @@
/* Project-wide (GL and Vulkan) maximum. */
#define MAX_DRAW_BUFFERS 8
/* Size of an atomic counter in bytes according to ARB_shader_atomic_counters */
#define ATOMIC_COUNTER_SIZE 4
/** For GL_ARB_gpu_shader5 */
#define MAX_VERTEX_STREAMS 4
#ifdef __cplusplus
extern "C" {
@@ -1350,6 +1354,28 @@ enum PACKED gl_subgroup_size
SUBGROUP_SIZE_REQUIRE_128 = 128, /**< VK_EXT_subgroup_size_control */
};
/**
* An index for each type of texture object. These correspond to the GL
* texture target enums, such as GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, etc.
* Note: the order is from highest priority to lowest priority.
*/
typedef enum
{
TEXTURE_2D_MULTISAMPLE_INDEX,
TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX,
TEXTURE_CUBE_ARRAY_INDEX,
TEXTURE_BUFFER_INDEX,
TEXTURE_2D_ARRAY_INDEX,
TEXTURE_1D_ARRAY_INDEX,
TEXTURE_EXTERNAL_INDEX,
TEXTURE_CUBE_INDEX,
TEXTURE_3D_INDEX,
TEXTURE_RECT_INDEX,
TEXTURE_2D_INDEX,
TEXTURE_1D_INDEX,
NUM_TEXTURE_TARGETS
} gl_texture_index;
#ifdef __cplusplus
} /* extern "C" */
#endif