From 7a4647ee392eff045015a0295f0b6d235d376804 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 19 Sep 2019 10:54:08 -0700 Subject: [PATCH] shader_enums: Move MAX_DRAW_BUFFERS to this file. We include shader_enums.h from freedreno's compiler for both GL and Vulkan, and the main/config.h include resulted in polluting the namespace with things like MAX_VIEWPORTS that other Vulkan drivers use as their driver-specific maximums. Reviewed-by: Kristian H. Kristensen --- src/compiler/shader_enums.h | 4 +++- src/mesa/main/config.h | 7 +------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index 7eac07b5c11..0704719c229 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -27,7 +27,9 @@ #define SHADER_ENUMS_H #include -#include "mesa/main/config.h" + +/* Project-wide (GL and Vulkan) maximum. */ +#define MAX_DRAW_BUFFERS 8 #ifdef __cplusplus extern "C" { diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 6a2f766222a..4ea2e645b67 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -31,6 +31,7 @@ #ifndef MESA_CONFIG_H_INCLUDED #define MESA_CONFIG_H_INCLUDED +#include "compiler/shader_enums.h" /** * \name OpenGL implementation limits @@ -224,12 +225,6 @@ /*@}*/ -/** For GL_ARB_draw_buffers */ -/*@{*/ -#define MAX_DRAW_BUFFERS 8 -/*@}*/ - - /** For GL_EXT_framebuffer_object */ /*@{*/ #define MAX_COLOR_ATTACHMENTS 8 -- 2.30.2