nir: remove gl.h include from nir headers.
This saves a lot of pointless gl.h includes across the board, it moves the one place that needs GLenum into a separate file only used in those passes that require it. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14605>
This commit is contained in:
parent
39bfb25627
commit
ccbf700d6c
|
@ -1125,7 +1125,7 @@ bool vir_init_reg_sets(struct v3d_compiler *compiler);
|
|||
|
||||
int v3d_shaderdb_dump(struct v3d_compile *c, char **shaderdb_str);
|
||||
|
||||
bool v3d_gl_format_is_return_32(GLenum format);
|
||||
bool v3d_gl_format_is_return_32(enum pipe_format format);
|
||||
|
||||
uint32_t
|
||||
v3d_get_op_for_atomic_add(nir_intrinsic_instr *instr, unsigned src);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#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 */
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "nir.h"
|
||||
#include "nir_gl_types.h"
|
||||
#include "nir_deref.h"
|
||||
#include "gl_nir_linker.h"
|
||||
#include "compiler/glsl/ir_uniform.h" /* for gl_uniform_storage */
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "nir.h"
|
||||
#include "nir_gl_types.h"
|
||||
#include "nir_xfb_info.h"
|
||||
#include "gl_nir_linker.h"
|
||||
#include "linker_util.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "nir.h"
|
||||
#include "GL/gl.h"
|
||||
#include "gl_nir.h"
|
||||
#include "gl_nir_linker.h"
|
||||
#include "linker_util.h"
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include "util/hash_table.h"
|
||||
#include "compiler/glsl/list.h"
|
||||
#include "GL/gl.h" /* GLenum */
|
||||
#include "util/list.h"
|
||||
#include "util/log.h"
|
||||
#include "util/ralloc.h"
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright © 2017 Igalia
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Neil Roberts.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef NIR_GL_TYPES_H
|
||||
#define NIR_GL_TYPES_H
|
||||
|
||||
#include "GL/gl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
GLenum glsl_get_gl_type(const struct glsl_type *type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -26,6 +26,7 @@
|
|||
*/
|
||||
|
||||
#include "nir_types.h"
|
||||
#include "nir_gl_types.h"
|
||||
#include "compiler/glsl/ir.h"
|
||||
|
||||
const char *
|
||||
|
|
|
@ -84,8 +84,6 @@ glsl_texture_type_to_sampler(const struct glsl_type *type, bool is_shadow);
|
|||
const struct glsl_type *
|
||||
glsl_sampler_type_to_texture(const struct glsl_type *type);
|
||||
|
||||
GLenum glsl_get_gl_type(const struct glsl_type *type);
|
||||
|
||||
enum glsl_base_type glsl_get_base_type(const struct glsl_type *type);
|
||||
|
||||
unsigned glsl_get_vector_elements(const struct glsl_type *type);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#define GLSPIRV_H
|
||||
|
||||
#include "compiler/nir/nir.h"
|
||||
#include "main/glheader.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
Loading…
Reference in New Issue