mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
mesa: #include "util/glheader.h" instead GL/gl.h in shared code
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Acked-by: Brian Paul brianp@vmware.com Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19472>
This commit is contained in:
parent
de53069af6
commit
bf338c3d7f
20 changed files with 25 additions and 33 deletions
|
|
@ -22,12 +22,12 @@
|
|||
*/
|
||||
|
||||
#include "nir.h"
|
||||
#include "GL/gl.h"
|
||||
#include "linker_util.h"
|
||||
#include "gl_nir_linker.h"
|
||||
#include "compiler/glsl/ir_uniform.h" /* for gl_uniform_storage */
|
||||
#include "main/consts_exts.h"
|
||||
#include "main/shader_types.h"
|
||||
#include "util/glheader.h"
|
||||
|
||||
/**
|
||||
* This file do the common link for GLSL atomic counter uniforms, using NIR,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
|
||||
#include "nir.h"
|
||||
#include "GL/gl.h"
|
||||
#include "gl_nir.h"
|
||||
#include "gl_nir_linker.h"
|
||||
#include "linker_util.h"
|
||||
|
|
@ -30,6 +29,7 @@
|
|||
#include "main/consts_exts.h"
|
||||
#include "main/shaderobj.h"
|
||||
#include "ir_uniform.h" /* for gl_uniform_storage */
|
||||
#include "util/glheader.h"
|
||||
|
||||
/**
|
||||
* This file included general link methods, using NIR, instead of IR as
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#define GLSL_LINKER_UTIL_H
|
||||
|
||||
#include "util/bitset.h"
|
||||
#include "util/glheader.h"
|
||||
#include "compiler/glsl/list.h"
|
||||
|
||||
struct gl_constants;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
#include "mesa/main/config.h"
|
||||
#include "mesa/main/menums.h" /* for gl_texture_index, C++'s enum rules are broken */
|
||||
#include "util/glheader.h"
|
||||
#include "util/ralloc.h"
|
||||
#endif
|
||||
|
||||
struct glsl_type;
|
||||
|
|
@ -289,10 +292,10 @@ enum {
|
|||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#include "GL/gl.h"
|
||||
#include "util/ralloc.h"
|
||||
#include "mesa/main/menums.h" /* for gl_texture_index, C++'s enum rules are broken */
|
||||
/* C++ struct types for glsl */
|
||||
#ifdef __cplusplus
|
||||
|
||||
struct glsl_type {
|
||||
GLenum gl_type;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#ifndef NIR_GL_TYPES_H
|
||||
#define NIR_GL_TYPES_H
|
||||
|
||||
#include "GL/gl.h"
|
||||
#include "util/glheader.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -35,13 +35,13 @@
|
|||
#include "tgsi/tgsi_info.h"
|
||||
#include "tgsi/tgsi_dump.h"
|
||||
#include "tgsi/tgsi_sanity.h"
|
||||
#include "util/glheader.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_prim.h"
|
||||
#include "util/u_bitmask.h"
|
||||
#include "GL/gl.h"
|
||||
#include "compiler/shader_info.h"
|
||||
|
||||
union tgsi_any_token {
|
||||
|
|
|
|||
|
|
@ -21,13 +21,12 @@
|
|||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "state_tracker/st_interop.h"
|
||||
#include "stw_ext_interop.h"
|
||||
|
||||
#include "stw_context.h"
|
||||
#include "stw_device.h"
|
||||
|
||||
#include "state_tracker/st_interop.h"
|
||||
|
||||
int
|
||||
wglMesaGLInteropQueryDeviceInfo(HDC dpy, HGLRC context,
|
||||
struct mesa_glinterop_device_info *out)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "stw_image.h"
|
||||
#include <pipe/p_state.h>
|
||||
#include <util/u_inlines.h>
|
||||
#include <frontend/api.h>
|
||||
|
|
@ -31,6 +30,8 @@
|
|||
#include <state_tracker/st_context.h>
|
||||
#include <state_tracker/st_texture.h>
|
||||
|
||||
#include "stw_image.h"
|
||||
|
||||
struct stw_image *
|
||||
stw_create_image_from_texture(struct stw_context *ctx, GLenum gl_target, GLuint texture,
|
||||
GLuint depth, GLint level, enum stw_image_error *error)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#define _WINSYS_HANDLE_H_
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
typedef void *HANDLE;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ end_conditional_render(struct gl_context *ctx)
|
|||
}
|
||||
|
||||
|
||||
void APIENTRY
|
||||
void GLAPIENTRY
|
||||
_mesa_EndConditionalRender_no_error(void)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -214,7 +214,7 @@ _mesa_EndConditionalRender_no_error(void)
|
|||
}
|
||||
|
||||
|
||||
void APIENTRY
|
||||
void GLAPIENTRY
|
||||
_mesa_EndConditionalRender(void)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
|
|||
|
|
@ -36,12 +36,8 @@
|
|||
#include "menums.h"
|
||||
#include "compiler/shader_enums.h"
|
||||
|
||||
/* Windows winnt.h defines MemoryBarrier as a macro on some platforms,
|
||||
* including as a function-like macro in some cases. That either causes
|
||||
* the table entry below to have a weird name, or fail to compile.
|
||||
*/
|
||||
#ifdef MemoryBarrier
|
||||
#undef MemoryBarrier
|
||||
#if defined(_WIN32) && defined(_WINDOWS_)
|
||||
#error "Should not include <windows.h> here"
|
||||
#endif
|
||||
|
||||
struct gl_buffer_object;
|
||||
|
|
|
|||
|
|
@ -33,9 +33,10 @@
|
|||
#define FORMATS_H
|
||||
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "util/glheader.h"
|
||||
#include "gallium/include/pipe/p_format.h"
|
||||
#include "util/u_endian.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include "util/glheader.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include "util/u_queue.h"
|
||||
#include "GL/gl.h"
|
||||
#include "compiler/shader_enums.h"
|
||||
#include "main/config.h"
|
||||
#include "util/glheader.h"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include "main/enums.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,6 @@
|
|||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "GL/gl.h"
|
||||
#include "GL/glext.h"
|
||||
|
||||
#include "program/prog_statevars.h"
|
||||
|
||||
TEST(program_state_string, depth_range)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <GL/gl.h>
|
||||
#include "main/errors.h"
|
||||
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -25,11 +25,7 @@
|
|||
#ifndef TEXCOMPRESS_S3TC_TMP_H
|
||||
#define TEXCOMPRESS_S3TC_TMP_H
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#include "util/glheader.h"
|
||||
|
||||
typedef GLubyte GLchan;
|
||||
#define UBYTE_TO_CHAN(b) (b)
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#define PROGRAM_PARSER_H
|
||||
|
||||
#include "main/config.h"
|
||||
#include "program/prog_instruction.h"
|
||||
#include "program/prog_parameter.h"
|
||||
|
||||
struct gl_context;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#ifndef VBO_SAVE_H
|
||||
#define VBO_SAVE_H
|
||||
|
||||
#include "dlist.h"
|
||||
#include "mesa/main/dlist.h"
|
||||
#include "vbo.h"
|
||||
#include "vbo_attrib.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue