mesa: include mtypes.h less
authorMarek Olšák <marek.olsak@amd.com>
Sun, 8 Apr 2018 17:13:08 +0000 (13:13 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 12 Apr 2018 23:31:30 +0000 (19:31 -0400)
- remove mtypes.h from most header files
- add main/menums.h for often used definitions
- remove main/core.h

v2: fix radv build

Reviewed-by: Brian Paul <brianp@vmware.com>
177 files changed:
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/radv_radeon_winsys.h
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
src/compiler/glsl/ast_function.cpp
src/compiler/glsl/ast_to_hir.cpp
src/compiler/glsl/builtin_functions.cpp
src/compiler/glsl/builtin_functions.h
src/compiler/glsl/builtin_variables.cpp
src/compiler/glsl/glcpp/glcpp-parse.y
src/compiler/glsl/glcpp/glcpp.c
src/compiler/glsl/glcpp/glcpp.h
src/compiler/glsl/glcpp/pp.c
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/glsl/ir.cpp
src/compiler/glsl/ir.h
src/compiler/glsl/ir_constant_expression.cpp
src/compiler/glsl/ir_function_detect_recursion.cpp
src/compiler/glsl/ir_optimization.h
src/compiler/glsl/ir_set_program_inouts.cpp
src/compiler/glsl/ir_uniform.h
src/compiler/glsl/link_atomics.cpp
src/compiler/glsl/link_functions.cpp
src/compiler/glsl/link_interface_blocks.cpp
src/compiler/glsl/link_uniform_blocks.cpp
src/compiler/glsl/link_uniform_initializers.cpp
src/compiler/glsl/link_uniforms.cpp
src/compiler/glsl/link_varyings.cpp
src/compiler/glsl/linker.cpp
src/compiler/glsl/linker.h
src/compiler/glsl/lower_blend_equation_advanced.cpp
src/compiler/glsl/lower_cs_derived.cpp
src/compiler/glsl/lower_distance.cpp
src/compiler/glsl/lower_named_interface_blocks.cpp
src/compiler/glsl/lower_packed_varyings.cpp
src/compiler/glsl/lower_shared_reference.cpp
src/compiler/glsl/lower_tess_level.cpp
src/compiler/glsl/lower_ubo_reference.cpp
src/compiler/glsl/lower_vector_derefs.cpp
src/compiler/glsl/lower_vertex_id.cpp
src/compiler/glsl/main.cpp
src/compiler/glsl/opt_algebraic.cpp
src/compiler/glsl/opt_dead_builtin_varyings.cpp
src/compiler/glsl/s_expression.cpp
src/compiler/glsl/s_expression.h
src/compiler/glsl/shader_cache.cpp
src/compiler/glsl/shader_cache.h
src/compiler/glsl/standalone.cpp
src/compiler/glsl/standalone_scaffolding.cpp
src/compiler/glsl/standalone_scaffolding.h
src/compiler/glsl_types.h
src/compiler/nir/nir_constant_expressions.py
src/compiler/nir/nir_gather_info.c
src/compiler/nir/nir_lower_atomics.c
src/compiler/nir/nir_lower_samplers.c
src/compiler/nir/nir_lower_samplers_as_deref.c
src/gallium/state_trackers/glx/xlib/glx_usefont.c
src/gallium/state_trackers/glx/xlib/xm_api.h
src/intel/common/gen_urb_config.c
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_eu.h
src/mesa/Makefile.sources
src/mesa/drivers/dri/common/dri_util.h
src/mesa/drivers/dri/i915/intel_context.h
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/r200/r200_state_init.c
src/mesa/drivers/dri/r200/r200_vertprog.c
src/mesa/drivers/dri/radeon/radeon_state.c
src/mesa/drivers/dri/radeon/radeon_state_init.c
src/mesa/main/api_arrayelt.h
src/mesa/main/buffers.h
src/mesa/main/colormac.h
src/mesa/main/context.h
src/mesa/main/copyimage.h
src/mesa/main/core.h [deleted file]
src/mesa/main/dd.h
src/mesa/main/debug.c
src/mesa/main/debug_output.h
src/mesa/main/dlist.h
src/mesa/main/drawtex.c
src/mesa/main/errors.h
src/mesa/main/eval.h
src/mesa/main/execmem.c
src/mesa/main/extensions.h
src/mesa/main/extensions_table.c
src/mesa/main/ffvertex_prog.c
src/mesa/main/format_pack.py
src/mesa/main/format_unpack.py
src/mesa/main/format_utils.c
src/mesa/main/format_utils.h
src/mesa/main/formats.c
src/mesa/main/glformats.h
src/mesa/main/glheader.h
src/mesa/main/glspirv.c
src/mesa/main/glspirv.h
src/mesa/main/glthread.h
src/mesa/main/hash.c
src/mesa/main/hash.h
src/mesa/main/imports.c
src/mesa/main/imports.h
src/mesa/main/menums.h [new file with mode: 0644]
src/mesa/main/mipmap.c
src/mesa/main/mipmap.h
src/mesa/main/mtypes.h
src/mesa/main/pack.c
src/mesa/main/pack.h
src/mesa/main/pbo.c
src/mesa/main/pbo.h
src/mesa/main/pixeltransfer.h
src/mesa/main/querymatrix.c
src/mesa/main/querymatrix.h
src/mesa/main/remap.c
src/mesa/main/renderbuffer.h
src/mesa/main/shader_query.cpp
src/mesa/main/shaderapi.h
src/mesa/main/shaderobj.h
src/mesa/main/texcompress_bptc.c
src/mesa/main/texcompress_etc.c
src/mesa/main/texcompress_fxt1.c
src/mesa/main/texcompress_rgtc.c
src/mesa/main/texobj.h
src/mesa/main/texstore.c
src/mesa/main/texstore.h
src/mesa/main/texturebindless.h
src/mesa/main/uniform_query.cpp
src/mesa/main/varray.h
src/mesa/main/version.h
src/mesa/main/vtxfmt.h
src/mesa/math/m_matrix.c
src/mesa/meson.build
src/mesa/program/ir_to_mesa.h
src/mesa/program/prog_execute.c
src/mesa/program/prog_execute.h
src/mesa/program/prog_instruction.c
src/mesa/program/prog_parameter.h
src/mesa/program/prog_print.h
src/mesa/program/prog_to_nir.c
src/mesa/program/program.h
src/mesa/program/program_parse.y
src/mesa/program/programopt.h
src/mesa/program/symbol_table.c
src/mesa/state_tracker/st_atom_depth.c
src/mesa/state_tracker/st_cb_bitmap.c
src/mesa/state_tracker/st_cb_bufferobjects.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_draw.c
src/mesa/state_tracker/st_gen_mipmap.c
src/mesa/state_tracker/st_glsl_to_tgsi_private.h
src/mesa/state_tracker/st_manager.h
src/mesa/state_tracker/st_program.c
src/mesa/swrast/s_context.c
src/mesa/swrast/s_fog.c
src/mesa/swrast/s_span.c
src/mesa/swrast/s_stencil.c
src/mesa/swrast/s_texfetch.c
src/mesa/swrast/s_zoom.c
src/mesa/tnl/t_rebase.c
src/mesa/tnl/t_vb_fog.c
src/mesa/tnl/t_vb_texgen.c
src/mesa/tnl/tnl.h
src/mesa/vbo/vbo_attrib.h
src/mesa/vbo/vbo_context.c
src/mesa/vbo/vbo_exec.c
src/mesa/vbo/vbo_exec.h
src/mesa/vbo/vbo_noop.h
src/mesa/vbo/vbo_primitive_restart.c
src/mesa/vbo/vbo_private.h
src/mesa/vbo/vbo_save.c
src/mesa/vbo/vbo_save.h
src/mesa/vbo/vbo_save_draw.c
src/mesa/vbo/vbo_save_loopback.c
src/util/register_allocate.c
src/util/xmlconfig.h

index fce3201c1987d42812d75134ab42708d827f358e..88fccb2b2ea3e83d137de822b0cd72651e79e0fe 100644 (file)
@@ -48,6 +48,7 @@
 #include "util/debug.h"
 #include "ac_exp_param.h"
 #include "ac_shader_util.h"
+#include "main/menums.h"
 
 struct radv_blend_state {
        uint32_t blend_enable_4bit;
index fb94c50cb000a724497fd423c6a9305253c02604..df8fe891dcfeff575c84aca30470cf3472826e56 100644 (file)
@@ -43,6 +43,7 @@
 #define VG(x)
 #endif
 
+#include "c11/threads.h"
 #include <amdgpu.h>
 #include "compiler/shader_enums.h"
 #include "util/macros.h"
index 270b3bceaba90868b6892519bc62673109b2cdf6..ba16bf332ab326a5aec2fe94e90880664c2111a6 100644 (file)
@@ -29,6 +29,7 @@
 #ifndef RADV_RADEON_WINSYS_H
 #define RADV_RADEON_WINSYS_H
 
+#include <stdio.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
index 9e83390568ac6a5e82deaa694e1503614351e400..32f263adddcbdcd4e54051a59d23a0c2996d3ba6 100644 (file)
@@ -33,6 +33,8 @@
 #include <amdgpu.h>
 #include <amdgpu_drm.h>
 #include <inttypes.h>
+#include <pthread.h>
+#include <unistd.h>
 
 #include "util/u_atomic.h"
 
index cd7ab384e7361c5536b522a822270c13d7d26a46..9921d38ab0f2bb3c3e3d2269e5af0c48573f3779 100644 (file)
@@ -26,6 +26,8 @@
 #include <amdgpu.h>
 #include <amdgpu_drm.h>
 #include <assert.h>
+#include <pthread.h>
+#include <errno.h>
 
 #include "ac_debug.h"
 #include "radv_radeon_winsys.h"
index 94e0a16a9c0ef1a3680315e4ca946805345ea309..22d58e48c64cb5c0046b8015b1974bace3da4758 100644 (file)
@@ -25,7 +25,7 @@
 #include "ast.h"
 #include "compiler/glsl_types.h"
 #include "ir.h"
-#include "main/core.h" /* for MIN2 */
+#include "main/mtypes.h"
 #include "main/shaderobj.h"
 #include "builtin_functions.h"
 
index 168ab7eec2ff1b8c9cac8d8723eface886d151b4..94ce3c45d031003e795939dbe411cc0c947b4772 100644 (file)
@@ -54,6 +54,7 @@
 #include "ast.h"
 #include "compiler/glsl_types.h"
 #include "util/hash_table.h"
+#include "main/mtypes.h"
 #include "main/macros.h"
 #include "main/shaderobj.h"
 #include "ir.h"
index 5f772c9eaba4393fbd4bc8a3a10865cf30175005..e1ee9943172a8ff92fb7b9eaa8fdd6c9b71b9cfb 100644 (file)
@@ -75,7 +75,7 @@
 
 #include <stdarg.h>
 #include <stdio.h>
-#include "main/core.h" /* for struct gl_shader */
+#include "main/mtypes.h"
 #include "main/shaderobj.h"
 #include "ir_builder.h"
 #include "glsl_parser_extras.h"
index 89ec9b7d5dd05b443dfd74be2cd0a8fb8f78b7bc..50f4f3b14948dc16ba1db073c62d25d7011d921b 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef BULITIN_FUNCTIONS_H
 #define BULITIN_FUNCTIONS_H
 
+struct gl_shader;
+
 extern void
 _mesa_glsl_initialize_builtin_functions();
 
index a1cdec597fad93dccb557003e339770260513b97..78fccc4e195f28d6b1f07abb89ef32a418694e18 100644 (file)
@@ -26,7 +26,7 @@
 #include "linker.h"
 #include "glsl_parser_extras.h"
 #include "glsl_symbol_table.h"
-#include "main/core.h"
+#include "main/mtypes.h"
 #include "main/uniforms.h"
 #include "program/prog_statevars.h"
 #include "program/prog_instruction.h"
index 913bce1fde8b7ee00e31802771b2d94970bf270b..ccb3aa18d36ca086c8f7442bba6458382defec13 100644 (file)
@@ -29,8 +29,7 @@
 #include <inttypes.h>
 
 #include "glcpp.h"
-#include "main/core.h" /* for struct gl_extensions */
-#include "main/mtypes.h" /* for gl_api enum */
+#include "main/mtypes.h"
 
 static void
 yyerror(YYLTYPE *locp, glcpp_parser_t *parser, const char *error);
index f08b14427f423a676427c8cc360c26d6d80d60ab..89728ffc67a331457e8c0fc4d5a4e1c3edb1a8a9 100644 (file)
@@ -27,7 +27,6 @@
 #include <getopt.h>
 
 #include "glcpp.h"
-#include "main/mtypes.h"
 #include "main/shaderobj.h"
 #include "util/strtod.h"
 
index 9d997cd92404b9b01d294810c2f10dd1357f91aa..c7e382ed30c7d34512eb8fbd76af8e31d3693216 100644 (file)
@@ -27,7 +27,7 @@
 #include <stdint.h>
 #include <stdbool.h>
 
-#include "main/mtypes.h"
+#include "main/menums.h"
 
 #include "util/ralloc.h"
 
@@ -35,6 +35,8 @@
 
 #include "util/string_buffer.h"
 
+struct gl_context;
+
 #define yyscan_t void*
 
 /* Some data types used for parser values. */
index fab52227a0289166c92c34885707466697da472d..32dee11ee34b91af886f90bb29f3e701de914ff4 100644 (file)
@@ -25,6 +25,7 @@
 #include <string.h>
 #include <ctype.h>
 #include "glcpp.h"
+#include "main/mtypes.h"
 
 void
 glcpp_error (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...)
index 5dd362b3e38707661a80a24a32eca7947f42917e..25003eeccced10ef14835fae5126b7fc5076d8af 100644 (file)
@@ -26,7 +26,6 @@
 #include <string.h>
 #include <assert.h>
 
-#include "main/core.h" /* for struct gl_context */
 #include "main/context.h"
 #include "main/debug_output.h"
 #include "main/formats.h"
index dbb58d82e8f9d49544660afa85773100ed117405..17d58acc4c221e94a3b54b0457559ea721006056 100644 (file)
@@ -32,6 +32,7 @@
 #include "compiler/nir/nir_control_flow.h"
 #include "compiler/nir/nir_builder.h"
 #include "main/imports.h"
+#include "main/mtypes.h"
 
 /*
  * pass to lower GLSL IR to NIR
index 2c61dd9d64e6462c663090446df1f82effa86b4c..e3134eaa1c8e68b9cd5f697a3035220bc892a3b0 100644 (file)
@@ -21,7 +21,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 #include <string.h>
-#include "main/core.h" /* for MAX2 */
 #include "ir.h"
 #include "compiler/glsl_types.h"
 #include "glsl_parser_extras.h"
index 6d3ef89eb87559c0bb541d93bb9bef07930b4ec5..471d9e787a711b5842716fbdfaedf5ec3d52a505 100644 (file)
@@ -33,7 +33,6 @@
 #include "list.h"
 #include "ir_visitor.h"
 #include "ir_hierarchical_visitor.h"
-#include "main/mtypes.h"
 
 #ifdef __cplusplus
 
index fe9bd1d0b4a84cfa04f0a894eaa8528dd1949833..4a0aff72c6f3c5ddd19bfc92b83bafb55a01c29d 100644 (file)
  */
 
 #include <math.h>
-#include "main/core.h" /* for MAX2, MIN2, CLAMP */
 #include "util/rounding.h" /* for _mesa_roundeven */
 #include "util/half_float.h"
 #include "ir.h"
 #include "compiler/glsl_types.h"
 #include "util/hash_table.h"
+#include "main/imports.h"
 
 static float
 dot_f(ir_constant *op0, ir_constant *op1)
index 38e4357eff9138b638f0df65c9460362133c011b..5b05274d0015ac64efa8c4b2dc207265f996d6cc 100644 (file)
  *
  * \author Ian Romanick <ian.d.romanick@intel.com>
  */
-#include "main/core.h"
 #include "ir.h"
 #include "glsl_parser_extras.h"
 #include "linker.h"
index 81049a479e86290432ac7ee112df245aeb8b4433..b0e84608c58b78f55ee35c6f31c4e817506efd6d 100644 (file)
@@ -30,6 +30,9 @@
 #ifndef GLSL_IR_OPTIMIZATION_H
 #define GLSL_IR_OPTIMIZATION_H
 
+struct gl_linked_shader;
+struct gl_shader_program;
+
 /* Operations for lower_instructions() */
 #define SUB_TO_ADD_NEG     0x01
 #define FDIV_TO_MUL_RCP    0x02
index 1b6c8d750b91be453c5c41e6e18b6180e49532c8..ba1e44167c3df1ab00494a50e729e4b6190e72b9 100644 (file)
  * from the GLSL IR.
  */
 
-#include "main/core.h" /* for struct gl_program */
 #include "ir.h"
 #include "ir_visitor.h"
 #include "compiler/glsl_types.h"
+#include "main/mtypes.h"
 
 namespace {
 
index 9545c4930c7fbc637d291eeac4349bea08170bed..9770790cb260f1ef97f1e00a9e6aa62818b2439a 100644 (file)
@@ -28,7 +28,7 @@
 /* stdbool.h is necessary because this file is included in both C and C++ code.
  */
 #include <stdbool.h>
-
+#include "util/macros.h"
 #include "program/prog_parameter.h"  /* For union gl_constant_value. */
 
 /**
index d4a6eed639fb8bceb0efb695fc37efa9002de6e1..bc03d64633be24e833836bc47f6ca5de7b850693 100644 (file)
@@ -25,7 +25,9 @@
 #include "ir.h"
 #include "ir_uniform.h"
 #include "linker.h"
+#include "main/errors.h"
 #include "main/macros.h"
+#include "main/mtypes.h"
 
 namespace {
    /*
index 56d2933ff820cabf0d3ad07a282b60c42fd90e5e..e73a72c86c9bf6255fdf63239aa9368215473e4c 100644 (file)
@@ -21,7 +21,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include "main/core.h"
 #include "glsl_symbol_table.h"
 #include "glsl_parser_extras.h"
 #include "ir.h"
@@ -29,6 +28,7 @@
 #include "util/set.h"
 #include "util/hash_table.h"
 #include "linker.h"
+#include "main/mtypes.h"
 
 static ir_function_signature *
 find_matching_signature(const char *name, const exec_list *actual_parameters,
index ce90d91607554364c02aa2219e6f669d45107277..7c3037e89754567a8da40208764bba9194bd30b9 100644 (file)
@@ -30,6 +30,7 @@
 #include "glsl_symbol_table.h"
 #include "linker.h"
 #include "main/macros.h"
+#include "main/mtypes.h"
 #include "util/hash_table.h"
 
 
index 683b296e33b9c693fdebbbd0de8105953a915668..e9e29d13a17eba1261e1c2acd9f566bbc7283322 100644 (file)
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include "main/core.h"
 #include "ir.h"
 #include "linker.h"
 #include "ir_uniform.h"
 #include "link_uniform_block_active_visitor.h"
 #include "util/hash_table.h"
 #include "program.h"
+#include "main/errors.h"
+#include "main/mtypes.h"
 
 namespace {
 
index d6d63bd61fce92be6091ba399e30c079b5e08302..64f47f9913f7858395bdcf96fcfc9a18b07af74f 100644 (file)
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include "main/core.h"
 #include "ir.h"
 #include "linker.h"
 #include "ir_uniform.h"
 #include "string_to_uint_map.h"
+#include "main/mtypes.h"
 
 /* These functions are put in a "private" namespace instead of being marked
  * static so that the unit tests can access them.  See
index a73dcd472754e97a1bac56c3e38dbe7192d02660..23ff7ec6728249b9deeb40db832e3f2685ef70b6 100644 (file)
@@ -21,7 +21,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include "main/core.h"
 #include "ir.h"
 #include "linker.h"
 #include "ir_uniform.h"
@@ -29,6 +28,7 @@
 #include "program.h"
 #include "string_to_uint_map.h"
 #include "ir_array_refcount.h"
+#include "main/mtypes.h"
 
 /**
  * \file link_uniforms.cpp
index 1fdfcb877deb9e608cb634a29c3e9543218cc108..211633d9ee36d971e17e0d16e05f00fdf702d36a 100644 (file)
@@ -29,6 +29,7 @@
  */
 
 
+#include "main/errors.h"
 #include "main/mtypes.h"
 #include "glsl_symbol_table.h"
 #include "glsl_parser_extras.h"
index af09b7d03ee8c8d223069e670e83a53f7ab6d5fe..ecd267b24f3ac869b66703d09c6e8525f8e3ef8a 100644 (file)
@@ -66,7 +66,6 @@
 
 #include <ctype.h>
 #include "util/strndup.h"
-#include "main/core.h"
 #include "glsl_symbol_table.h"
 #include "glsl_parser_extras.h"
 #include "ir.h"
 #include "builtin_functions.h"
 #include "shader_cache.h"
 
+#include "main/imports.h"
 #include "main/shaderobj.h"
 #include "main/enums.h"
+#include "main/mtypes.h"
 
 
 namespace {
index 12a48e0dcd86ddc1e3ae41a1e4599e42365debf2..454b65aebdfafabea1bccc7986c4ea687ba7a06f 100644 (file)
 #ifndef GLSL_LINKER_H
 #define GLSL_LINKER_H
 
+struct gl_shader_program;
+struct gl_shader;
+struct gl_linked_shader;
+
 extern bool
 link_function_calls(gl_shader_program *prog, gl_linked_shader *main,
                     gl_shader **shader_list, unsigned num_shaders);
index b05a2e0f0bbd088ad3ea36dddc603d8522358fca..c85b39bcaa343691b4c83737a77f9fb562988e02 100644 (file)
@@ -29,6 +29,7 @@
 #include "program/prog_statevars.h"
 #include "util/bitscan.h"
 #include "builtin_functions.h"
+#include "main/mtypes.h"
 
 using namespace ir_builder;
 
index f7ec2a48b47c99c6993414ee71f29d741aa5813e..15534b0ac6b2df74e39c6ca04ac6c9b5ff966a5b 100644 (file)
@@ -43,6 +43,7 @@
 #include "linker.h"
 #include "program/prog_statevars.h"
 #include "builtin_functions.h"
+#include "main/mtypes.h"
 
 using namespace ir_builder;
 
index 530f79d4dffb2b32c5f599c339de6a6d7d201f29..b4e730c64fbd7280717d45c2ddba2fe9cb1802d5 100644 (file)
@@ -50,6 +50,7 @@
 #include "ir_rvalue_visitor.h"
 #include "ir.h"
 #include "program/prog_instruction.h" /* For WRITEMASK_* */
+#include "main/mtypes.h"
 
 #define GLSL_CLIP_VAR_NAME "gl_ClipDistanceMESA"
 
index 136352a131b855d17e09701b663b2727f0a930b1..498954a33e5a3d052b29ffed5f66b0f61b2f7a09 100644 (file)
@@ -64,6 +64,7 @@
 #include "ir_optimization.h"
 #include "ir_rvalue_visitor.h"
 #include "util/hash_table.h"
+#include "main/mtypes.h"
 
 static const glsl_type *
 process_array_type(const glsl_type *type, unsigned idx)
index c622f5ee7b72c251e8efa333bcfc7b49890a4909..5c1eed719f26d369922062660329e142eaf3a1f2 100644 (file)
 #include "ir_builder.h"
 #include "ir_optimization.h"
 #include "program/prog_instruction.h"
+#include "main/mtypes.h"
 
 using namespace ir_builder;
 
index 5de269fde8214b042fa5190a759d20a569ec8345..a46d05419e521c414f3a9af8a4112b8c692d19e5 100644 (file)
@@ -37,6 +37,7 @@
 #include "main/macros.h"
 #include "util/list.h"
 #include "glsl_parser_extras.h"
+#include "main/mtypes.h"
 
 using namespace ir_builder;
 
index b0965eb562dd8e6e176dae3a48f58623c20b3020..3e4c7f026ce9c0bb8b724a0a4696ce67bfaea195 100644 (file)
@@ -49,6 +49,7 @@
 #include "ir_rvalue_visitor.h"
 #include "ir.h"
 #include "program/prog_instruction.h" /* For WRITEMASK_* */
+#include "main/mtypes.h"
 
 namespace {
 
index 1e35b44d5fe5b83d205c6ef90b441ee2fc628f76..453c0fa2b06ee53f0ea270b968c3700a338e5e16 100644 (file)
@@ -37,6 +37,7 @@
 #include "ir_builder.h"
 #include "main/macros.h"
 #include "glsl_parser_extras.h"
+#include "main/mtypes.h"
 
 using namespace ir_builder;
 
index a83658d20f7113feee5e63d22b71f7ce73fb77d0..7583d1fdd3ee266b04fca2001844a1f5ef79a7ae 100644 (file)
@@ -24,6 +24,7 @@
 #include "ir_builder.h"
 #include "ir_rvalue_visitor.h"
 #include "ir_optimization.h"
+#include "main/mtypes.h"
 
 using namespace ir_builder;
 
index 6b41fee055a16c6582084cf3fea497b80dae9288..3b641caa01ee8c09ecf83b34213645c5efcd1c6a 100644 (file)
@@ -38,6 +38,7 @@
 #include "linker.h"
 #include "program/prog_statevars.h"
 #include "builtin_functions.h"
+#include "main/mtypes.h"
 
 namespace {
 
index e082bd69757cd3f797be49e57d8e2f43875aeea7..a730c0339177837e0dc0f56268759cc40dd21f6b 100644 (file)
@@ -21,6 +21,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
+#include <stdlib.h>
 #include <stdio.h>
 #include <getopt.h>
 
@@ -33,7 +34,6 @@
  * offline compile GLSL code and examine the resulting GLSL IR.
  */
 
-#include "main/mtypes.h"
 #include "standalone.h"
 
 static struct standalone_options options;
index ce5f26559a77788eb1f92f65443bd857ec2b0f07..1a8ee36165221b323da047680e75931190b0462a 100644 (file)
@@ -34,6 +34,7 @@
 #include "ir_optimization.h"
 #include "ir_builder.h"
 #include "compiler/glsl_types.h"
+#include "main/mtypes.h"
 
 using namespace ir_builder;
 
index 4526f2bca009e3b631c1fda3a94c19e59ec1de2a..0ce192186064ee61d700356f11fe5adefc45ba0f 100644 (file)
  * The same is done for the gl_FragData fragment shader output.
  */
 
-#include "main/core.h" /* for snprintf and ARRAY_SIZE */
 #include "ir.h"
 #include "ir_rvalue_visitor.h"
 #include "ir_optimization.h"
 #include "ir_print_visitor.h"
 #include "compiler/glsl_types.h"
 #include "link_varyings.h"
+#include "main/mtypes.h"
 
 namespace {
 
index f82e155a6b6af09a3514edddcd09006bacba67ca..12baf1d3ed3b1c4ac77d7334b79364039ca0aa33 100644 (file)
@@ -25,6 +25,8 @@
 #include <assert.h>
 #include <stdio.h>
 #include <math.h>
+#include <string.h>
+#include <stdlib.h>
 #include "s_expression.h"
 
 s_symbol::s_symbol(const char *str, size_t n)
index 5456b6bab215742bb015511672573cd7a81b5c95..38caabbf89e9b94fd1aed256288f05c286be0aee 100644 (file)
@@ -25,7 +25,6 @@
 #ifndef S_EXPRESSION_H
 #define S_EXPRESSION_H
 
-#include "main/core.h" /* for Elements */
 #include "util/strtod.h"
 #include "list.h"
 
index e43ed7aa675e726964282f42a5ebed2026696265..042f3a60f5b33af317de1403808126337b73d38b 100644 (file)
 #include "ir_uniform.h"
 #include "linker.h"
 #include "link_varyings.h"
-#include "main/core.h"
 #include "nir.h"
 #include "program.h"
 #include "serialize.h"
 #include "shader_cache.h"
 #include "util/mesa-sha1.h"
 #include "string_to_uint_map.h"
+#include "main/mtypes.h"
 
 extern "C" {
 #include "main/enums.h"
index eeefb3aeb25756477083f11483b61ff4b45e5933..b3603d956d564e5528fe2a6c7ad10adb4d964d8c 100644 (file)
@@ -26,6 +26,9 @@
 
 #include "util/disk_cache.h"
 
+struct gl_context;
+struct gl_shader_program;
+
 void
 shader_cache_write_program_metadata(struct gl_context *ctx,
                                     struct gl_shader_program *prog);
index c989aeff71adb174075e3a56a1289779debb19fc..c24a220a48d057fc1a086e109e87611bda3f6e66 100644 (file)
@@ -43,6 +43,7 @@
 #include "ir_builder_print_visitor.h"
 #include "builtin_functions.h"
 #include "opt_add_neg_to_sub.h"
+#include "main/mtypes.h"
 
 class dead_variable_visitor : public ir_hierarchical_visitor {
 public:
index caaddc028f7624371ee1b1dbe7bbd636c49266ff..ec5f28ae40cb9c505d69fc08dea60bf016c025ad 100644 (file)
@@ -34,6 +34,7 @@
 #include <string.h>
 #include "util/ralloc.h"
 #include "util/strtod.h"
+#include "main/mtypes.h"
 
 void
 _mesa_warning(struct gl_context *ctx, const char *fmt, ...)
index c8d90597ca0a1a6f115ffc7b8ffdad8ead9be1ef..7da76f06fefff8d3bb258d759d30293e77ed4ddb 100644 (file)
@@ -31,7 +31,7 @@
 #define STANDALONE_SCAFFOLDING_H
 
 #include <assert.h>
-#include "main/mtypes.h"
+#include "main/menums.h"
 #include "program/prog_statevars.h"
 
 extern "C" void
index 88f987fabee36028aa266d9525e5b33bc2ca049f..efc6324865620a6a9bbfb89033754b5abdce67bc 100644 (file)
 
 #include "shader_enums.h"
 #include "blob.h"
+#include "c11/threads.h"
+
+#ifdef __cplusplus
+#include "main/config.h"
+#endif
 
 struct glsl_type;
 
@@ -146,7 +151,7 @@ enum {
 #ifdef __cplusplus
 #include "GL/gl.h"
 #include "util/ralloc.h"
-#include "main/mtypes.h" /* for gl_texture_index, C++'s enum rules are broken */
+#include "main/menums.h" /* for gl_texture_index, C++'s enum rules are broken */
 
 struct glsl_type {
    GLenum gl_type;
index ee92be51dbeb55d84e22f3fb58f65285bee520f0..db5bde2b82d29edd9aaa2e7a36b957d14f97b4bd 100644 (file)
@@ -76,7 +76,6 @@ template = """\
  */
 
 #include <math.h>
-#include "main/core.h"
 #include "util/rounding.h" /* for _mesa_roundeven */
 #include "util/half_float.h"
 #include "nir_constant_expressions.h"
index 5530009255d73188ff1f97bb658f89774bec0e04..eaf0ca68b0fcb5183608cf031e13a2dcff005133 100644 (file)
@@ -21,8 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#include "main/mtypes.h"
 #include "nir.h"
+#include "main/menums.h"
 
 static void
 set_io_mask(nir_shader *shader, nir_variable *var, int offset, int len,
index ee66aa3d7d5e0826461dbf764f51fb8ebc6d5cc5..383e3236102928da4292f705fbf6ba72850a11a6 100644 (file)
@@ -28,6 +28,7 @@
 #include "compiler/glsl/ir_uniform.h"
 #include "nir.h"
 #include "main/config.h"
+#include "main/mtypes.h"
 #include <assert.h>
 
 /*
index 9aa4a9e967f25761ed23638ca9a69871f3a53418..7690665de30fef6ff617e63b97d2279d57f2f208 100644 (file)
@@ -29,8 +29,6 @@
 
 #include "main/compiler.h"
 #include "main/mtypes.h"
-#include "program/prog_parameter.h"
-#include "program/program.h"
 
 /* Calculate the sampler index based on array indicies and also
  * calculate the base uniform location for struct members.
index 2a2fb5b093ffa35b9dced8dfba9891077f324ddb..cb0c827182cf44d9e208e6d306a61a25dd9d2553 100644 (file)
@@ -61,8 +61,6 @@
 
 #include "main/compiler.h"
 #include "main/mtypes.h"
-#include "program/prog_parameter.h"
-#include "program/program.h"
 
 struct lower_samplers_as_deref_state {
    nir_shader *shader;
index b3e9c79ce2c988b7a8fb7e0dcc960a635a594862..819d2e320d8c28ccc5753782e8c18ad3d10b4a40 100644 (file)
@@ -31,7 +31,6 @@
 
 
 #include <stdio.h>
-#include "main/core.h"
 #include <GL/glx.h>
 
 
index e420679313e64db430a9a0d73830b6f4b0e6ceba..d2b57d6b9dd455fb239c84f834148e33fed44173 100644 (file)
@@ -57,7 +57,7 @@ and create a window, you must do the following to use the X/Mesa interface:
 #define XMESA_H
 
 
-#include "main/core.h" /* for gl_config */
+#include "main/mtypes.h" /* for gl_config */
 #include "state_tracker/st_api.h"
 #include "os/os_thread.h"
 
index 937163b50b0acbbf8c13208ce58467164258caaa..0b632149cd972c92f41c1b5ba3de58624efe6e49 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "util/macros.h"
 #include "main/macros.h"
+#include "compiler/shader_enums.h"
 
 #include "gen_l3_config.h"
 
index d3ae6499b916f2db94f623ba09c00deaa6d6b61a..875b2936fd8d790a8687a0103a8e579d16874623 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include "dev/gen_device_info.h"
 #include "main/macros.h"
+#include "main/mtypes.h"
 #include "util/ralloc.h"
 
 #ifdef __cplusplus
index ca72666a55a641aee100fe66de24a926668a5973..120a74f0357b1cc820af495c0cb0222f23b533f4 100644 (file)
@@ -34,6 +34,7 @@
 #define BRW_EU_H
 
 #include <stdbool.h>
+#include <stdio.h>
 #include "brw_inst.h"
 #include "brw_eu_defines.h"
 #include "brw_reg.h"
index 92565ef8f5e7e8de3356c2479e5361a5b5582f66..d78493ed9d709d933a438d4a2a71d647cd54f72b 100644 (file)
@@ -55,7 +55,6 @@ MAIN_FILES = \
        main/convolve.h \
        main/copyimage.c \
        main/copyimage.h \
-       main/core.h \
        main/cpuinfo.c \
        main/cpuinfo.h \
        main/dd.h \
@@ -148,6 +147,7 @@ MAIN_FILES = \
        main/mipmap.h \
        main/mm.c \
        main/mm.h \
+       main/menums.h \
        main/mtypes.h \
        main/multisample.c \
        main/multisample.h \
index 5018f2fbf68123d9dee1e00a57958650fc49e4e4..062c83f79eccbfb9df0df6a452d113cc00e493cf 100644 (file)
 
 #include <GL/gl.h>
 #include <GL/internal/dri_interface.h>
-#include "main/mtypes.h"
+#include "main/menums.h"
+#include "main/formats.h"
 #include "util/xmlconfig.h"
 #include <stdbool.h>
 
+struct gl_config;
+struct gl_context;
+
 /**
  * Extensions.
  */
index 5361dcf5e34e604379a9aa70118971025206421f..a219c7fb1dcd7c9f01b3ca8921e85fa23249c3cc 100644 (file)
@@ -32,6 +32,7 @@
 #include <stdbool.h>
 #include <string.h>
 #include "main/mtypes.h"
+#include "main/errors.h"
 
 #include <drm.h>
 #include <intel_bufmgr.h>
index f049d086492e04fa46ea80ef3b70cc0deb1d3f91..6d424019183eebdfc3332eba5880d8b724ea1f57 100644 (file)
@@ -36,6 +36,7 @@
 #include <stdbool.h>
 #include "main/macros.h"
 #include "main/mtypes.h"
+#include "main/errors.h"
 #include "vbo/vbo.h"
 #include "brw_structs.h"
 #include "brw_pipe_control.h"
index 4b589cd8b83902201280f34082a5fd56effb9001..41c3df710e51359a51fb2722184760ff011f1f17 100644 (file)
@@ -31,6 +31,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  *   Keith Whitwell <keithw@vmware.com>
  */
 
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/imports.h"
 #include "main/enums.h"
index f69f4a0a1e210b0804fa5d86ddb448eda16bb0e5..7076ec0c7f377356019c4a46573c1ad5ed0ffae1 100644 (file)
@@ -30,6 +30,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
  *   Aapo Tahkola <aet@rasterburn.org>
  *   Roland Scheidegger <rscheidegger_lists@hispeed.ch>
  */
+
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/macros.h"
 #include "main/enums.h"
index 58d8fc54b79cab2b549f5fa6331c32dc3aae4745..8b72c98a3b22352d2682f7370b5fa37042b41d44 100644 (file)
@@ -41,7 +41,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "main/fbobject.h"
 #include "util/simple_list.h"
 #include "main/state.h"
-#include "main/core.h"
 #include "main/stencil.h"
 #include "main/viewport.h"
 
index b847be54c47d95bda1aeffddf57059c37a8706e1..6a8cf606dcb42b33c7e37ebcb27b18d8a517ddd5 100644 (file)
@@ -27,6 +27,7 @@
  *    Keith Whitwell <keithw@vmware.com>
  */
 
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/imports.h"
 #include "main/api_arrayelt.h"
index 965e0ad3aead34c47a17edb763e46450e663f458..6543a58f724197c5d939f1fa3acb07e0e4cae1b5 100644 (file)
 #ifndef API_ARRAYELT_H
 #define API_ARRAYELT_H
 
+#include <stdbool.h>
+#include "dd.h"
 
-#include "main/mtypes.h"
-
+struct _glapi_table;
 
 extern GLboolean _ae_create_context( struct gl_context *ctx );
 extern void _ae_destroy_context( struct gl_context *ctx );
index c43810752b07db8c5afc02cffdb3392e27aeeca9..913af7842fe0c069e7a7cefdbcfb3aebe6e6ee5a 100644 (file)
@@ -34,7 +34,7 @@
 
 
 #include "glheader.h"
-#include "mtypes.h"
+#include "menums.h"
 
 struct gl_context;
 struct gl_framebuffer;
index 33ca5af0731a4a71e2c97c27b433e799c3d73307..8cd305cb31f8a883a61e91075ac1c98240ff07de 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "config.h"
 #include "macros.h"
-#include "mtypes.h"
 
 
 /**
index 86be66f9e09dc0ff12c2078cec1e2b828d59e638..ef06540e9bab26e9638a455da3a7113806d301ee 100644 (file)
@@ -49,6 +49,7 @@
 #define CONTEXT_H
 
 
+#include "errors.h"
 #include "imports.h"
 #include "extensions.h"
 #include "mtypes.h"
index ea2f15b4352ba81f30187689a0d23e59dc3122c0..7cebb30d997c171486b5e3bbfb711dd95bb2d5bf 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef COPYIMAGE_H
 #define COPYIMAGE_H
 
-#include "mtypes.h"
+#include "glheader.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/src/mesa/main/core.h b/src/mesa/main/core.h
deleted file mode 100644 (file)
index 73ed01c..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 2010 LunarG Inc.
- *
- * 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 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:
- *    Chia-I Wu <olv@lunarg.com>
- */
-
-
-/**
- * \file core.h
- * The public header of core mesa.
- *
- * This file is the (only) public header of core mesa.  It is supposed to be
- * used by GLX, WGL, and GLSL.
- */
-
-
-#ifndef CORE_H
-#define CORE_H
-
-
-#include "main/glheader.h"
-#include "main/compiler.h"
-#include "main/imports.h"
-#include "main/macros.h"
-
-#include "main/mtypes.h"
-
-/* for GLSL */
-#include "program/prog_parameter.h"
-
-
-#endif /* CORE_H */
index 09e9c41244ef7e150c2dc622b644f9c68bfc5e1d..64ddd81883599b505d118563a5205c1d15e2be68 100644 (file)
@@ -31,9 +31,9 @@
 #ifndef DD_INCLUDED
 #define DD_INCLUDED
 
-/* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
-
 #include "glheader.h"
+#include "formats.h"
+#include "menums.h"
 
 struct gl_bitmap_atlas;
 struct gl_buffer_object;
@@ -50,6 +50,8 @@ struct gl_shader_program;
 struct gl_texture_image;
 struct gl_texture_object;
 struct gl_memory_info;
+struct gl_transform_feedback_object;
+struct ati_fragment_shader;
 struct util_queue_monitoring;
 struct _mesa_prim;
 struct _mesa_index_buffer;
index d7e0143a8f62453233755338708dd2219a7dcef6..b1fa1f067ff2a14d65e9071edf4b4a7acf361d4b 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include <stdio.h>
+#include "errors.h"
 #include "mtypes.h"
 #include "attrib.h"
 #include "enums.h"
index 63e3e7b48e4c1cb1d9bc7253756de903c798cb62..8a5eedc21f0cb80254897e22b8608af33343a86d 100644 (file)
 #include <stdio.h>
 #include <stdarg.h>
 #include "glheader.h"
-#include "mtypes.h"
+#include "menums.h"
 
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gl_context;
 
 void
 _mesa_init_debug_output(struct gl_context *ctx);
index 22b696f50c18c2658923e681e7f1882d44dc80d9..1ac17d5bb09d927d052eba8e50c6a7915b527f57 100644 (file)
@@ -33,8 +33,8 @@
 #define DLIST_H
 
 #include <stdio.h>
-#include "main/mtypes.h"
 
+struct gl_context;
 
 /**
  * Describes the location and size of a glBitmap image in a texture atlas.
index 9c4fdf90e3b8a19fac825901e42f4da9b88d0be5..6114b3277b03399b5a6abf77d6b272e9c0e0b4ac 100644 (file)
@@ -21,6 +21,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
+#include "main/errors.h"
 #include "main/drawtex.h"
 #include "main/state.h"
 #include "main/imports.h"
index b784b117761fd869d7e2244a48add20c0554f63d..5911da2956f090f93d13d12f9c7de91ea9dd3f99 100644 (file)
 #include <stdio.h>
 #include <stdarg.h>
 #include "glheader.h"
-#include "mtypes.h"
+#include "menums.h"
 
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gl_context;
+
 extern void
 _mesa_warning( struct gl_context *gc, const char *fmtString, ... ) PRINTFLIKE(2, 3);
 
index 5b2fce119480c3e26c904619045e6e62811e0251..938e3579b0ee3aae3786334c2330e5f2e0e95839 100644 (file)
@@ -37,7 +37,7 @@
 #define EVAL_H
 
 
-#include "main/mtypes.h"
+#include "dd.h"
 #include <stdbool.h>
 
 
index 21c5de7ad9d2f95b629881ac2c418ee01b0af4b0..2142b50a6e93e5a7c6a516a28a5fcec3aaea1840 100644 (file)
@@ -34,7 +34,7 @@
 #include <stdio.h>
 #include "imports.h"
 #include "execmem.h"
-
+#include "c11/threads.h"
 
 
 #if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun) || defined(__HAIKU__)
index 159610b6e122ac9f395ae5e5db25a9ef0a89f18d..705d65dcdb5c160420cc47bbe2cda409d0caba09 100644 (file)
@@ -36,7 +36,7 @@
 #ifndef _EXTENSIONS_H_
 #define _EXTENSIONS_H_
 
-#include "glheader.h"
+#include "mtypes.h"
 
 #ifdef __cplusplus
 extern "C" {
index 1e37fbcc4623d2cfe4b2cda5fcc2294dd2fd504a..6241705de13e198227179626c68faa1d1f74019d 100644 (file)
@@ -23,7 +23,6 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include "main/mtypes.h"
 #include "main/extensions.h"
 
 /**
index c7b639456cdfa596a75ce24a54f7e182160e6566..1c755592bd972e83b99cd00befb158fb33c13b50 100644 (file)
@@ -33,6 +33,7 @@
  */
 
 
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/mtypes.h"
 #include "main/macros.h"
index 71c467f7e9045c0110d14a624cc9160e7af3a09a..77ab16694ede6967943fc4344fa0e7cebda38ac9 100644 (file)
@@ -42,6 +42,8 @@ string = """/*
 
 #include <stdint.h>
 
+#include "config.h"
+#include "errors.h"
 #include "format_pack.h"
 #include "format_utils.h"
 #include "macros.h"
index c8b1b24d16996b1fc30dd40eae052f8bebcb416f..87f64cc151aaf79fbeef1e7e7c5838a985365640 100644 (file)
@@ -42,6 +42,7 @@ string = """/*
 
 #include <stdint.h>
 
+#include "errors.h"
 #include "format_unpack.h"
 #include "format_utils.h"
 #include "macros.h"
index 31580750bd45bfce9c10bfa4e3a16de3b6ab2f5d..6959bf062a1210b0b0dba66425b73bd31daa6b2f 100644 (file)
@@ -22,6 +22,7 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include "errors.h"
 #include "format_utils.h"
 #include "glformats.h"
 #include "format_pack.h"
index 378997b38b29324226aca68825731274986f0cc2..78365cab5332c8ffae68325117499c69ae6e703f 100644 (file)
@@ -31,6 +31,7 @@
 #ifndef FORMAT_UTILS_H
 #define FORMAT_UTILS_H
 
+#include "formats.h"
 #include "imports.h"
 #include "macros.h"
 #include "util/rounding.h"
index 8d32757a8795aa1a7c732a8d6c444a7e336b9541..fdb53afd5701b1b3fb6f7dbdff876fc756cddf01 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 
+#include "errors.h"
 #include "imports.h"
 #include "formats.h"
 #include "macros.h"
index 5c9d8263ed153ff89bbe4901f6e4df00d20c947b..844f1e270c01f6ab253947aac85afd59fc7fba35 100644 (file)
@@ -36,6 +36,8 @@
 extern "C" {
 #endif
 
+struct gl_context;
+
 extern void
 _mesa_compute_component_mapping(GLenum inFormat, GLenum outFormat, GLubyte *map);
 
index a6e6b6a2e64ae317e4469f39c259baaa8d04538b..16648820b1b6ddc9d93a5f3da09360dae7be56ba 100644 (file)
 extern "C" {
 #endif
 
+
 /* Custom Mesa types to save space. */
 typedef unsigned short GLenum16;
 typedef unsigned char GLbitfield8;
 typedef unsigned short GLbitfield16;
+typedef GLuint64 GLbitfield64;
 
 typedef int GLclampx;
 
index 71dc9154ef2f158b0e7dde01ac6c5904a6134b24..c585bc51bbf7afa7ee7139a07aa5bb9f174814ff 100644 (file)
@@ -24,6 +24,7 @@
 #include "glspirv.h"
 #include "errors.h"
 #include "shaderobj.h"
+#include "mtypes.h"
 
 #include "compiler/nir/nir.h"
 #include "compiler/spirv/nir_spirv.h"
index 81626ce75b5568e478fc2ce783e38b0a31dd7964..cbcd3c0bcbc4ac378061020ad53b0c4529d53c5f 100644 (file)
 #define GLSPIRV_H
 
 #include "compiler/nir/nir.h"
-#include "mtypes.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gl_context;
+struct gl_shader;
+
 /**
  * A SPIR-V module contains the raw SPIR-V binary as set by ShaderBinary.
  *
index 306246ca1c5c9a60202e597c43a784c675194275..8cd5d0226743d92dacf35600f83a78ee62e9920e 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef _GLTHREAD_H
 #define _GLTHREAD_H
 
-#include "main/mtypes.h"
-
 /* The size of one batch and the maximum size of one call.
  *
  * This should be as low as possible, so that:
@@ -50,6 +48,7 @@
 #include "util/u_queue.h"
 
 enum marshal_dispatch_cmd_id;
+struct gl_context;
 
 /** A single batch of commands queued up for execution. */
 struct glthread_batch
index d0e575ea6b3b8896ac38047bd9d40aa1eecf0c9a..9a6d5ed5edbd1942c29dccd5dd5a93ca6c21328b 100644 (file)
@@ -34,6 +34,7 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include "errors.h"
 #include "glheader.h"
 #include "hash.h"
 #include "util/hash_table.h"
index 02960e3b3568c198604d1b0d500c01ae0c9cf386..64f2962aba6b054447356b1238e3b813aacfd556 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "glheader.h"
 #include "imports.h"
+#include "c11/threads.h"
 
 /**
  * Magic GLuint object name that gets stored outside of the struct hash_table.
index de4dd0e33d56f3aef742994366c000451e14915f..b4685b6dc35d43ad4159bb56de0e6d0fcfea76cb 100644 (file)
@@ -48,7 +48,6 @@
 #include "util/rounding.h" /* for _mesa_roundeven */
 #include "imports.h"
 #include "context.h"
-#include "mtypes.h"
 #include "version.h"
 
 #ifdef _GNU_SOURCE
index 51fa72cbc37a465ae52d144df1434d9004095ace..72ce8783ddb37df62315afabdf9be64707b167c2 100644 (file)
@@ -41,7 +41,6 @@
 #include <string.h>
 #include "compiler.h"
 #include "glheader.h"
-#include "errors.h"
 #include "util/bitscan.h"
 
 #ifdef __cplusplus
diff --git a/src/mesa/main/menums.h b/src/mesa/main/menums.h
new file mode 100644 (file)
index 0000000..40b16cb
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
+ * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
+ * Copyright (C) 2018 Advanced Micro Devices, Inc.  All Rights Reserved.
+ *
+ * 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 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.
+ */
+
+/**
+ * \file menums.h
+ * Often used definitions and enums.
+ */
+
+#ifndef MENUMS_H
+#define MENUMS_H
+
+#include "util/macros.h"
+
+/**
+ * Enum for the OpenGL APIs we know about and may support.
+ *
+ * NOTE: This must match the api_enum table in
+ * src/mesa/main/get_hash_generator.py
+ */
+typedef enum
+{
+   API_OPENGL_COMPAT,      /* legacy / compatibility contexts */
+   API_OPENGLES,
+   API_OPENGLES2,
+   API_OPENGL_CORE,
+   API_OPENGL_LAST = API_OPENGL_CORE
+} gl_api;
+
+/**
+ * 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;
+
+/**
+ * Remapped color logical operations
+ *
+ * With the exception of NVIDIA hardware, which consumes the OpenGL enumerants
+ * directly, everything wants this mapping of color logical operations.
+ *
+ * Fun fact: These values are just the bit-reverse of the low-nibble of the GL
+ * enumerant values (i.e., `GL_NOOP & 0x0f` is `b0101' while
+ * \c COLOR_LOGICOP_NOOP is `b1010`).
+ *
+ * Fun fact #2: These values are just an encoding of the operation as a table
+ * of bit values. The result of the logic op is:
+ *
+ *    result_bit = (logic_op >> (2 * src_bit + dst_bit)) & 1
+ *
+ * For the GL enums, the result is:
+ *
+ *    result_bit = logic_op & (1 << (2 * src_bit + dst_bit))
+ */
+enum PACKED gl_logicop_mode {
+   COLOR_LOGICOP_CLEAR = 0,
+   COLOR_LOGICOP_NOR = 1,
+   COLOR_LOGICOP_AND_INVERTED = 2,
+   COLOR_LOGICOP_COPY_INVERTED = 3,
+   COLOR_LOGICOP_AND_REVERSE = 4,
+   COLOR_LOGICOP_INVERT = 5,
+   COLOR_LOGICOP_XOR = 6,
+   COLOR_LOGICOP_NAND = 7,
+   COLOR_LOGICOP_AND = 8,
+   COLOR_LOGICOP_EQUIV = 9,
+   COLOR_LOGICOP_NOOP = 10,
+   COLOR_LOGICOP_OR_INVERTED = 11,
+   COLOR_LOGICOP_COPY = 12,
+   COLOR_LOGICOP_OR_REVERSE = 13,
+   COLOR_LOGICOP_OR = 14,
+   COLOR_LOGICOP_SET = 15
+};
+
+/**
+ * Indexes for all renderbuffers
+ */
+typedef enum
+{
+   /* the four standard color buffers */
+   BUFFER_FRONT_LEFT,
+   BUFFER_BACK_LEFT,
+   BUFFER_FRONT_RIGHT,
+   BUFFER_BACK_RIGHT,
+   BUFFER_DEPTH,
+   BUFFER_STENCIL,
+   BUFFER_ACCUM,
+   /* optional aux buffer */
+   BUFFER_AUX0,
+   /* generic renderbuffers */
+   BUFFER_COLOR0,
+   BUFFER_COLOR1,
+   BUFFER_COLOR2,
+   BUFFER_COLOR3,
+   BUFFER_COLOR4,
+   BUFFER_COLOR5,
+   BUFFER_COLOR6,
+   BUFFER_COLOR7,
+   BUFFER_COUNT,
+   BUFFER_NONE = -1,
+} gl_buffer_index;
+
+typedef enum
+{
+   MAP_USER,
+   MAP_INTERNAL,
+   MAP_COUNT
+} gl_map_buffer_index;
+
+/** @{
+ *
+ * These are a mapping of the GL_ARB_debug_output/GL_KHR_debug enums
+ * to small enums suitable for use as an array index.
+ */
+
+enum mesa_debug_source
+{
+   MESA_DEBUG_SOURCE_API,
+   MESA_DEBUG_SOURCE_WINDOW_SYSTEM,
+   MESA_DEBUG_SOURCE_SHADER_COMPILER,
+   MESA_DEBUG_SOURCE_THIRD_PARTY,
+   MESA_DEBUG_SOURCE_APPLICATION,
+   MESA_DEBUG_SOURCE_OTHER,
+   MESA_DEBUG_SOURCE_COUNT
+};
+
+enum mesa_debug_type
+{
+   MESA_DEBUG_TYPE_ERROR,
+   MESA_DEBUG_TYPE_DEPRECATED,
+   MESA_DEBUG_TYPE_UNDEFINED,
+   MESA_DEBUG_TYPE_PORTABILITY,
+   MESA_DEBUG_TYPE_PERFORMANCE,
+   MESA_DEBUG_TYPE_OTHER,
+   MESA_DEBUG_TYPE_MARKER,
+   MESA_DEBUG_TYPE_PUSH_GROUP,
+   MESA_DEBUG_TYPE_POP_GROUP,
+   MESA_DEBUG_TYPE_COUNT
+};
+
+enum mesa_debug_severity
+{
+   MESA_DEBUG_SEVERITY_LOW,
+   MESA_DEBUG_SEVERITY_MEDIUM,
+   MESA_DEBUG_SEVERITY_HIGH,
+   MESA_DEBUG_SEVERITY_NOTIFICATION,
+   MESA_DEBUG_SEVERITY_COUNT
+};
+
+/** @} */
+
+/** Set a single bit */
+#define BITFIELD_BIT(b)      (1u << (b))
+/** Set all bits up to excluding bit b */
+#define BITFIELD_MASK(b)      \
+   ((b) == 32 ? (~0u) : BITFIELD_BIT((b) % 32) - 1)
+/** Set count bits starting from bit b  */
+#define BITFIELD_RANGE(b, count) \
+   (BITFIELD_MASK((b) + (count)) & ~BITFIELD_MASK(b))
+
+
+/**
+ * \name 64-bit extension of GLbitfield.
+ */
+/*@{*/
+
+/** Set a single bit */
+#define BITFIELD64_BIT(b)      (1ull << (b))
+/** Set all bits up to excluding bit b */
+#define BITFIELD64_MASK(b)      \
+   ((b) == 64 ? (~0ull) : BITFIELD64_BIT(b) - 1)
+/** Set count bits starting from bit b  */
+#define BITFIELD64_RANGE(b, count) \
+   (BITFIELD64_MASK((b) + (count)) & ~BITFIELD64_MASK(b))
+
+#endif
index 1ed82c52ab6d9e8fb80912dca7c65c91594edc8a..9b6eee41dbdd95be1b8adaed6ab35a0804c2b707 100644 (file)
@@ -27,6 +27,7 @@
  * \file mipmap.c  mipmap generation and teximage resizing functions.
  */
 
+#include "errors.h"
 #include "imports.h"
 #include "formats.h"
 #include "glformats.h"
index 1f108f7e5d8e82111927f69cea5d208421eec8d6..3ec997217439450a66008544c6952dd06f244b35 100644 (file)
 #ifndef MIPMAP_H
 #define MIPMAP_H
 
-#include "mtypes.h"
+#include "glheader.h"
+
+struct gl_context;
+struct gl_texture_object;
 
 unsigned
 _mesa_compute_num_levels(struct gl_context *ctx,
index b7a7b34a090035cebca56d23f52e1ef240460af8..b65e7b2c3c2ec866b129acaa1a362128d2491bb0 100644 (file)
@@ -39,6 +39,7 @@
 #include "c11/threads.h"
 
 #include "main/glheader.h"
+#include "main/menums.h"
 #include "main/config.h"
 #include "glapi/glapi.h"
 #include "math/m_matrix.h"     /* GLmatrix */
 extern "C" {
 #endif
 
-
-/** Set a single bit */
-#define BITFIELD_BIT(b)      ((GLbitfield)1 << (b))
-/** Set all bits up to excluding bit b */
-#define BITFIELD_MASK(b)      \
-   ((b) == 32 ? (~(GLbitfield)0) : BITFIELD_BIT((b) % 32) - 1)
-/** Set count bits starting from bit b  */
-#define BITFIELD_RANGE(b, count) \
-   (BITFIELD_MASK((b) + (count)) & ~BITFIELD_MASK(b))
-
-
-/**
- * \name 64-bit extension of GLbitfield.
- */
-/*@{*/
-typedef GLuint64 GLbitfield64;
-
-/** Set a single bit */
-#define BITFIELD64_BIT(b)      ((GLbitfield64)1 << (b))
-/** Set all bits up to excluding bit b */
-#define BITFIELD64_MASK(b)      \
-   ((b) == 64 ? (~(GLbitfield64)0) : BITFIELD64_BIT(b) - 1)
-/** Set count bits starting from bit b  */
-#define BITFIELD64_RANGE(b, count) \
-   (BITFIELD64_MASK((b) + (count)) & ~BITFIELD64_MASK(b))
-
-
 #define GET_COLORMASK_BIT(mask, buf, chan) (((mask) >> (4 * (buf) + (chan))) & 0x1)
 #define GET_COLORMASK(mask, buf) (((mask) >> (4 * (buf))) & 0xf)
 
@@ -135,34 +109,6 @@ _mesa_varying_slot_in_fs(gl_varying_slot slot)
    }
 }
 
-/**
- * Indexes for all renderbuffers
- */
-typedef enum
-{
-   /* the four standard color buffers */
-   BUFFER_FRONT_LEFT,
-   BUFFER_BACK_LEFT,
-   BUFFER_FRONT_RIGHT,
-   BUFFER_BACK_RIGHT,
-   BUFFER_DEPTH,
-   BUFFER_STENCIL,
-   BUFFER_ACCUM,
-   /* optional aux buffer */
-   BUFFER_AUX0,
-   /* generic renderbuffers */
-   BUFFER_COLOR0,
-   BUFFER_COLOR1,
-   BUFFER_COLOR2,
-   BUFFER_COLOR3,
-   BUFFER_COLOR4,
-   BUFFER_COLOR5,
-   BUFFER_COLOR6,
-   BUFFER_COLOR7,
-   BUFFER_COUNT,
-   BUFFER_NONE = -1,
-} gl_buffer_index;
-
 /**
  * Bit flags for all renderbuffers
  */
@@ -417,43 +363,6 @@ union gl_color_union
    GLuint ui[4];
 };
 
-/**
- * Remapped color logical operations
- *
- * With the exception of NVIDIA hardware, which consumes the OpenGL enumerants
- * directly, everything wants this mapping of color logical operations.
- *
- * Fun fact: These values are just the bit-reverse of the low-nibble of the GL
- * enumerant values (i.e., `GL_NOOP & 0x0f` is `b0101' while
- * \c COLOR_LOGICOP_NOOP is `b1010`).
- *
- * Fun fact #2: These values are just an encoding of the operation as a table
- * of bit values. The result of the logic op is:
- *
- *    result_bit = (logic_op >> (2 * src_bit + dst_bit)) & 1
- *
- * For the GL enums, the result is:
- *
- *    result_bit = logic_op & (1 << (2 * src_bit + dst_bit))
- */
-enum PACKED gl_logicop_mode {
-   COLOR_LOGICOP_CLEAR = 0,
-   COLOR_LOGICOP_NOR = 1,
-   COLOR_LOGICOP_AND_INVERTED = 2,
-   COLOR_LOGICOP_COPY_INVERTED = 3,
-   COLOR_LOGICOP_AND_REVERSE = 4,
-   COLOR_LOGICOP_INVERT = 5,
-   COLOR_LOGICOP_XOR = 6,
-   COLOR_LOGICOP_NAND = 7,
-   COLOR_LOGICOP_AND = 8,
-   COLOR_LOGICOP_EQUIV = 9,
-   COLOR_LOGICOP_NOOP = 10,
-   COLOR_LOGICOP_OR_INVERTED = 11,
-   COLOR_LOGICOP_COPY = 12,
-   COLOR_LOGICOP_OR_REVERSE = 13,
-   COLOR_LOGICOP_OR = 14,
-   COLOR_LOGICOP_SET = 15
-};
 
 /**
  * Color buffer attribute group (GL_COLOR_BUFFER_BIT).
@@ -917,29 +826,6 @@ struct gl_stencil_attrib
 };
 
 
-/**
- * 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;
-
-
 /**
  * Bit flags for each type of texture object
  */
@@ -1411,14 +1297,6 @@ struct gl_viewport_attrib
 };
 
 
-typedef enum
-{
-   MAP_USER,
-   MAP_INTERNAL,
-   MAP_COUNT
-} gl_map_buffer_index;
-
-
 /**
  * Fields describing a mapped buffer range.
  */
@@ -1628,22 +1506,6 @@ struct gl_vertex_array_object
 };
 
 
-/**
- * Enum for the OpenGL APIs we know about and may support.
- *
- * NOTE: This must match the api_enum table in
- * src/mesa/main/get_hash_generator.py
- */
-typedef enum
-{
-   API_OPENGL_COMPAT,      /* legacy / compatibility contexts */
-   API_OPENGLES,
-   API_OPENGLES2,
-   API_OPENGL_CORE,
-   API_OPENGL_LAST = API_OPENGL_CORE
-} gl_api;
-
-
 /**
  * Vertex array state
  */
@@ -2112,39 +1974,6 @@ struct gl_bindless_image
 };
 
 
-/**
- * Names of the various vertex/fragment program register files, etc.
- *
- * NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c)
- * All values should fit in a 4-bit field.
- *
- * NOTE: PROGRAM_STATE_VAR, PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be
- * considered to be "uniform" variables since they can only be set outside
- * glBegin/End.  They're also all stored in the same Parameters array.
- */
-typedef enum
-{
-   PROGRAM_TEMPORARY,   /**< machine->Temporary[] */
-   PROGRAM_ARRAY,       /**< Arrays & Matrixes */
-   PROGRAM_INPUT,       /**< machine->Inputs[] */
-   PROGRAM_OUTPUT,      /**< machine->Outputs[] */
-   PROGRAM_STATE_VAR,   /**< gl_program->Parameters[] */
-   PROGRAM_CONSTANT,    /**< gl_program->Parameters[] */
-   PROGRAM_UNIFORM,     /**< gl_program->Parameters[] */
-   PROGRAM_WRITE_ONLY,  /**< A dummy, write-only register */
-   PROGRAM_ADDRESS,     /**< machine->AddressReg */
-   PROGRAM_SAMPLER,     /**< for shader samplers, compile-time only */
-   PROGRAM_SYSTEM_VALUE,/**< InstanceId, PrimitiveID, etc. */
-   PROGRAM_UNDEFINED,   /**< Invalid/TBD value */
-   PROGRAM_IMMEDIATE,   /**< Immediate value, used by TGSI */
-   PROGRAM_BUFFER,      /**< for shader buffers, compile-time only */
-   PROGRAM_MEMORY,      /**< for shared, global and local memory */
-   PROGRAM_IMAGE,       /**< for shader images, compile-time only */
-   PROGRAM_HW_ATOMIC,   /**< for hw atomic counters, compile-time only */
-   PROGRAM_FILE_MAX
-} gl_register_file;
-
-
 /**
  * Current vertex processing mode: fixed function vs. shader.
  * In reality, fixed function is probably implemented by a shader but that's
@@ -4531,48 +4360,6 @@ struct gl_dlist_state
    } Current;
 };
 
-/** @{
- *
- * These are a mapping of the GL_ARB_debug_output/GL_KHR_debug enums
- * to small enums suitable for use as an array index.
- */
-
-enum mesa_debug_source
-{
-   MESA_DEBUG_SOURCE_API,
-   MESA_DEBUG_SOURCE_WINDOW_SYSTEM,
-   MESA_DEBUG_SOURCE_SHADER_COMPILER,
-   MESA_DEBUG_SOURCE_THIRD_PARTY,
-   MESA_DEBUG_SOURCE_APPLICATION,
-   MESA_DEBUG_SOURCE_OTHER,
-   MESA_DEBUG_SOURCE_COUNT
-};
-
-enum mesa_debug_type
-{
-   MESA_DEBUG_TYPE_ERROR,
-   MESA_DEBUG_TYPE_DEPRECATED,
-   MESA_DEBUG_TYPE_UNDEFINED,
-   MESA_DEBUG_TYPE_PORTABILITY,
-   MESA_DEBUG_TYPE_PERFORMANCE,
-   MESA_DEBUG_TYPE_OTHER,
-   MESA_DEBUG_TYPE_MARKER,
-   MESA_DEBUG_TYPE_PUSH_GROUP,
-   MESA_DEBUG_TYPE_POP_GROUP,
-   MESA_DEBUG_TYPE_COUNT
-};
-
-enum mesa_debug_severity
-{
-   MESA_DEBUG_SEVERITY_LOW,
-   MESA_DEBUG_SEVERITY_MEDIUM,
-   MESA_DEBUG_SEVERITY_HIGH,
-   MESA_DEBUG_SEVERITY_NOTIFICATION,
-   MESA_DEBUG_SEVERITY_COUNT
-};
-
-/** @} */
-
 /**
  * Driver-specific state flags.
  *
index 94a6d285d8ec14071b27ab03e7c8015704b0301e..64ad115f8b5a25d6c9427e4279d81695aae2dff0 100644 (file)
@@ -42,6 +42,7 @@
 #endif
 
 
+#include "errors.h"
 #include "glheader.h"
 #include "enums.h"
 #include "image.h"
index ac0a099e3913101d66eeaffa6dcda3daf20c0128..8625a145fcaf97d5bdeb26d62e85c385978a6a92 100644 (file)
 #define PACK_H
 
 
-#include "mtypes.h"
+#include "glheader.h"
 
+struct gl_context;
+struct gl_pixelstore_attrib;
 
 extern void
 _mesa_unpack_polygon_stipple(const GLubyte *pattern, GLuint dest[32],
index 7762324a4ae30caaa1a40cf8d043bf1bb9453d08..cea55f2a0d29eb7fe55969bdf644b1323980a838 100644 (file)
@@ -31,6 +31,7 @@
 
 
 
+#include "errors.h"
 #include "glheader.h"
 #include "bufferobj.h"
 #include "glformats.h"
index b3f24e62bd2ab5a126c62c01a08464113a42e1f0..bc764175ff4a1392eb1872b822805d7bc731ff3e 100644 (file)
 #define PBO_H
 
 
-#include "mtypes.h"
+#include "glheader.h"
 
+struct gl_context;
+struct gl_pixelstore_attrib;
 
 extern GLboolean
 _mesa_validate_pbo_access(GLuint dimensions,
index b0a301f2638acc68764b30193533c8339a05fa93..caa2911fcf1d2409c02739b40fcdf171480bf256 100644 (file)
@@ -28,7 +28,9 @@
 #define PIXELTRANSFER_H
 
 
-#include "mtypes.h"
+#include "glheader.h"
+
+struct gl_context;
 
 
 extern void
index 18361c929fb5d2627bbd6112c98f7b6ec2eb73f3..b80bae6a6d26c2931f19d90e76527c26a3d82aaa 100644 (file)
@@ -17,6 +17,7 @@
 #include "glheader.h"
 #include "querymatrix.h"
 #include "main/get.h"
+#include "util/macros.h"
 
 
 /**
index e08d843a963b613a94bd2e4a14c9d1b207fc484b..64921891000a52c7a89951b82774e8b6e9e1c30c 100644 (file)
@@ -25,7 +25,7 @@
 #define QUERYMATRIX_H
 
 
-#include "mtypes.h"
+#include "glheader.h"
 
 
 /*
index 6dc4235cba0b43ef5494fde1db2d4442b585240a..fa412c0c4f7c1c3988c18378e22299990b198f8b 100644 (file)
@@ -44,6 +44,7 @@
 
 #define need_MESA_remap_table
 #include "main/remap_helper.h"
+#include "errors.h"
 
 
 /* this is global for quick access */
index f9a6462d536a089f966b33d413b149aa4eae929e..3f568e1e7f1b61763b4ad3678807a2cc66b0e142 100644 (file)
@@ -27,7 +27,7 @@
 #define RENDERBUFFER_H
 
 #include "glheader.h"
-#include "mtypes.h"
+#include "menums.h"
 
 #ifdef __cplusplus
 extern "C" {
index 6712bb45fb2850f5845cc6eb05d270535f34f2ea..86064a98b97f406465daa2b01b6fcc805740eb0d 100644 (file)
@@ -29,7 +29,6 @@
  */
 
 #include "main/context.h"
-#include "main/core.h"
 #include "main/enums.h"
 #include "main/shaderapi.h"
 #include "main/shaderobj.h"
index 7915248e391df623fce4372a9333eeda90c2ac00..dbfd68fd3a19743e136c238ec96321b600236576 100644 (file)
@@ -29,7 +29,7 @@
 
 
 #include "glheader.h"
-
+#include "compiler/shader_enums.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -38,6 +38,11 @@ extern "C" {
 
 struct _glapi_table;
 struct gl_context;
+struct gl_linked_shader;
+struct gl_pipeline_object;
+struct gl_program;
+struct gl_program_resource;
+struct gl_shader;
 struct gl_shader_program;
 
 extern GLbitfield
index fedb4dc3dec4953b6868842be89b00570a4b4fe0..c7ccc54afe43ef50d41bb4a5dab7bbc6fb8f5e5b 100644 (file)
 
 
 #include "main/glheader.h"
-#include "main/mtypes.h"
+#include "compiler/shader_enums.h"
 #include "program/ir_to_mesa.h"
+#include "util/macros.h"
 
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gl_shader_program_data;
+struct gl_linked_shader;
+struct dd_function_table;
+struct gl_pipeline_object;
 
 /**
  * Internal functions
index 26e59158007c966b0c35f3dde11e7c9c1c095a28..fd37be97f36dc586278e3da33ff0d48d2013546c 100644 (file)
@@ -34,6 +34,7 @@
 #include "texstore.h"
 #include "macros.h"
 #include "image.h"
+#include "mtypes.h"
 
 #define BLOCK_SIZE 4
 #define N_PARTITIONS 64
index faeaae90937ef5f14b6632545f206b74242effa5..099787b7f407633b1cc4f9d853ffb11a7fa40b19 100644 (file)
@@ -41,6 +41,7 @@
 #include "texcompress.h"
 #include "texcompress_etc.h"
 #include "texstore.h"
+#include "config.h"
 #include "macros.h"
 #include "format_unpack.h"
 #include "util/format_srgb.h"
index c5646fbd7a35e26a21498ee4f58f9fe0724fc421..19df6baf371984d1fefef37f2d1d0704a75888c6 100644 (file)
@@ -29,6 +29,7 @@
  */
 
 
+#include "errors.h"
 #include "glheader.h"
 #include "imports.h"
 #include "image.h"
@@ -37,6 +38,7 @@
 #include "texcompress.h"
 #include "texcompress_fxt1.h"
 #include "texstore.h"
+#include "mtypes.h"
 
 
 static void
index 8cab7a56b1af6174410b4731b13d64be846c9d5e..843b42e54e600aa0b1e193d9dceb1cf2d9cb8907 100644 (file)
@@ -33,6 +33,7 @@
  */
 
 
+#include "config.h"
 #include "glheader.h"
 #include "imports.h"
 #include "image.h"
index dbac1fe8cb8acce2907b26388923e89702324f93..743e6b73ddff13626190759993521820372d1a1b 100644 (file)
@@ -33,7 +33,6 @@
 
 
 #include "glheader.h"
-#include "mtypes.h"
 #include "samplerobj.h"
 
 
index 3314e557c0ad2f12cc6b8688ed3ba7ac0142d8a1..31163f67717d90698f1393ed67842ad3bbb3b0eb 100644 (file)
@@ -51,6 +51,7 @@
  */
 
 
+#include "errors.h"
 #include "glheader.h"
 #include "bufferobj.h"
 #include "format_pack.h"
index b8281c51e2a9770d87d4dde92dbad09db6d3f8b1..2fef7ba7d7daccfbcbc49fa1558d74fec2e0ff2e 100644 (file)
 #define TEXSTORE_H
 
 
-#include "mtypes.h"
+#include "glheader.h"
 #include "formats.h"
+#include "util/macros.h"
 
+struct gl_context;
+struct gl_pixelstore_attrib;
+struct gl_texture_image;
 
 /**
  * This macro defines the (many) parameters to the texstore functions.
index 8a9fff6d57ec763331ecd7d570a54eb4c3f08712..ac97e95e81c0c306ed5168a09b51b05dea56ade4 100644 (file)
 #ifndef TEXTUREBINDLESS_H
 #define TEXTUREBINDLESS_H
 
-#include "mtypes.h"
+#include "glheader.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gl_context;
+
 /**
  * \name Internal functions
  */
index f901fcb3e5866450a91909fec77ec336f71d37ad..de594fcc3d7a435c8847aec98a8f8b7d6027c389 100644 (file)
@@ -26,8 +26,8 @@
 
 #include <stdlib.h>
 #include <inttypes.h>  /* for PRIx64 macro */
+#include <math.h>
 
-#include "main/core.h"
 #include "main/context.h"
 #include "main/shaderapi.h"
 #include "main/shaderobj.h"
index 77027be8002b7eb444fe3fe147bafc00075a1392..25d2a29e731e16d2389d5ee5204cb0b79d9cd6c5 100644 (file)
@@ -27,8 +27,6 @@
 #ifndef VARRAY_H
 #define VARRAY_H
 
-
-#include "mtypes.h"
 #include "bufferobj.h"
 
 
index adfec6f828256c3cf005d842db64399ec272ea95..4469509c08efb01048e0802acb95c32abe05fd3c 100644 (file)
 #ifndef VERSION_H
 #define VERSION_H
 
-#include "mtypes.h"
+#include <stdbool.h>
+#include "glheader.h"
+#include "menums.h"
 
+struct gl_context;
+struct gl_constants;
+struct gl_extensions;
 
 extern GLuint
 _mesa_get_version(const struct gl_extensions *extensions,
index 4f8bc9cdf06a4ab8d0149f1364a5803029bc07de..20fc466701951eb79e7547c7947696a16457e043 100644 (file)
 #ifndef _VTXFMT_H_
 #define _VTXFMT_H_
 
-#include "mtypes.h"
+#include "dd.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gl_context;
+
 extern void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt );
 extern void _mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt );
 extern void _mesa_initialize_vbo_vtxfmt(struct gl_context *ctx);
index 493d0e5cb275adc97c751c4089b33007d242857f..57a49533de201913dc2877c0420ae77d48e55aa3 100644 (file)
@@ -35,6 +35,7 @@
 
 
 #include "c99_math.h"
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/imports.h"
 #include "main/macros.h"
index d2d058bfa3c7a5824c2f5e9572737ef9a97650e4..7bfd19690a9e94e456a0f51b54b1948f7c6f0c06 100644 (file)
@@ -106,7 +106,6 @@ files_libmesa_common = files(
   'main/convolve.h',
   'main/copyimage.c',
   'main/copyimage.h',
-  'main/core.h',
   'main/cpuinfo.c',
   'main/cpuinfo.h',
   'main/dd.h',
@@ -190,6 +189,7 @@ files_libmesa_common = files(
   'main/mipmap.h',
   'main/mm.c',
   'main/mm.h',
+  'main/menums.h',
   'main/mtypes.h',
   'main/multisample.c',
   'main/multisample.h',
index 9714f50443aa164209d4e83a958c0cc0b3355f8c..7a4911cd74adfd2a715c7c8747202c292da48517 100644 (file)
@@ -33,6 +33,8 @@ extern "C" {
 struct gl_context;
 struct gl_shader;
 struct gl_shader_program;
+struct gl_linked_shader;
+struct gl_program_parameter_list;
 
 void _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
 GLboolean _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
index b5a7a692aeb664f832d2c5bd3a3dfae121d43d04..c50465dfc4989510feda669cf1877609d40ce4fe 100644 (file)
 
 
 #include "c99_math.h"
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/macros.h"
+#include "main/mtypes.h"
 #include "prog_execute.h"
 #include "prog_instruction.h"
 #include "prog_parameter.h"
index 3603e3bdddf1d3f8a2a0044e95295f92cd3c37a3..ef04087301ecb2e26d74cbb95d90523a40c32d7a 100644 (file)
 #define PROG_EXECUTE_H
 
 #include "main/config.h"
-#include "main/mtypes.h"
+#include "main/glheader.h"
+#include "compiler/shader_enums.h"
 
+struct gl_context;
 
 typedef void (*FetchTexelLodFunc)(struct gl_context *ctx, const GLfloat texcoord[4],
                                   GLfloat lambda, GLuint unit, GLfloat color[4]);
index 9f03867f0b01623a2b104fda17ba05ca333b7d0b..91830d87f25d9b928560fb1d14beb1ba5c2d451c 100644 (file)
@@ -26,8 +26,8 @@
 
 #include "main/glheader.h"
 #include "main/imports.h"
-#include "main/mtypes.h"
 #include "prog_instruction.h"
+#include "prog_parameter.h"
 
 
 /**
index 8e36a1c59048bd6150eb217c8f0e0b40c6e1569f..cc551c189105905a5a357abef37918b1b8d44cbc 100644 (file)
@@ -31,7 +31,6 @@
 #ifndef PROG_PARAMETER_H
 #define PROG_PARAMETER_H
 
-#include "main/mtypes.h"
 #include "prog_statevars.h"
 
 #include <string.h>
 extern "C" {
 #endif
 
+/**
+ * Names of the various vertex/fragment program register files, etc.
+ *
+ * NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c)
+ * All values should fit in a 4-bit field.
+ *
+ * NOTE: PROGRAM_STATE_VAR, PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be
+ * considered to be "uniform" variables since they can only be set outside
+ * glBegin/End.  They're also all stored in the same Parameters array.
+ */
+typedef enum
+{
+   PROGRAM_TEMPORARY,   /**< machine->Temporary[] */
+   PROGRAM_ARRAY,       /**< Arrays & Matrixes */
+   PROGRAM_INPUT,       /**< machine->Inputs[] */
+   PROGRAM_OUTPUT,      /**< machine->Outputs[] */
+   PROGRAM_STATE_VAR,   /**< gl_program->Parameters[] */
+   PROGRAM_CONSTANT,    /**< gl_program->Parameters[] */
+   PROGRAM_UNIFORM,     /**< gl_program->Parameters[] */
+   PROGRAM_WRITE_ONLY,  /**< A dummy, write-only register */
+   PROGRAM_ADDRESS,     /**< machine->AddressReg */
+   PROGRAM_SAMPLER,     /**< for shader samplers, compile-time only */
+   PROGRAM_SYSTEM_VALUE,/**< InstanceId, PrimitiveID, etc. */
+   PROGRAM_UNDEFINED,   /**< Invalid/TBD value */
+   PROGRAM_IMMEDIATE,   /**< Immediate value, used by TGSI */
+   PROGRAM_BUFFER,      /**< for shader buffers, compile-time only */
+   PROGRAM_MEMORY,      /**< for shared, global and local memory */
+   PROGRAM_IMAGE,       /**< for shader images, compile-time only */
+   PROGRAM_HW_ATOMIC,   /**< for hw atomic counters, compile-time only */
+   PROGRAM_FILE_MAX
+} gl_register_file;
+
 
 /**
  * Actual data for constant values of parameters.
index 98a43e63a0039cf21c32cb45273f2c3268fb7329..89fc42363cd86ad403018d46cbaa530dcff075ca 100644 (file)
@@ -29,7 +29,7 @@
 #include <stdio.h>
 
 #include "main/glheader.h"
-#include "main/mtypes.h"
+#include "prog_parameter.h"
 
 
 #ifdef __cplusplus
index 3ee44ce489eb89eb3120e1eecdc29a71a65b9103..cd874e489f3d401e4a7d662f8483873ebd5b3ab5 100644 (file)
@@ -27,6 +27,7 @@
 #include "compiler/nir/nir_builder.h"
 #include "compiler/glsl/list.h"
 #include "main/imports.h"
+#include "main/mtypes.h"
 #include "util/ralloc.h"
 
 #include "prog_to_nir.h"
index 659385f55b19065f604acb72ff482789eeab1a57..49e888e57df248e60ebff7921653c15e0e9934aa 100644 (file)
@@ -40,7 +40,7 @@
 #ifndef PROGRAM_H
 #define PROGRAM_H
 
-#include "main/mtypes.h"
+#include "prog_parameter.h"
 
 
 #ifdef __cplusplus
index 9b63764f7521d927d75d8b9430e921a1bda6ffd8..415ff2a28ecc3920570a488f11c3b90971d97d1a 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "main/errors.h"
 #include "main/mtypes.h"
 #include "main/imports.h"
 #include "program/program.h"
index 5d70e57bc33581240b5e7fd896b629e53df92a32..70a820ae0eac58c8ab7e05d7c339938b9434b033 100644 (file)
 #ifndef PROGRAMOPT_H
 #define PROGRAMOPT_H 1
 
-#include "main/mtypes.h"
+#include "main/glheader.h"
+#include "prog_parameter.h"
 
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gl_context;
+struct gl_program;
 
 extern void
 _mesa_insert_mvp_code(struct gl_context *ctx, struct gl_program *vprog);
index f5dacbbf1edfc9b075bdf4e5cd56e2f9a8eea8de..e01faa5c6e1f98ec4f3e87a92896cf89f5264d09 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "main/imports.h"
+#include "main/errors.h"
 #include "symbol_table.h"
 #include "../../util/hash_table.h"
 #include "util/u_string.h"
index 3b2beaf6ed76abf5467916a90b6149cd7d2c39dc..6ddb8f525cf4445541ef033d6118a15af0cf9737 100644 (file)
@@ -41,7 +41,6 @@
 #include "pipe/p_defines.h"
 #include "cso_cache/cso_context.h"
 
-#include "main/core.h"
 #include "main/stencil.h"
 
 
index c41ed2ba02b0ba6dc73721c56ccedfbb53fe885a..b25ae5f80eb6989ff707f2f8f95caf0aaad748f5 100644 (file)
@@ -30,6 +30,7 @@
   *   Brian Paul
   */
 
+#include "main/errors.h"
 #include "main/imports.h"
 #include "main/image.h"
 #include "main/bufferobj.h"
index 044916b4dc8ea84a9a53de8ca7aec261b5f9147b..5ebe94f4545549d130805d0389001320b416ccc5 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <inttypes.h>  /* for PRId64 macro */
 
+#include "main/errors.h"
 #include "main/imports.h"
 #include "main/mtypes.h"
 #include "main/arrayobj.h"
index 68677182abf6114d1304302fd3c00d6c2da46bd2..fbc577a370c9848920254eced06d095a1aa1ef4c 100644 (file)
@@ -33,6 +33,7 @@
   *   Michel Dänzer
   */
 
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/accum.h"
 #include "main/formats.h"
index 471eb196614e6fd007b92c5bd2d15a63d46b22fd..bb73644753a098907038dde626762e87370270f0 100644 (file)
@@ -30,6 +30,7 @@
   *   Brian Paul
   */
 
+#include "main/errors.h"
 #include "main/imports.h"
 #include "main/image.h"
 #include "main/bufferobj.h"
index 628e4af1e67c2cde360c033f6710b395838a01ae..8cc8e08a623e8e3ba5daa3645bd08b04ada7e264 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include "main/bufferobj.h"
 #include "main/enums.h"
+#include "main/errors.h"
 #include "main/fbobject.h"
 #include "main/formats.h"
 #include "main/format_utils.h"
index 8011d0f25ca1c2a9a80252b135992ff83b08a665..6243659b50d3e1f0949fd1400f30232a18b0bac3 100644 (file)
@@ -36,6 +36,7 @@
  */
 
 
+#include "main/errors.h"
 #include "main/imports.h"
 #include "main/image.h"
 #include "main/bufferobj.h"
index f2aa8005a035151065163b2fa337176b5f90906e..3f105871a5e2eccc1338743b1f4dd3dd551d56eb 100644 (file)
@@ -26,6 +26,7 @@
  **************************************************************************/
 
 
+#include "main/errors.h"
 #include "main/imports.h"
 #include "main/mipmap.h"
 #include "main/teximage.h"
index 19dde16ed9183b5ead197fad32e526425d004b5c..c482828eddb5809d4300180b8f247b9f565753aa 100644 (file)
 #ifndef ST_GLSL_TO_TGSI_PRIVATE_H
 #define ST_GLSL_TO_TGSI_PRIVATE_H
 
-#include <mesa/main/mtypes.h>
-#include <compiler/glsl_types.h>
-#include <compiler/glsl/ir.h>
-#include <tgsi/tgsi_info.h>
+#include "mesa/main/mtypes.h"
+#include "program/prog_parameter.h"
+#include "compiler/glsl_types.h"
+#include "compiler/glsl/ir.h"
+#include "tgsi/tgsi_info.h"
 #include <ostream>
 
 int swizzle_for_size(int size);
index 1a1ea79af8ed998259b8256ab9d23efb714ce02e..162dcc2ca57bce33322623d17968566bd2a7ef52 100644 (file)
@@ -28,7 +28,7 @@
 #ifndef ST_MANAGER_H
 #define ST_MANAGER_H
 
-#include "main/mtypes.h"
+#include "main/menums.h"
 
 #include "pipe/p_compiler.h"
 
index 3f8df31da1814e610f6d35b89cf70127f2863c60..fe72ddaf2c0aa0d14cad456f05de8de6172ca8d8 100644 (file)
@@ -31,6 +31,7 @@
   */
 
 
+#include "main/errors.h"
 #include "main/imports.h"
 #include "main/hash.h"
 #include "main/mtypes.h"
index 0c12a63ae0b274a7a7ae88397f23dececa320e6d..9480d9ec7a5805e3b921aca493f3456ba3b7a35e 100644 (file)
@@ -25,6 +25,7 @@
  *    Keith Whitwell <keithw@vmware.com> Brian Paul
  */
 
+#include "main/errors.h"
 #include "main/imports.h"
 #include "main/bufferobj.h"
 #include "main/mtypes.h"
index 8b0bdf8fa289f6ed8cf9a0a1632535f068cc2794..33da09b618db7c0a9cf1fc64e675c673d277edd5 100644 (file)
@@ -24,6 +24,7 @@
 
 
 #include "c99_math.h"
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/macros.h"
 
index 9bc1f227fe12932632a3c58a4a58483a647399b1..87b72e81970440daf87a1677bc3b7f40278ab9e4 100644 (file)
@@ -32,6 +32,7 @@
  */
 
 #include "c99_math.h"
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/format_pack.h"
 #include "main/format_unpack.h"
index 294b593a20f731618aa7e9e1bd3c08a33c9d4fb3..7a4dc45ae868c4f420db6a9e13bafa752f32371a 100644 (file)
@@ -28,7 +28,6 @@
 #include "main/imports.h"
 #include "main/format_pack.h"
 #include "main/format_unpack.h"
-#include "main/core.h"
 #include "main/stencil.h"
 
 #include "s_context.h"
index e2c3c085b5751c83b7f5918a05c4d7529dec975b..fec8728a7a1220e468175e75706f86c4e0ed84c9 100644 (file)
@@ -33,6 +33,7 @@
  */
 
 
+#include "main/errors.h"
 #include "main/macros.h"
 #include "main/texcompress.h"
 #include "main/texcompress_fxt1.h"
index 34b8eb196576ff580a5c711925e04c34893722b6..2472aa730f94da8d8e8b8891fdf58d87a4e430c3 100644 (file)
@@ -22,6 +22,7 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/macros.h"
 #include "main/imports.h"
index d28512423c3f5e4d5f304e4623fbcacbef4ad7b2..09a8a3da7204f7544f7541a3890fc5875a20b73f 100644 (file)
@@ -48,6 +48,7 @@
 
 #include <stdio.h>
 #include "main/bufferobj.h"
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/imports.h"
 #include "main/mtypes.h"
index 5489ed6857f6b8eff26c2ba1c0dc7fe260007092..c224a4192a4c966dfb7439125300c5b143b0c5eb 100644 (file)
@@ -27,6 +27,7 @@
 
 
 #include "c99_math.h"
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/macros.h"
 #include "main/imports.h"
index a13262d1db24144f5e0602c3c8108d83d7fdd349..bd585324e2b53b1b18aef4ae3463e29c40ae5c5a 100644 (file)
@@ -34,6 +34,7 @@
  * including any use thereof or modifications thereto.
  */
 
+#include "main/errors.h"
 #include "main/glheader.h"
 #include "main/macros.h"
 #include "main/imports.h"
index 45052a3a89c7f0a95cc9eba589954843f970b0d9..e506aee6dfbc523f037f0ccda33ab623886b999a 100644 (file)
@@ -33,6 +33,9 @@
 struct gl_vertex_array;
 struct gl_context;
 struct gl_program;
+struct gl_buffer_object;
+struct gl_transform_feedback_object;
+struct dd_function_table;
 
 
 /* These are the public-access functions exported from tnl.  (A few
index 0592d845ba491f3c4868509490727bd8e06760af..165734b30a66bd28fe0fc606cae0d6bf6bde0883 100644 (file)
@@ -32,8 +32,6 @@
 #ifndef VBO_ATTRIB_H
 #define VBO_ATTRIB_H
 
-#include "main/mtypes.h"
-
 /*
  * Note: The first 32 attributes match the VERT_ATTRIB_* definitions.
  * However, we have extra attributes for storing per-vertex glMaterial
index f698fd0f4168321c70eacc51d9be24c0fe2e9e87..ada78ffd63bc97c5858577c955d9a0fb027d9f8f 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #include "c99_alloca.h"
-#include "main/mtypes.h"
+#include "main/errors.h"
 #include "main/bufferobj.h"
 #include "math/m_eval.h"
 #include "main/vtxfmt.h"
index b23747aa393e13af1688cc5e914abf5ecade8ebf..357ec1da767ca2c5060c26f069e2773c7dd46717 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "main/glheader.h"
 #include "main/arrayobj.h"
-#include "main/mtypes.h"
 #include "main/api_arrayelt.h"
 #include "main/vtxfmt.h"
 #include "vbo_private.h"
index 853fc68c963807cbf835e1ccff9340b6805b1222..1170883f87180110a5c4103c80b099d41e5332c8 100644 (file)
@@ -34,8 +34,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifndef VBO_EXEC_H
 #define VBO_EXEC_H
 
-
-#include "main/mtypes.h"
+#include "main/dd.h"
 #include "main/imports.h"
 #include "vbo.h"
 #include "vbo_attrib.h"
index 8aa17ce9edec2d7e6375c566c6b85e667935483a..0ca1bfa8e1bb15772b33ff54ce110f915247bdf5 100644 (file)
@@ -26,9 +26,9 @@
 #ifndef VBO_NOOP_H
 #define VBO_NOOP_H
 
+#include "main/dd.h"
 
-#include "main/mtypes.h"
-
+struct _glapi_table;
 
 extern void
 _mesa_noop_vtxfmt_init(GLvertexformat *vfmt);
index f170347fbe4115737328ee8f17049b216337ab50..a3c65f422ba699f4f80834584b8553da3dccb810 100644 (file)
@@ -28,6 +28,7 @@
  *
  */
 
+#include "main/errors.h"
 #include "main/imports.h"
 #include "main/macros.h"
 #include "main/varray.h"
index 7cc64ecdbcf3700dcde16ddf969844e901ac06f3..589c61d675eb6fbae7288ca036edf7859239553e 100644 (file)
@@ -35,7 +35,6 @@
 #include "vbo/vbo_attrib.h"
 #include "vbo/vbo_exec.h"
 #include "vbo/vbo_save.h"
-#include "main/mtypes.h"
 #include "main/varray.h"
 
 
index 361964195c38c8fce5f25ddc25ed1b5411943424..73bc49a24bf23c896abc2d54fbbac1533eb4c5a6 100644 (file)
@@ -26,7 +26,6 @@
  */
 
 
-#include "main/mtypes.h"
 #include "main/arrayobj.h"
 #include "main/bufferobj.h"
 
index b158c077957c7e7184121e5921ec91dd9122abb9..2a1922461dd750cfc889917ffcaa3cc12ffc72b4 100644 (file)
@@ -34,7 +34,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifndef VBO_SAVE_H
 #define VBO_SAVE_H
 
-#include "main/mtypes.h"
 #include "vbo.h"
 #include "vbo_attrib.h"
 
index 096e43c8169a3b15256a2c616e57c7dfc66ff733..f4b2c80748041ef997577697b859ea4e4309add1 100644 (file)
@@ -32,7 +32,6 @@
 #include "main/bufferobj.h"
 #include "main/context.h"
 #include "main/imports.h"
-#include "main/mtypes.h"
 #include "main/macros.h"
 #include "main/light.h"
 #include "main/state.h"
index f1a93d6e434841e6e585c5f45de97cf9059a122f..36b1f71eb5fe3c328fbe05bf1cd2e0e67b0f9536 100644 (file)
@@ -30,7 +30,6 @@
 #include "main/glheader.h"
 #include "main/enums.h"
 #include "main/imports.h"
-#include "main/mtypes.h"
 #include "main/dispatch.h"
 #include "glapi/glapi.h"
 
index de8978bb93e424ef4ab0e66c799b2b121ebe5503..500540bfdd9f3885642c38aa84b86e4f2c02eef1 100644 (file)
@@ -75,7 +75,6 @@
 #include "ralloc.h"
 #include "main/imports.h"
 #include "main/macros.h"
-#include "main/mtypes.h"
 #include "util/bitset.h"
 #include "register_allocate.h"
 
index 77aa14c20e0ffb79ebc71157796a7b416e4fe279..f7683a650e0df92eedcbd12771db99d493c3a12a 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "util/mesa-sha1.h"
 #include "util/ralloc.h"
+#include <string.h>
 
 #define STRING_CONF_MAXLEN 25