aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp3
-rw-r--r--src/compiler/glsl/linker.cpp2
-rw-r--r--src/compiler/nir/nir_opt_copy_propagate.c1
-rw-r--r--src/gallium/state_trackers/glx/xlib/glx_api.c19
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c11
-rw-r--r--src/intel/compiler/brw_eu_defines.h1
-rw-r--r--src/intel/compiler/brw_eu_validate.c1
-rw-r--r--src/mapi/glapi/gen/gl_enums.py3
-rw-r--r--src/mapi/glapi/gen/gl_genexec.py1
-rw-r--r--src/mapi/glapi/gen/gl_table.py1
-rw-r--r--src/mesa/Android.libmesa_glsl_utils.mk1
-rw-r--r--src/mesa/Makefile.sources1
-rw-r--r--src/mesa/drivers/common/driverfuncs.c1
-rw-r--r--src/mesa/drivers/common/meta.c5
-rw-r--r--src/mesa/drivers/common/meta_blit.c1
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.c11
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c11
-rw-r--r--src/mesa/drivers/dri/i915/i915_debug_fp.c14
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c19
-rw-r--r--src/mesa/drivers/dri/i915/intel_context.c15
-rw-r--r--src/mesa/drivers/dri/i915/intel_fbo.c11
-rw-r--r--src/mesa/drivers/dri/i915/intel_render.c13
-rw-r--r--src/mesa/drivers/dri/i915/intel_syncobj.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_conditional_render.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_object_purgeable.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_primitive_restart.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_program_cache.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_queryobj.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_sync.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen6_queryobj.c2
-rw-r--r--src/mesa/drivers/dri/i965/hsw_queryobj.c2
-rw-r--r--src/mesa/drivers/dri/i965/intel_buffer_objects.c1
-rw-r--r--src/mesa/drivers/dri/i965/intel_fbo.c1
-rw-r--r--src/mesa/drivers/dri/i965/intel_upload.c1
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_driver.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_cmdbuf.c22
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c12
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_maos_arrays.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_sanity.c120
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_state_init.c122
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_tcl.c42
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.c16
-rw-r--r--src/mesa/drivers/dri/r200/r200_texstate.c36
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_buffer_objects.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c15
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c23
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fog.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_ioctl.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_arrays.c15
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_verts.c13
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_queryobj.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_queryobj.h1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state_init.c67
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.c33
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tcl.c47
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c11
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c19
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c9
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c1
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c5
-rw-r--r--src/mesa/drivers/x11/fakeglx.c5
-rw-r--r--src/mesa/drivers/x11/xfonts.c1
-rw-r--r--src/mesa/drivers/x11/xm_api.c1
-rw-r--r--src/mesa/drivers/x11/xm_buffer.c7
-rw-r--r--src/mesa/drivers/x11/xm_dd.c7
-rw-r--r--src/mesa/drivers/x11/xm_tri.c3
-rw-r--r--src/mesa/main/accum.c6
-rw-r--r--src/mesa/main/api_arrayelt.c2
-rw-r--r--src/mesa/main/arbprogram.c16
-rw-r--r--src/mesa/main/arrayobj.c4
-rw-r--r--src/mesa/main/atifragshader.c10
-rw-r--r--src/mesa/main/attrib.c2
-rw-r--r--src/mesa/main/context.c2
-rw-r--r--src/mesa/main/context.h8
-rw-r--r--src/mesa/main/cpuinfo.c5
-rw-r--r--src/mesa/main/debug.c6
-rw-r--r--src/mesa/main/debug_output.c2
-rw-r--r--src/mesa/main/depth.c2
-rw-r--r--src/mesa/main/dlist.c2
-rw-r--r--src/mesa/main/draw_validate.c2
-rw-r--r--src/mesa/main/drawtex.c2
-rw-r--r--src/mesa/main/errors.c6
-rw-r--r--src/mesa/main/es1_conversion.c2
-rw-r--r--src/mesa/main/execmem.c17
-rw-r--r--src/mesa/main/execmem.h1
-rw-r--r--src/mesa/main/extensions.c2
-rw-r--r--src/mesa/main/ff_fragment_shader.cpp22
-rw-r--r--src/mesa/main/format_unpack.py1
-rw-r--r--src/mesa/main/format_utils.c2
-rw-r--r--src/mesa/main/format_utils.h2
-rw-r--r--src/mesa/main/formats.c4
-rw-r--r--src/mesa/main/framebuffer.c2
-rw-r--r--src/mesa/main/hash.h6
-rw-r--r--src/mesa/main/hint.c2
-rw-r--r--src/mesa/main/image.c4
-rw-r--r--src/mesa/main/macros.h3
-rw-r--r--src/mesa/main/matrix.c16
-rw-r--r--src/mesa/main/mesa_private.h (renamed from src/util/imports.h)23
-rw-r--r--src/mesa/main/mipmap.c4
-rw-r--r--src/mesa/main/objectpurge.c2
-rw-r--r--src/mesa/main/pack.c8
-rw-r--r--src/mesa/main/pipelineobj.c1
-rw-r--r--src/mesa/main/pixeltransfer.c2
-rw-r--r--src/mesa/main/polygon.c2
-rw-r--r--src/mesa/main/queryobj.c2
-rw-r--r--src/mesa/main/readpix.c2
-rw-r--r--src/mesa/main/remap.c3
-rw-r--r--src/mesa/main/renderbuffer.c2
-rw-r--r--src/mesa/main/shared.c4
-rw-r--r--src/mesa/main/stencil.c6
-rw-r--r--src/mesa/main/streaming-load-memcpy.h2
-rw-r--r--src/mesa/main/syncobj.c2
-rw-r--r--src/mesa/main/texcompress.c2
-rw-r--r--src/mesa/main/texcompress_astc.cpp1
-rw-r--r--src/mesa/main/texcompress_cpal.c2
-rw-r--r--src/mesa/main/texcompress_fxt1.c8
-rw-r--r--src/mesa/main/texcompress_rgtc.c5
-rw-r--r--src/mesa/main/texcompress_s3tc.c2
-rw-r--r--src/mesa/main/teximage.c2
-rw-r--r--src/mesa/main/texobj.c2
-rw-r--r--src/mesa/main/texstorage.c8
-rwxr-xr-xsrc/mesa/main/texstore.c2
-rw-r--r--src/mesa/main/texturebindless.c2
-rw-r--r--src/mesa/main/textureview.c2
-rw-r--r--src/mesa/main/varray.c2
-rw-r--r--src/mesa/main/version.c2
-rw-r--r--src/mesa/main/vtxfmt.c2
-rw-r--r--src/mesa/math/m_debug_clip.c2
-rw-r--r--src/mesa/meson.build1
-rw-r--r--src/mesa/program/arbprogparse.c4
-rw-r--r--src/mesa/program/prog_cache.c16
-rw-r--r--src/mesa/program/prog_instruction.c3
-rw-r--r--src/mesa/program/prog_noise.c2
-rw-r--r--src/mesa/program/prog_parameter.c1
-rw-r--r--src/mesa/program/prog_parameter.h2
-rw-r--r--src/mesa/program/prog_parameter_layout.c6
-rw-r--r--src/mesa/program/prog_print.c9
-rw-r--r--src/mesa/program/prog_statevars.c12
-rw-r--r--src/mesa/program/prog_to_nir.c2
-rw-r--r--src/mesa/program/program_lexer.l4
-rw-r--r--src/mesa/program/program_parse.y28
-rw-r--r--src/mesa/program/symbol_table.c6
-rw-r--r--src/mesa/state_tracker/st_atom_atomicbuf.c2
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c2
-rw-r--r--src/mesa/state_tracker/st_atom_image.c2
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c14
-rw-r--r--src/mesa/state_tracker/st_atom_storagebuf.c2
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c12
-rw-r--r--src/mesa/state_tracker/st_cb_blit.c14
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c2
-rw-r--r--src/mesa/state_tracker/st_cb_condrender.c12
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c14
-rw-r--r--src/mesa/state_tracker/st_cb_drawtex.c4
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c2
-rw-r--r--src/mesa/state_tracker/st_cb_feedback.c12
-rw-r--r--src/mesa/state_tracker/st_cb_memoryobjects.c2
-rw-r--r--src/mesa/state_tracker/st_cb_msaa.c2
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.c11
-rw-r--r--src/mesa/state_tracker/st_cb_rasterpos.c12
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c12
-rw-r--r--src/mesa/state_tracker/st_cb_semaphoreobjects.c2
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c2
-rw-r--r--src/mesa/state_tracker/st_cb_texturebarrier.c2
-rw-r--r--src/mesa/state_tracker/st_context.c2
-rw-r--r--src/mesa/state_tracker/st_draw.c2
-rw-r--r--src/mesa/state_tracker/st_draw_feedback.c12
-rw-r--r--src/mesa/state_tracker/st_extensions.c12
-rw-r--r--src/mesa/state_tracker/st_format.c12
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c12
-rw-r--r--src/mesa/state_tracker/st_program.c12
-rw-r--r--src/mesa/swrast/s_clear.c2
-rw-r--r--src/mesa/swrast/s_context.c6
-rw-r--r--src/mesa/swrast/s_copypix.c4
-rw-r--r--src/mesa/swrast/s_depth.c4
-rw-r--r--src/mesa/swrast/s_drawpix.c4
-rw-r--r--src/mesa/swrast/s_logic.c2
-rw-r--r--src/mesa/swrast/s_renderbuffer.c8
-rw-r--r--src/mesa/swrast/s_span.c8
-rw-r--r--src/mesa/swrast/s_stencil.c6
-rw-r--r--src/mesa/swrast/s_texcombine.c4
-rw-r--r--src/mesa/swrast/s_texfilter.c44
-rw-r--r--src/mesa/swrast/s_texture.c1
-rw-r--r--src/mesa/swrast/s_triangle.c4
-rw-r--r--src/mesa/swrast/s_zoom.c2
-rw-r--r--src/mesa/swrast_setup/ss_context.c6
-rw-r--r--src/mesa/tnl/t_context.c6
-rw-r--r--src/mesa/tnl/t_context.h36
-rw-r--r--src/mesa/tnl/t_draw.c2
-rw-r--r--src/mesa/tnl/t_pipeline.c18
-rw-r--r--src/mesa/tnl/t_split_copy.c2
-rw-r--r--src/mesa/tnl/t_vb_fog.c2
-rw-r--r--src/mesa/tnl/t_vb_light.c16
-rw-r--r--src/mesa/tnl/t_vb_normals.c2
-rw-r--r--src/mesa/tnl/t_vb_points.c2
-rw-r--r--src/mesa/tnl/t_vb_render.c12
-rw-r--r--src/mesa/tnl/t_vb_texgen.c10
-rw-r--r--src/mesa/tnl/t_vb_texmat.c4
-rw-r--r--src/mesa/vbo/vbo_exec.h2
-rw-r--r--src/mesa/vbo/vbo_primitive_restart.c2
-rw-r--r--src/mesa/vbo/vbo_save_draw.c2
-rw-r--r--src/mesa/vbo/vbo_save_loopback.c2
-rw-r--r--src/mesa/x86/common_x86.c8
-rw-r--r--src/mesa/x86/rtasm/x86sse.c69
-rw-r--r--src/meson.build3
-rw-r--r--src/panfrost/bifrost/bifrost_compile.c3
-rw-r--r--src/panfrost/midgard/midgard_compile.c5
-rw-r--r--src/util/Makefile.sources2
-rw-r--r--src/util/imports.c62
-rw-r--r--src/util/meson.build2
-rw-r--r--src/util/register_allocate.c4
218 files changed, 843 insertions, 952 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 3731e7a0b74..a6fc2671880 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -37,7 +37,6 @@
#include "compiler/nir/nir_builtin_builder.h"
#include "compiler/nir/nir_deref.h"
#include "main/errors.h"
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/shaderobj.h"
#include "util/u_math.h"
@@ -903,7 +902,7 @@ deref_get_qualifier(nir_deref_instr *deref)
if (field->memory_restrict)
qualifiers |= ACCESS_RESTRICT;
}
-
+
parent_type = cur->type;
}
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 72713fa2e66..8a876fcecee 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -86,7 +86,7 @@
#include "util/u_string.h"
#include "util/u_math.h"
-#include "util/imports.h"
+
#include "main/shaderobj.h"
#include "main/enums.h"
#include "main/mtypes.h"
diff --git a/src/compiler/nir/nir_opt_copy_propagate.c b/src/compiler/nir/nir_opt_copy_propagate.c
index 4a98a2812c3..794d9bcf19d 100644
--- a/src/compiler/nir/nir_opt_copy_propagate.c
+++ b/src/compiler/nir/nir_opt_copy_propagate.c
@@ -26,7 +26,6 @@
*/
#include "nir.h"
-#include <util/imports.h>
/**
* SSA-based copy propagation
diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
index c4e38bdbf17..281111bdfb0 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_api.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
@@ -39,7 +39,6 @@
#include <GL/glxproto.h>
#include "xm_api.h"
-#include "util/imports.h"
#include "main/errors.h"
#include "util/u_math.h"
#include "util/u_memory.h"
@@ -50,7 +49,7 @@
#if !defined(X_GLXCreateContextAttribsARB) && \
defined(X_GLXCreateContextAtrribsARB)
#define X_GLXCreateContextAttribsARB X_GLXCreateContextAtrribsARB
-#endif
+#endif
/* This indicates the client-side GLX API and GLX encoder version. */
#define CLIENT_MAJOR_VERSION 1
@@ -433,7 +432,7 @@ get_visual( Display *dpy, int scr, unsigned int depth, int xclass )
return NULL;
}
}
-
+
return vis;
}
@@ -486,7 +485,7 @@ get_env_visual(Display *dpy, int scr, const char *varname)
/*
* Select an X visual which satisfies the RGBA flag and minimum depth.
- * Input: dpy,
+ * Input: dpy,
* screen - X display and screen number
* min_depth - minimum visual depth
* preferred_class - preferred GLX visual class or DONT_CARE
@@ -1069,13 +1068,13 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
if (stencil_size > 0)
stencil_size = 8;
- if (accumRedSize > 0 ||
- accumGreenSize > 0 ||
+ if (accumRedSize > 0 ||
+ accumGreenSize > 0 ||
accumBlueSize > 0 ||
accumAlphaSize > 0) {
- accumRedSize =
- accumGreenSize =
+ accumRedSize =
+ accumGreenSize =
accumBlueSize = default_accum_bits();
accumAlphaSize = alpha_flag ? accumRedSize : 0;
@@ -1225,7 +1224,7 @@ glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
if (no_rast && current == ctx)
return True;
-
+
/* Now make current! */
if (XMesaMakeCurrent2(xmctx, drawBuffer, readBuffer)) {
ctx->currentDpy = dpy;
@@ -1865,7 +1864,7 @@ glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config )
{
if (dpy && config) {
XMesaVisual xmvis = (XMesaVisual) config;
-#if 0
+#if 0
return xmvis->vishandle;
#else
/* create a new vishandle - the cached one may be stale */
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index 9dce0d594c5..94a787b422a 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -71,7 +71,6 @@
#include "hud/hud_context.h"
#include "main/errors.h"
-#include "util/imports.h"
#include "xm_public.h"
#include <GL/glx.h>
@@ -405,7 +404,7 @@ xmesa_get_window_size(Display *dpy, XMesaBuffer b,
static GLuint
choose_pixel_format(XMesaVisual v)
{
- boolean native_byte_order = (host_byte_order() ==
+ boolean native_byte_order = (host_byte_order() ==
ImageByteOrder(v->display));
if ( GET_REDMASK(v) == 0x0000ff
@@ -690,12 +689,12 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b,
/**
* Convert an X visual type to a GLX visual type.
- *
+ *
* \param visualType X visual type (i.e., \c TrueColor, \c StaticGray, etc.)
* to be converted.
* \return If \c visualType is a valid X visual type, a GLX visual type will
* be returned. Otherwise \c GLX_NONE will be returned.
- *
+ *
* \note
* This code was lifted directly from lib/GL/glx/glcontextmodes.c in the
* DRI CVS tree.
@@ -1051,9 +1050,9 @@ void XMesaDestroyContext( XMesaContext c )
c->st->destroy(c->st);
- /* FIXME: We should destroy the screen here, but if we do so, surfaces may
+ /* FIXME: We should destroy the screen here, but if we do so, surfaces may
* outlive it, causing segfaults
- struct pipe_screen *screen = c->st->pipe->screen;
+ struct pipe_screen *screen = c->st->pipe->screen;
screen->destroy(screen);
*/
diff --git a/src/intel/compiler/brw_eu_defines.h b/src/intel/compiler/brw_eu_defines.h
index 1e7ebe88772..d27205d366b 100644
--- a/src/intel/compiler/brw_eu_defines.h
+++ b/src/intel/compiler/brw_eu_defines.h
@@ -33,6 +33,7 @@
#define BRW_EU_DEFINES_H
#include <stdint.h>
+#include <stdlib.h>
#include "util/macros.h"
/* The following hunk, up-to "Execution Unit" is used by both the
diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c
index a46ad386e78..d87c550a190 100644
--- a/src/intel/compiler/brw_eu_validate.c
+++ b/src/intel/compiler/brw_eu_validate.c
@@ -38,6 +38,7 @@
* test_eu_validate.cpp) will be rejected.
*/
+#include <stdlib.h>
#include "brw_eu.h"
/* We're going to do lots of string concatenation, so this should help. */
diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
index 255b1adfbed..1e4d5a3b3cf 100644
--- a/src/mapi/glapi/gen/gl_enums.py
+++ b/src/mapi/glapi/gen/gl_enums.py
@@ -2,7 +2,7 @@
# (C) Copyright Zack Rusin 2005. All Rights Reserved.
# Copyright (C) 2015 Intel Corporation
# Copyright (C) 2015 Broadcom Corporation
-#
+#
# 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
@@ -53,7 +53,6 @@ class PrintGlEnums(gl_XML.gl_print_base):
print('#include <stdio.h>')
print('#include "main/glheader.h"')
print('#include "main/enums.h"')
- print('#include "util/imports.h"')
print('#include "main/mtypes.h"')
print('')
print('typedef struct PACKED {')
diff --git a/src/mapi/glapi/gen/gl_genexec.py b/src/mapi/glapi/gen/gl_genexec.py
index 0309ae58465..cb70782da2c 100644
--- a/src/mapi/glapi/gen/gl_genexec.py
+++ b/src/mapi/glapi/gen/gl_genexec.py
@@ -89,7 +89,6 @@ header = """/**
#include "main/genmipmap.h"
#include "main/hint.h"
#include "main/histogram.h"
-#include "util/imports.h"
#include "main/light.h"
#include "main/lines.h"
#include "main/matrix.h"
diff --git a/src/mapi/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py
index e9fc0538cbe..cbd7cf5dbf7 100644
--- a/src/mapi/glapi/gen/gl_table.py
+++ b/src/mapi/glapi/gen/gl_table.py
@@ -103,6 +103,7 @@ class PrintRemapTable(gl_XML.gl_print_base):
#include "main/glheader.h"
""")
+ print('#include "main/glheader.h"')
return
diff --git a/src/mesa/Android.libmesa_glsl_utils.mk b/src/mesa/Android.libmesa_glsl_utils.mk
index e4e8b47d0e3..66b6ef13a61 100644
--- a/src/mesa/Android.libmesa_glsl_utils.mk
+++ b/src/mesa/Android.libmesa_glsl_utils.mk
@@ -67,7 +67,6 @@ LOCAL_C_INCLUDES := \
LOCAL_SRC_FILES := \
main/extensions_table.c \
- main/imports.c \
program/symbol_table.c \
program/dummy_errors.c
diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources
index bce32e70e35..ff3c32f556e 100644
--- a/src/mesa/Makefile.sources
+++ b/src/mesa/Makefile.sources
@@ -137,6 +137,7 @@ MAIN_FILES = \
main/histogram.h \
main/image.c \
main/image.h \
+ main/mesa_private.h \
main/light.c \
main/light.h \
main/lines.c \
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 89b21ec9b3f..13dbd113a29 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -24,7 +24,6 @@
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/accum.h"
#include "main/arrayobj.h"
#include "main/context.h"
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 0ea6d5efadb..30116721c7e 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -33,7 +33,6 @@
#include "main/glheader.h"
#include "main/mtypes.h"
-#include "util/imports.h"
#include "main/arbprogram.h"
#include "main/arrayobj.h"
#include "main/blend.h"
@@ -2311,7 +2310,7 @@ _mesa_meta_DrawPixels(struct gl_context *ctx,
_mesa_StencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
_mesa_StencilFunc(GL_ALWAYS, 0, 255);
_mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4);
-
+
/* set stencil bits to 1 where needed */
_mesa_StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
@@ -3233,7 +3232,7 @@ decompress_texture_image(struct gl_context *ctx,
/* render quad w/ texture into renderbuffer */
_mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4);
-
+
/* Restore texture object state, the texture binding will
* be restored by _mesa_meta_end().
*/
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index 9c218568a6e..b349af235e2 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -24,7 +24,6 @@
#include "main/glheader.h"
#include "main/mtypes.h"
-#include "util/imports.h"
#include "main/arbprogram.h"
#include "main/arrayobj.h"
#include "main/blend.h"
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index 865a3809c66..e8ce5adfd51 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,13 +22,12 @@
* 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.
- *
+ *
**************************************************************************/
#include "i830_context.h"
#include "main/api_exec.h"
#include "main/extensions.h"
-#include "util/imports.h"
#include "main/version.h"
#include "main/vtxfmt.h"
#include "tnl/tnl.h"
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index d8db4ab42a3..394a6180f58 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,14 +22,13 @@
* 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.
- *
+ *
**************************************************************************/
#include "i915_context.h"
#include "main/api_exec.h"
#include "main/framebuffer.h"
#include "main/extensions.h"
-#include "util/imports.h"
#include "main/macros.h"
#include "main/version.h"
#include "main/vtxfmt.h"
diff --git a/src/mesa/drivers/dri/i915/i915_debug_fp.c b/src/mesa/drivers/dri/i915/i915_debug_fp.c
index 474394e0df7..3e32bffdf66 100644
--- a/src/mesa/drivers/dri/i915/i915_debug_fp.c
+++ b/src/mesa/drivers/dri/i915/i915_debug_fp.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,14 +22,16 @@
* 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.
- *
+ *
**************************************************************************/
#include <stdio.h>
+#include <assert.h>
+
+#include "main/glheader.h"
#include "i915_reg.h"
#include "i915_debug.h"
-#include "util/imports.h"
#include "main/glheader.h"
static const char *opcodes[0x20] = {
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 44c41bb43dc..8c0f64c2386 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,14 +22,13 @@
* 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.
- *
+ *
**************************************************************************/
#include "main/glheader.h"
#include "main/mtypes.h"
-#include "util/imports.h"
#include "main/macros.h"
#include "main/renderbuffer.h"
#include "main/framebuffer.h"
@@ -96,7 +95,7 @@ i915_reduced_primitive_state(struct intel_context *intel, GLenum rprim)
/* Pull apart the vertex format registers and figure out how large a
- * vertex is supposed to be.
+ * vertex is supposed to be.
*/
static bool
i915_check_vertex_size(struct intel_context *intel, GLuint expected)
@@ -341,7 +340,7 @@ i915_emit_state(struct intel_context *intel)
}
/* work out list of buffers to emit */
-
+
/* Do this here as we may have flushed the batchbuffer above,
* causing more state to be dirty!
*/
@@ -432,7 +431,7 @@ i915_emit_state(struct intel_context *intel)
}
/* Combine all the dirty texture state into a single command to
- * avoid lockups on I915 hardware.
+ * avoid lockups on I915 hardware.
*/
if (dirty & I915_UPLOAD_TEX_ALL) {
int nr = 0;
@@ -820,7 +819,7 @@ i915_new_batch(struct intel_context *intel)
i915->current_vertex_size = 0;
}
-static void
+static void
i915_assert_not_dirty( struct intel_context *intel )
{
struct i915_context *i915 = i915_context(&intel->ctx);
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index 2c3c488ee22..73165418dc5 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
@@ -31,7 +31,6 @@
#include "main/extensions.h"
#include "main/fbobject.h"
#include "main/framebuffer.h"
-#include "util/imports.h"
#include "main/points.h"
#include "main/renderbuffer.h"
@@ -111,7 +110,7 @@ intel_flush_front(struct gl_context *ctx)
__DRIscreen *const screen = intel->intelScreen->driScrnPriv;
if (intel->front_buffer_dirty && _mesa_is_winsys_fbo(ctx->DrawBuffer)) {
- if (flushFront(screen) &&
+ if (flushFront(screen) &&
driDrawable &&
driDrawable->loaderPrivate) {
flushFront(screen)(driDrawable, driDrawable->loaderPrivate);
@@ -632,7 +631,7 @@ intelMakeCurrent(__DRIcontext * driContextPriv,
if (driContextPriv) {
struct gl_context *ctx = &intel->ctx;
struct gl_framebuffer *fb, *readFb;
-
+
if (driDrawPriv == NULL && driReadPriv == NULL) {
fb = _mesa_get_incomplete_framebuffer();
readFb = _mesa_get_incomplete_framebuffer();
diff --git a/src/mesa/drivers/dri/i915/intel_fbo.c b/src/mesa/drivers/dri/i915/intel_fbo.c
index 2e00e803b58..f914f1b2f00 100644
--- a/src/mesa/drivers/dri/i915/intel_fbo.c
+++ b/src/mesa/drivers/dri/i915/intel_fbo.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2006 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,12 +22,11 @@
* 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.
- *
+ *
**************************************************************************/
#include "main/enums.h"
-#include "util/imports.h"
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/fbobject.h"
diff --git a/src/mesa/drivers/dri/i915/intel_render.c b/src/mesa/drivers/dri/i915/intel_render.c
index 9d90a5499fc..726fbe0d091 100644
--- a/src/mesa/drivers/dri/i915/intel_render.c
+++ b/src/mesa/drivers/dri/i915/intel_render.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
/*
@@ -33,7 +33,6 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/macros.h"
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/enums.h"
@@ -167,7 +166,7 @@ do { \
/* Render pipeline stage */
/**********************************************************************/
-/* Heuristic to choose between the two render paths:
+/* Heuristic to choose between the two render paths:
*/
static bool
choose_render(struct intel_context *intel, struct vertex_buffer *VB)
diff --git a/src/mesa/drivers/dri/i915/intel_syncobj.c b/src/mesa/drivers/dri/i915/intel_syncobj.c
index b5e363872ad..7355b493c32 100644
--- a/src/mesa/drivers/dri/i915/intel_syncobj.c
+++ b/src/mesa/drivers/dri/i915/intel_syncobj.c
@@ -38,8 +38,6 @@
* performance bottleneck, though.
*/
-#include "util/imports.h"
-
#include "intel_context.h"
#include "intel_batchbuffer.h"
#include "intel_reg.h"
diff --git a/src/mesa/drivers/dri/i965/brw_conditional_render.c b/src/mesa/drivers/dri/i965/brw_conditional_render.c
index 2450e707a2b..463918f70e3 100644
--- a/src/mesa/drivers/dri/i965/brw_conditional_render.c
+++ b/src/mesa/drivers/dri/i965/brw_conditional_render.c
@@ -30,7 +30,6 @@
* (GL_NV_conditional_render, GL_ARB_conditional_render_inverted) on Gen7+.
*/
-#include "util/imports.h"
#include "main/condrender.h"
#include "brw_context.h"
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 7a359b32c48..5deff66d817 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -37,7 +37,6 @@
#include "main/fbobject.h"
#include "main/extensions.h"
#include "main/glthread.h"
-#include "util/imports.h"
#include "main/macros.h"
#include "main/points.h"
#include "main/version.h"
diff --git a/src/mesa/drivers/dri/i965/brw_object_purgeable.c b/src/mesa/drivers/dri/i965/brw_object_purgeable.c
index fd55fe27e72..7a75cfc3f97 100644
--- a/src/mesa/drivers/dri/i965/brw_object_purgeable.c
+++ b/src/mesa/drivers/dri/i965/brw_object_purgeable.c
@@ -27,7 +27,6 @@
* The driver implementation of the GL_APPLE_object_purgeable extension.
*/
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/bufferobj.h"
diff --git a/src/mesa/drivers/dri/i965/brw_primitive_restart.c b/src/mesa/drivers/dri/i965/brw_primitive_restart.c
index a780df31809..e73f32720e1 100644
--- a/src/mesa/drivers/dri/i965/brw_primitive_restart.c
+++ b/src/mesa/drivers/dri/i965/brw_primitive_restart.c
@@ -25,7 +25,6 @@
*
*/
-#include "util/imports.h"
#include "main/bufferobj.h"
#include "main/varray.h"
#include "vbo/vbo.h"
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 54f700b7b11..412be5ec599 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -30,7 +30,6 @@
*/
#include <pthread.h>
-#include "util/imports.h"
#include "main/glspirv.h"
#include "program/prog_parameter.h"
#include "program/prog_print.h"
diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
index 30be02fa253..c1bdaab591c 100644
--- a/src/mesa/drivers/dri/i965/brw_program_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_program_cache.c
@@ -44,7 +44,6 @@
* big we throw out all of the cache data and let it get regenerated.
*/
-#include "util/imports.h"
#include "main/streaming-load-memcpy.h"
#include "x86/common_x86_asm.h"
#include "intel_batchbuffer.h"
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index b27a685d052..1e8316f6f6a 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -35,7 +35,6 @@
* appropriately synced with the stage of the pipeline for our extensions'
* needs.
*/
-#include "util/imports.h"
#include "main/queryobj.h"
#include "brw_context.h"
diff --git a/src/mesa/drivers/dri/i965/brw_sync.c b/src/mesa/drivers/dri/i965/brw_sync.c
index 73764834c6c..f44c4e08ccb 100644
--- a/src/mesa/drivers/dri/i965/brw_sync.c
+++ b/src/mesa/drivers/dri/i965/brw_sync.c
@@ -40,8 +40,6 @@
#include <libsync.h> /* Requires Android or libdrm-2.4.72 */
-#include "util/imports.h"
-
#include "brw_context.h"
#include "intel_batchbuffer.h"
diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c
index 08fe90b8c02..94dd9a4b1ee 100644
--- a/src/mesa/drivers/dri/i965/gen6_queryobj.c
+++ b/src/mesa/drivers/dri/i965/gen6_queryobj.c
@@ -31,8 +31,6 @@
* GL_EXT_transform_feedback, and friends) on platforms that support
* hardware contexts (Gen6+).
*/
-#include "util/imports.h"
-
#include "brw_context.h"
#include "brw_defines.h"
#include "brw_state.h"
diff --git a/src/mesa/drivers/dri/i965/hsw_queryobj.c b/src/mesa/drivers/dri/i965/hsw_queryobj.c
index 4af64f029d5..f0eb3fdbbd7 100644
--- a/src/mesa/drivers/dri/i965/hsw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/hsw_queryobj.c
@@ -26,8 +26,6 @@
*
* Support for query buffer objects (GL_ARB_query_buffer_object) on Haswell+.
*/
-#include "util/imports.h"
-
#include "brw_context.h"
#include "brw_defines.h"
#include "intel_batchbuffer.h"
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index c0862b5e72a..19fa253af41 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
@@ -29,7 +29,6 @@
* This provides core GL buffer object functionality.
*/
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/streaming-load-memcpy.h"
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index cc450baf51e..9f8fee9879c 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -24,7 +24,6 @@
*/
#include "main/enums.h"
-#include "util/imports.h"
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/fbobject.h"
diff --git a/src/mesa/drivers/dri/i965/intel_upload.c b/src/mesa/drivers/dri/i965/intel_upload.c
index 595e330f3b6..a4a353ed069 100644
--- a/src/mesa/drivers/dri/i965/intel_upload.c
+++ b/src/mesa/drivers/dri/i965/intel_upload.c
@@ -28,7 +28,6 @@
* Batched upload via BOs.
*/
-#include "util/imports.h"
#include "main/macros.h"
#include "brw_bufmgr.h"
#include "brw_context.h"
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.h b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
index 3230d7e0881..d5b23edae08 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.h
@@ -27,7 +27,7 @@
#ifndef __NOUVEAU_DRIVER_H__
#define __NOUVEAU_DRIVER_H__
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/formats.h"
diff --git a/src/mesa/drivers/dri/r200/r200_cmdbuf.c b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
index 3390e0a6672..4a068e0d930 100644
--- a/src/mesa/drivers/dri/r200/r200_cmdbuf.c
+++ b/src/mesa/drivers/dri/r200/r200_cmdbuf.c
@@ -32,7 +32,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/context.h"
#include "util/simple_list.h"
@@ -111,7 +111,7 @@ void r200SetUpAtomList( r200ContextPtr rmesa )
}
/* Fire a section of the retained (indexed_verts) buffer as a regular
- * primtive.
+ * primtive.
*/
void r200EmitVbufPrim( r200ContextPtr rmesa,
GLuint primitive,
@@ -120,13 +120,13 @@ void r200EmitVbufPrim( r200ContextPtr rmesa,
BATCH_LOCALS(&rmesa->radeon);
assert(!(primitive & R200_VF_PRIM_WALK_IND));
-
+
radeonEmitState(&rmesa->radeon);
-
+
radeon_print(RADEON_RENDER|RADEON_SWRENDER,RADEON_VERBOSE,
"%s cmd_used/4: %d prim %x nr %d\n", __func__,
rmesa->store.cmd_used/4, primitive, vertex_nr);
-
+
BEGIN_BATCH(3);
OUT_BATCH_PACKET3_CLIP(R200_CP_CMD_3D_DRAW_VBUF_2, 0);
OUT_BATCH(primitive | R200_VF_PRIM_WALK_LIST | R200_VF_COLOR_ORDER_RGBA |
@@ -142,7 +142,7 @@ static void r200FireEB(r200ContextPtr rmesa, int vertex_count, int type)
BEGIN_BATCH(8+2);
OUT_BATCH_PACKET3_CLIP(R200_CP_CMD_3D_DRAW_INDX_2, 0);
OUT_BATCH(R200_VF_PRIM_WALK_IND |
- R200_VF_COLOR_ORDER_RGBA |
+ R200_VF_COLOR_ORDER_RGBA |
((vertex_count + 0) << 16) |
type);
@@ -190,7 +190,7 @@ GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s %d prim %x\n", __func__, min_nr, primitive);
assert((primitive & R200_VF_PRIM_WALK_IND));
-
+
radeonEmitState(&rmesa->radeon);
radeonAllocDmaRegion(&rmesa->radeon, &rmesa->radeon.tcl.elt_dma_bo,
@@ -199,7 +199,7 @@ GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
radeon_bo_map(rmesa->radeon.tcl.elt_dma_bo, 1);
retval = rmesa->radeon.tcl.elt_dma_bo->ptr + rmesa->radeon.tcl.elt_dma_offset;
-
+
assert(!rmesa->radeon.dma.flush);
rmesa->radeon.glCtx.Driver.NeedFlush |= FLUSH_STORED_VERTICES;
rmesa->radeon.dma.flush = r200FlushElts;
@@ -242,7 +242,7 @@ void r200EmitAOS(r200ContextPtr rmesa, GLuint nr, GLuint offset)
uint32_t voffset;
int sz = 1 + (nr >> 1) * 3 + (nr & 1) * 2;
int i;
-
+
radeon_print(RADEON_RENDER, RADEON_VERBOSE,
"%s: nr=%d, ofs=0x%08x\n",
__func__, nr, offset);
@@ -257,7 +257,7 @@ void r200EmitAOS(r200ContextPtr rmesa, GLuint nr, GLuint offset)
(rmesa->radeon.tcl.aos[i].stride << 8) |
(rmesa->radeon.tcl.aos[i + 1].components << 16) |
(rmesa->radeon.tcl.aos[i + 1].stride << 24));
-
+
voffset = rmesa->radeon.tcl.aos[i + 0].offset +
offset * 4 * rmesa->radeon.tcl.aos[i + 0].stride;
OUT_BATCH(voffset);
@@ -265,7 +265,7 @@ void r200EmitAOS(r200ContextPtr rmesa, GLuint nr, GLuint offset)
offset * 4 * rmesa->radeon.tcl.aos[i + 1].stride;
OUT_BATCH(voffset);
}
-
+
if (nr & 1) {
OUT_BATCH((rmesa->radeon.tcl.aos[nr - 1].components << 0) |
(rmesa->radeon.tcl.aos[nr - 1].stride << 8));
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 91ce34c6c42..f1c5e8f172b 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -37,7 +37,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/api_arrayelt.h"
#include "main/api_exec.h"
#include "main/context.h"
-#include "util/imports.h"
+
#include "main/extensions.h"
#include "main/version.h"
#include "main/vtxfmt.h"
@@ -103,7 +103,7 @@ static const struct tnl_pipeline_stage *r200_pipeline[] = {
/* Try and go straight to t&l
*/
- &_r200_tcl_stage,
+ &_r200_tcl_stage,
/* Catch any t&l fallbacks
*/
@@ -115,7 +115,7 @@ static const struct tnl_pipeline_stage *r200_pipeline[] = {
&_tnl_texture_transform_stage,
&_tnl_point_attenuation_stage,
&_tnl_vertex_program_stage,
- /* Try again to go to tcl?
+ /* Try again to go to tcl?
* - no good for asymmetric-twoside (do with multipass)
* - no good for asymmetric-unfilled (do with multipass)
* - good for material
@@ -124,7 +124,7 @@ static const struct tnl_pipeline_stage *r200_pipeline[] = {
*
* - worth it/not worth it?
*/
-
+
/* Else do them here.
*/
/* &_r200_render_stage, */ /* FIXME: bugs with ut2003 */
@@ -266,7 +266,7 @@ GLboolean r200CreateContext( gl_api api,
ctx->Const.StripTextureBorder = GL_TRUE;
- /* FIXME: When no memory manager is available we should set this
+ /* FIXME: When no memory manager is available we should set this
* to some reasonable value based on texture memory pool size */
ctx->Const.MaxTextureSize = 2048;
ctx->Const.Max3DTextureLevels = 9;
@@ -378,7 +378,7 @@ GLboolean r200CreateContext( gl_api api,
r200InitState( rmesa );
r200InitSwtcl( ctx );
- rmesa->prefer_gart_client_texturing =
+ rmesa->prefer_gart_client_texturing =
(getenv("R200_GART_CLIENT_TEXTURES") != 0);
tcl_mode = driQueryOptioni(&rmesa->radeon.optionCache, "tcl_mode");
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c
index 293bec216c8..2e0285cc6a2 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.c
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.c
@@ -36,7 +36,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <errno.h>
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/context.h"
#include "swrast/swrast.h"
diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
index 646f8bfc973..7177488d087 100644
--- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c
+++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
@@ -34,7 +34,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/glheader.h"
#include "main/mtypes.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/state.h"
@@ -71,7 +71,7 @@ do { \
#endif
/* Emit any changed arrays to new GART memory, re-emit a packet to
- * update the arrays.
+ * update the arrays.
*/
void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev )
{
diff --git a/src/mesa/drivers/dri/r200/r200_sanity.c b/src/mesa/drivers/dri/r200/r200_sanity.c
index ade7aaf007a..8bef63e413a 100644
--- a/src/mesa/drivers/dri/r200/r200_sanity.c
+++ b/src/mesa/drivers/dri/r200/r200_sanity.c
@@ -31,11 +31,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
* Keith Whitwell <[email protected]>
*
*/
-
-#include <errno.h>
+
+#include <errno.h>
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "r200_context.h"
#include "r200_sanity.h"
@@ -57,11 +57,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
/* New (1.3) state mechanism. 3 commands (packet, scalar, vector) in
* 1.3 cmdbuffers allow all previous state to be updated as well as
- * the tcl scalar and vector areas.
+ * the tcl scalar and vector areas.
*/
-static struct {
- int start;
- int len;
+static struct {
+ int start;
+ int len;
const char *name;
} packet[RADEON_MAX_STATE_PACKETS] = {
{ RADEON_PP_MISC,7,"RADEON_PP_MISC" },
@@ -115,15 +115,15 @@ static struct {
{ R200_SE_VTE_CNTL, 1, "R200_SE_VTE_CNTL" },
{ R200_SE_TCL_OUTPUT_VTX_COMP_SEL, 1, "R200_SE_TCL_OUTPUT_VTX_COMP_SEL" },
{ R200_PP_TAM_DEBUG3, 1, "R200_PP_TAM_DEBUG3" },
- { R200_PP_CNTL_X, 1, "R200_PP_CNTL_X" },
- { R200_RB3D_DEPTHXY_OFFSET, 1, "R200_RB3D_DEPTHXY_OFFSET" },
- { R200_RE_AUX_SCISSOR_CNTL, 1, "R200_RE_AUX_SCISSOR_CNTL" },
- { R200_RE_SCISSOR_TL_0, 2, "R200_RE_SCISSOR_TL_0" },
- { R200_RE_SCISSOR_TL_1, 2, "R200_RE_SCISSOR_TL_1" },
- { R200_RE_SCISSOR_TL_2, 2, "R200_RE_SCISSOR_TL_2" },
- { R200_SE_VAP_CNTL_STATUS, 1, "R200_SE_VAP_CNTL_STATUS" },
- { R200_SE_VTX_STATE_CNTL, 1, "R200_SE_VTX_STATE_CNTL" },
- { R200_RE_POINTSIZE, 1, "R200_RE_POINTSIZE" },
+ { R200_PP_CNTL_X, 1, "R200_PP_CNTL_X" },
+ { R200_RB3D_DEPTHXY_OFFSET, 1, "R200_RB3D_DEPTHXY_OFFSET" },
+ { R200_RE_AUX_SCISSOR_CNTL, 1, "R200_RE_AUX_SCISSOR_CNTL" },
+ { R200_RE_SCISSOR_TL_0, 2, "R200_RE_SCISSOR_TL_0" },
+ { R200_RE_SCISSOR_TL_1, 2, "R200_RE_SCISSOR_TL_1" },
+ { R200_RE_SCISSOR_TL_2, 2, "R200_RE_SCISSOR_TL_2" },
+ { R200_SE_VAP_CNTL_STATUS, 1, "R200_SE_VAP_CNTL_STATUS" },
+ { R200_SE_VTX_STATE_CNTL, 1, "R200_SE_VTX_STATE_CNTL" },
+ { R200_RE_POINTSIZE, 1, "R200_RE_POINTSIZE" },
{ R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_0, 4, "R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_0" },
{ R200_PP_CUBIC_FACES_0, 1, "R200_PP_CUBIC_FACES_0" }, /* 61 */
{ R200_PP_CUBIC_OFFSET_F1_0, 5, "R200_PP_CUBIC_OFFSET_F1_0" }, /* 62 */
@@ -598,7 +598,7 @@ static struct reg_names vector_names[] = {
#define TOUCHED 4
struct reg {
- int idx;
+ int idx;
struct reg_names *closest;
int flags;
union fi current;
@@ -681,14 +681,14 @@ static const char *get_reg_name( struct reg *reg )
{
static char tmp[80];
- if (reg->idx == reg->closest->idx)
+ if (reg->idx == reg->closest->idx)
return reg->closest->name;
-
+
if (reg->flags & ISVEC) {
if (reg->idx/4 != reg->closest->idx)
- sprintf(tmp, "%s+%d[%d]",
- reg->closest->name,
+ sprintf(tmp, "%s+%d[%d]",
+ reg->closest->name,
(reg->idx/4) - reg->closest->idx,
reg->idx%4);
else
@@ -708,17 +708,17 @@ static int print_int_reg_assignment( struct reg *reg, int data )
{
int changed = (reg->current.i != data);
int ever_seen = find_or_add_value( reg, data );
-
+
if (VERBOSE || (NORMAL && (changed || !ever_seen)))
fprintf(stderr, " %s <-- 0x%x", get_reg_name(reg), data);
-
+
if (NORMAL) {
- if (!ever_seen)
+ if (!ever_seen)
fprintf(stderr, " *** BRAND NEW VALUE");
- else if (changed)
- fprintf(stderr, " *** CHANGED");
+ else if (changed)
+ fprintf(stderr, " *** CHANGED");
}
-
+
reg->current.i = data;
if (VERBOSE || (NORMAL && (changed || !ever_seen)))
@@ -786,19 +786,19 @@ static void dump_state( void )
{
int i;
- for (i = 0 ; i < ARRAY_SIZE(regs) ; i++)
+ for (i = 0 ; i < ARRAY_SIZE(regs) ; i++)
print_reg( &regs[i] );
- for (i = 0 ; i < ARRAY_SIZE(scalars) ; i++)
+ for (i = 0 ; i < ARRAY_SIZE(scalars) ; i++)
print_reg( &scalars[i] );
- for (i = 0 ; i < ARRAY_SIZE(vectors) ; i++)
+ for (i = 0 ; i < ARRAY_SIZE(vectors) ; i++)
print_reg( &vectors[i] );
}
-static int radeon_emit_packets(
+static int radeon_emit_packets(
drm_radeon_cmd_header_t header,
drm_radeon_cmd_buffer_t *cmdbuf )
{
@@ -806,9 +806,9 @@ static int radeon_emit_packets(
int sz = packet[id].len;
int *data = (int *)cmdbuf->buf;
int i;
-
+
if (sz * sizeof(int) > cmdbuf->bufsz) {
- fprintf(stderr, "Packet overflows cmdbuf\n");
+ fprintf(stderr, "Packet overflows cmdbuf\n");
return -EINVAL;
}
@@ -817,8 +817,8 @@ static int radeon_emit_packets(
return -EINVAL;
}
-
- if (VERBOSE)
+
+ if (VERBOSE)
fprintf(stderr, "Packet 0 reg %s nr %d\n", packet[id].name, sz );
for ( i = 0 ; i < sz ; i++) {
@@ -834,7 +834,7 @@ static int radeon_emit_packets(
}
-static int radeon_emit_scalars(
+static int radeon_emit_scalars(
drm_radeon_cmd_header_t header,
drm_radeon_cmd_buffer_t *cmdbuf )
{
@@ -855,14 +855,14 @@ static int radeon_emit_scalars(
total_changed++;
total++;
}
-
+
cmdbuf->buf += sz * sizeof(int);
cmdbuf->bufsz -= sz * sizeof(int);
return 0;
}
-static int radeon_emit_scalars2(
+static int radeon_emit_scalars2(
drm_radeon_cmd_header_t header,
drm_radeon_cmd_buffer_t *cmdbuf )
{
@@ -887,7 +887,7 @@ static int radeon_emit_scalars2(
total_changed++;
total++;
}
-
+
cmdbuf->buf += sz * sizeof(int);
cmdbuf->bufsz -= sz * sizeof(int);
return 0;
@@ -896,7 +896,7 @@ static int radeon_emit_scalars2(
/* Check: inf/nan/extreme-size?
* Check: table start, end, nr, etc.
*/
-static int radeon_emit_vectors(
+static int radeon_emit_vectors(
drm_radeon_cmd_header_t header,
drm_radeon_cmd_buffer_t *cmdbuf )
{
@@ -926,14 +926,14 @@ static int radeon_emit_vectors(
total_changed += 4;
total += 4;
}
-
+
cmdbuf->buf += sz * sizeof(int);
cmdbuf->bufsz -= sz * sizeof(int);
return 0;
}
-static int radeon_emit_veclinear(
+static int radeon_emit_veclinear(
drm_radeon_cmd_header_t header,
drm_radeon_cmd_buffer_t *cmdbuf )
{
@@ -1019,7 +1019,7 @@ static int print_vertex_format( int vfmt )
(vfmt & R200_VTX_W1) ? "w1," : "",
(vfmt & R200_VTX_N1) ? "n1," : "");
-
+
if (!find_or_add_value( &others[V_VTXFMT], vfmt ))
fprintf(stderr, " *** NEW VALUE");
@@ -1052,7 +1052,7 @@ static char *primname[0x10] = {
static int print_prim_and_flags( int prim )
{
int numverts;
-
+
if (NORMAL)
fprintf(stderr, " %s(%x): %s%s%s%s%s%s\n",
"prim flags",
@@ -1065,7 +1065,7 @@ static int print_prim_and_flags( int prim )
(prim & R200_VF_TCL_OUTPUT_VTX_ENABLE) ? "TCL_OUT_VTX," : "");
numverts = prim>>16;
-
+
if (NORMAL)
fprintf(stderr, " prim: %s numverts %d\n", primname[prim&0xf], numverts);
@@ -1123,7 +1123,7 @@ static int print_prim_and_flags( int prim )
default:
fprintf(stderr, "Bad primitive\n");
return -1;
- }
+ }
return 0;
}
@@ -1247,7 +1247,7 @@ static int radeon_emit_packet3( drm_radeon_cmd_buffer_t *cmdbuf )
break;
case R200_CP_CMD_HOSTDATA_BLT:
if (NORMAL)
- fprintf(stderr, "PACKET3_CNTL_HOSTDATA_BLT, %d dwords\n",
+ fprintf(stderr, "PACKET3_CNTL_HOSTDATA_BLT, %d dwords\n",
cmdsz);
break;
case R200_CP_CMD_POLYLINE:
@@ -1256,41 +1256,41 @@ static int radeon_emit_packet3( drm_radeon_cmd_buffer_t *cmdbuf )
break;
case R200_CP_CMD_POLYSCANLINES:
if (NORMAL)
- fprintf(stderr, "PACKET3_CNTL_POLYSCANLINES, %d dwords\n",
+ fprintf(stderr, "PACKET3_CNTL_POLYSCANLINES, %d dwords\n",
cmdsz);
break;
case R200_CP_CMD_PAINT_MULTI:
if (NORMAL)
- fprintf(stderr, "PACKET3_CNTL_PAINT_MULTI, %d dwords\n",
+ fprintf(stderr, "PACKET3_CNTL_PAINT_MULTI, %d dwords\n",
cmdsz);
break;
case R200_CP_CMD_BITBLT_MULTI:
if (NORMAL)
- fprintf(stderr, "PACKET3_CNTL_BITBLT_MULTI, %d dwords\n",
+ fprintf(stderr, "PACKET3_CNTL_BITBLT_MULTI, %d dwords\n",
cmdsz);
break;
case R200_CP_CMD_TRANS_BITBLT:
if (NORMAL)
- fprintf(stderr, "PACKET3_CNTL_TRANS_BITBLT, %d dwords\n",
+ fprintf(stderr, "PACKET3_CNTL_TRANS_BITBLT, %d dwords\n",
cmdsz);
break;
case R200_CP_CMD_3D_DRAW_VBUF_2:
if (NORMAL)
- fprintf(stderr, "R200_CP_CMD_3D_DRAW_VBUF_2, %d dwords\n",
+ fprintf(stderr, "R200_CP_CMD_3D_DRAW_VBUF_2, %d dwords\n",
cmdsz);
if (print_prim_and_flags(cmd[1]))
return -EINVAL;
break;
case R200_CP_CMD_3D_DRAW_IMMD_2:
if (NORMAL)
- fprintf(stderr, "R200_CP_CMD_3D_DRAW_IMMD_2, %d dwords\n",
+ fprintf(stderr, "R200_CP_CMD_3D_DRAW_IMMD_2, %d dwords\n",
cmdsz);
if (print_prim_and_flags(cmd[1]))
return -EINVAL;
break;
case R200_CP_CMD_3D_DRAW_INDX_2:
if (NORMAL)
- fprintf(stderr, "R200_CP_CMD_3D_DRAW_INDX_2, %d dwords\n",
+ fprintf(stderr, "R200_CP_CMD_3D_DRAW_INDX_2, %d dwords\n",
cmdsz);
if (print_prim_and_flags(cmd[1]))
return -EINVAL;
@@ -1299,7 +1299,7 @@ static int radeon_emit_packet3( drm_radeon_cmd_buffer_t *cmdbuf )
fprintf(stderr, "UNKNOWN PACKET, %d dwords\n", cmdsz);
break;
}
-
+
cmdbuf->buf += cmdsz * 4;
cmdbuf->bufsz -= cmdsz * 4;
return 0;
@@ -1309,7 +1309,7 @@ static int radeon_emit_packet3( drm_radeon_cmd_buffer_t *cmdbuf )
/* Check cliprects for bounds, then pass on to above:
*/
static int radeon_emit_packet3_cliprect( drm_radeon_cmd_buffer_t *cmdbuf )
-{
+{
drm_clip_rect_t *boxes = (drm_clip_rect_t *)cmdbuf->boxes;
int i = 0;
@@ -1356,13 +1356,13 @@ int r200SanityCmdBuffer( r200ContextPtr rmesa,
cmdbuf.nbox = nbox;
while ( cmdbuf.bufsz >= sizeof(header) ) {
-
+
header.i = *(int *)cmdbuf.buf;
cmdbuf.buf += sizeof(header);
cmdbuf.bufsz -= sizeof(header);
switch (header.header.cmd_type) {
- case RADEON_CMD_PACKET:
+ case RADEON_CMD_PACKET:
if (radeon_emit_packets( header, &cmdbuf )) {
fprintf(stderr,"radeon_emit_packets failed\n");
return -EINVAL;
@@ -1422,7 +1422,7 @@ int r200SanityCmdBuffer( r200ContextPtr rmesa,
break;
default:
- fprintf(stderr,"bad cmd_type %d at %p\n",
+ fprintf(stderr,"bad cmd_type %d at %p\n",
header.header.cmd_type,
cmdbuf.buf - sizeof(header));
return -EINVAL;
@@ -1436,7 +1436,7 @@ int r200SanityCmdBuffer( r200ContextPtr rmesa,
if (n == 10) {
fprintf(stderr, "Bufs %d Total emitted %d real changes %d (%.2f%%)\n",
bufs,
- total, total_changed,
+ total, total_changed,
((float)total_changed/(float)total*100.0));
fprintf(stderr, "Total emitted per buf: %.2f\n",
(float)total/(float)bufs);
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index eff71dbd051..9f2070c5939 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -34,7 +34,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/enums.h"
#include "main/light.h"
#include "main/framebuffer.h"
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index 9febc20363a..3d6e6559973 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -33,7 +33,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/errors.h"
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/enums.h"
#include "main/api_arrayelt.h"
#include "main/state.h"
@@ -164,12 +164,12 @@ static struct {
/* =============================================================
* State initialization
*/
-static int cmdpkt( r200ContextPtr rmesa, int id )
+static int cmdpkt( r200ContextPtr rmesa, int id )
{
return CP_PACKET0(packet[id].start, packet[id].len - 1);
}
-static int cmdvec( int offset, int stride, int count )
+static int cmdvec( int offset, int stride, int count )
{
drm_radeon_cmd_header_t h;
h.i = 0;
@@ -182,7 +182,7 @@ static int cmdvec( int offset, int stride, int count )
/* warning: the count here is divided by 4 compared to other cmds
(so it doesn't exceed the char size)! */
-static int cmdveclinear( int offset, int count )
+static int cmdveclinear( int offset, int count )
{
drm_radeon_cmd_header_t h;
h.i = 0;
@@ -193,7 +193,7 @@ static int cmdveclinear( int offset, int count )
return h.i;
}
-static int cmdscl( int offset, int stride, int count )
+static int cmdscl( int offset, int stride, int count )
{
drm_radeon_cmd_header_t h;
h.i = 0;
@@ -204,7 +204,7 @@ static int cmdscl( int offset, int stride, int count )
return h.i;
}
-static int cmdscl2( int offset, int stride, int count )
+static int cmdscl2( int offset, int stride, int count )
{
drm_radeon_cmd_header_t h;
h.i = 0;
@@ -849,9 +849,9 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.ptp.emit = ptp_emit;
- rmesa->hw.mtl[0].cmd[MTL_CMD_0] =
+ rmesa->hw.mtl[0].cmd[MTL_CMD_0] =
cmdvec( R200_VS_MAT_0_EMISS, 1, 16 );
- rmesa->hw.mtl[0].cmd[MTL_CMD_1] =
+ rmesa->hw.mtl[0].cmd[MTL_CMD_1] =
cmdscl2( R200_SS_MAT_0_SHININESS, 1, 1 );
rmesa->hw.mtl[1].cmd[MTL_CMD_0] =
cmdvec( R200_VS_MAT_1_EMISS, 1, 16 );
@@ -867,43 +867,43 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.vpp[1].cmd[VPP_CMD_0] =
cmdveclinear( R200_PVS_PARAM1, 96 );
- rmesa->hw.grd.cmd[GRD_CMD_0] =
+ rmesa->hw.grd.cmd[GRD_CMD_0] =
cmdscl( R200_SS_VERT_GUARD_CLIP_ADJ_ADDR, 1, 4 );
- rmesa->hw.fog.cmd[FOG_CMD_0] =
+ rmesa->hw.fog.cmd[FOG_CMD_0] =
cmdvec( R200_VS_FOG_PARAM_ADDR, 1, 4 );
- rmesa->hw.glt.cmd[GLT_CMD_0] =
+ rmesa->hw.glt.cmd[GLT_CMD_0] =
cmdvec( R200_VS_GLOBAL_AMBIENT_ADDR, 1, 4 );
- rmesa->hw.eye.cmd[EYE_CMD_0] =
+ rmesa->hw.eye.cmd[EYE_CMD_0] =
cmdvec( R200_VS_EYE_VECTOR_ADDR, 1, 4 );
- rmesa->hw.mat[R200_MTX_MV].cmd[MAT_CMD_0] =
+ rmesa->hw.mat[R200_MTX_MV].cmd[MAT_CMD_0] =
cmdvec( R200_VS_MATRIX_0_MV, 1, 16);
- rmesa->hw.mat[R200_MTX_IMV].cmd[MAT_CMD_0] =
+ rmesa->hw.mat[R200_MTX_IMV].cmd[MAT_CMD_0] =
cmdvec( R200_VS_MATRIX_1_INV_MV, 1, 16);
- rmesa->hw.mat[R200_MTX_MVP].cmd[MAT_CMD_0] =
+ rmesa->hw.mat[R200_MTX_MVP].cmd[MAT_CMD_0] =
cmdvec( R200_VS_MATRIX_2_MVP, 1, 16);
- rmesa->hw.mat[R200_MTX_TEX0].cmd[MAT_CMD_0] =
+ rmesa->hw.mat[R200_MTX_TEX0].cmd[MAT_CMD_0] =
cmdvec( R200_VS_MATRIX_3_TEX0, 1, 16);
- rmesa->hw.mat[R200_MTX_TEX1].cmd[MAT_CMD_0] =
+ rmesa->hw.mat[R200_MTX_TEX1].cmd[MAT_CMD_0] =
cmdvec( R200_VS_MATRIX_4_TEX1, 1, 16);
- rmesa->hw.mat[R200_MTX_TEX2].cmd[MAT_CMD_0] =
+ rmesa->hw.mat[R200_MTX_TEX2].cmd[MAT_CMD_0] =
cmdvec( R200_VS_MATRIX_5_TEX2, 1, 16);
- rmesa->hw.mat[R200_MTX_TEX3].cmd[MAT_CMD_0] =
+ rmesa->hw.mat[R200_MTX_TEX3].cmd[MAT_CMD_0] =
cmdvec( R200_VS_MATRIX_6_TEX3, 1, 16);
- rmesa->hw.mat[R200_MTX_TEX4].cmd[MAT_CMD_0] =
+ rmesa->hw.mat[R200_MTX_TEX4].cmd[MAT_CMD_0] =
cmdvec( R200_VS_MATRIX_7_TEX4, 1, 16);
- rmesa->hw.mat[R200_MTX_TEX5].cmd[MAT_CMD_0] =
+ rmesa->hw.mat[R200_MTX_TEX5].cmd[MAT_CMD_0] =
cmdvec( R200_VS_MATRIX_8_TEX5, 1, 16);
for (i = 0 ; i < 8; i++) {
- rmesa->hw.lit[i].cmd[LIT_CMD_0] =
+ rmesa->hw.lit[i].cmd[LIT_CMD_0] =
cmdvec( R200_VS_LIGHT_AMBIENT_ADDR + i, 8, 24 );
- rmesa->hw.lit[i].cmd[LIT_CMD_1] =
+ rmesa->hw.lit[i].cmd[LIT_CMD_1] =
cmdscl( R200_SS_LIGHT_DCD_ADDR + i, 8, 7 );
}
for (i = 0 ; i < 6; i++) {
- rmesa->hw.ucp[i].cmd[UCP_CMD_0] =
+ rmesa->hw.ucp[i].cmd[UCP_CMD_0] =
cmdvec( R200_VS_UCP_ADDR + i, 1, 4 );
}
@@ -937,11 +937,11 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.ctx.cmd[CTX_RB3D_DEPTHOFFSET] =
rmesa->radeon.radeonScreen->depthOffset + rmesa->radeon.radeonScreen->fbLocation;
- rmesa->hw.ctx.cmd[CTX_RB3D_DEPTHPITCH] =
+ rmesa->hw.ctx.cmd[CTX_RB3D_DEPTHPITCH] =
((rmesa->radeon.radeonScreen->depthPitch &
R200_DEPTHPITCH_MASK) |
R200_DEPTH_ENDIAN_NO_SWAP);
-
+
if (rmesa->using_hyperz)
rmesa->hw.ctx.cmd[CTX_RB3D_DEPTHPITCH] |= R200_DEPTH_HYPERZ;
@@ -959,7 +959,7 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_HIERARCHY_ENABLE;*/
}
- rmesa->hw.ctx.cmd[CTX_PP_CNTL] = (R200_ANTI_ALIAS_NONE
+ rmesa->hw.ctx.cmd[CTX_PP_CNTL] = (R200_ANTI_ALIAS_NONE
| R200_TEX_BLEND_0_ENABLE);
switch ( driQueryOptioni( &rmesa->radeon.optionCache, "dither_mode" ) ) {
@@ -981,7 +981,7 @@ void r200InitState( r200ContextPtr rmesa )
else
rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= rmesa->radeon.state.color.roundEnable;
- rmesa->hw.prf.cmd[PRF_PP_TRI_PERF] = R200_TRI_CUTOFF_MASK - R200_TRI_CUTOFF_MASK *
+ rmesa->hw.prf.cmd[PRF_PP_TRI_PERF] = R200_TRI_CUTOFF_MASK - R200_TRI_CUTOFF_MASK *
driQueryOptionf (&rmesa->radeon.optionCache,"texture_blend_quality");
rmesa->hw.prf.cmd[PRF_PP_PERF_CNTL] = 0;
@@ -1003,13 +1003,13 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.lin.cmd[LIN_RE_LINE_PATTERN] = ((1 << 16) | 0xffff);
- rmesa->hw.lin.cmd[LIN_RE_LINE_STATE] =
+ rmesa->hw.lin.cmd[LIN_RE_LINE_STATE] =
((0 << R200_LINE_CURRENT_PTR_SHIFT) |
(1 << R200_LINE_CURRENT_COUNT_SHIFT));
rmesa->hw.lin.cmd[LIN_SE_LINE_WIDTH] = (1 << 4);
- rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] =
+ rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] =
((0x00 << R200_STENCIL_REF_SHIFT) |
(0xff << R200_STENCIL_MASK_SHIFT) |
(0xff << R200_STENCIL_WRITEMASK_SHIFT));
@@ -1019,7 +1019,7 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.tam.cmd[TAM_DEBUG3] = 0;
- rmesa->hw.msc.cmd[MSC_RE_MISC] =
+ rmesa->hw.msc.cmd[MSC_RE_MISC] =
((0 << R200_STIPPLE_X_OFFSET_SHIFT) |
(0 << R200_STIPPLE_Y_OFFSET_SHIFT) |
R200_STIPPLE_BIG_BIT_ORDER);
@@ -1055,7 +1055,7 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.cst.cmd[CST_SE_TCL_INPUT_VTX_3] =
(0x0A << R200_VTX_TEX_4_ADDR__SHIFT) |
(0x0B << R200_VTX_TEX_5_ADDR__SHIFT);
-
+
rmesa->hw.vpt.cmd[VPT_SE_VPORT_XSCALE] = 0x00000000;
rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] = 0x00000000;
@@ -1066,7 +1066,7 @@ void r200InitState( r200ContextPtr rmesa )
for ( i = 0 ; i < ctx->Const.MaxTextureUnits ; i++ ) {
rmesa->hw.tex[i].cmd[TEX_PP_TXFILTER] = R200_BORDER_MODE_OGL;
- rmesa->hw.tex[i].cmd[TEX_PP_TXFORMAT] =
+ rmesa->hw.tex[i].cmd[TEX_PP_TXFORMAT] =
((i << R200_TXFORMAT_ST_ROUTE_SHIFT) | /* <-- note i */
(2 << R200_TXFORMAT_WIDTH_SHIFT) |
(2 << R200_TXFORMAT_HEIGHT_SHIFT));
@@ -1123,11 +1123,11 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.tf.cmd[TF_TFACTOR_4] = 0;
rmesa->hw.tf.cmd[TF_TFACTOR_5] = 0;
- rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] =
- (R200_VAP_TCL_ENABLE |
+ rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] =
+ (R200_VAP_TCL_ENABLE |
(0x9 << R200_VAP_VF_MAX_VTX_NUM__SHIFT));
- rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] =
+ rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] =
(R200_VPORT_X_SCALE_ENA |
R200_VPORT_Y_SCALE_ENA |
R200_VPORT_Z_SCALE_ENA |
@@ -1135,50 +1135,50 @@ void r200InitState( r200ContextPtr rmesa )
R200_VPORT_Y_OFFSET_ENA |
R200_VPORT_Z_OFFSET_ENA |
/* FIXME: Turn on for tex rect only */
- R200_VTX_ST_DENORMALIZED |
- R200_VTX_W0_FMT);
+ R200_VTX_ST_DENORMALIZED |
+ R200_VTX_W0_FMT);
rmesa->hw.vtx.cmd[VTX_VTXFMT_0] = 0;
rmesa->hw.vtx.cmd[VTX_VTXFMT_1] = 0;
- rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] =
+ rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] =
((R200_VTX_Z0 | R200_VTX_W0 |
- (R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT)));
+ (R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT)));
rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_1] = 0;
rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL] = (R200_OUTPUT_XYZW);
rmesa->hw.vtx.cmd[VTX_STATE_CNTL] = R200_VSC_UPDATE_USER_COLOR_0_ENABLE;
-
+
/* Matrix selection */
- rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_0] =
+ rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_0] =
(R200_MTX_MV << R200_MODELVIEW_0_SHIFT);
-
- rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_1] =
+
+ rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_1] =
(R200_MTX_IMV << R200_IT_MODELVIEW_0_SHIFT);
- rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_2] =
+ rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_2] =
(R200_MTX_MVP << R200_MODELPROJECT_0_SHIFT);
- rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_3] =
+ rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_3] =
((R200_MTX_TEX0 << R200_TEXMAT_0_SHIFT) |
(R200_MTX_TEX1 << R200_TEXMAT_1_SHIFT) |
(R200_MTX_TEX2 << R200_TEXMAT_2_SHIFT) |
(R200_MTX_TEX3 << R200_TEXMAT_3_SHIFT));
- rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_4] =
+ rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_4] =
((R200_MTX_TEX4 << R200_TEXMAT_4_SHIFT) |
(R200_MTX_TEX5 << R200_TEXMAT_5_SHIFT));
/* General TCL state */
- rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] =
+ rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] =
(R200_SPECULAR_LIGHTS |
R200_DIFFUSE_SPECULAR_COMBINE |
R200_LOCAL_LIGHT_VEC_GL |
R200_LM0_SOURCE_MATERIAL_0 << R200_FRONT_SHININESS_SOURCE_SHIFT |
R200_LM0_SOURCE_MATERIAL_1 << R200_BACK_SHININESS_SOURCE_SHIFT);
- rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_1] =
+ rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_1] =
((R200_LM1_SOURCE_MATERIAL_0 << R200_FRONT_EMISSIVE_SOURCE_SHIFT) |
(R200_LM1_SOURCE_MATERIAL_0 << R200_FRONT_AMBIENT_SOURCE_SHIFT) |
(R200_LM1_SOURCE_MATERIAL_0 << R200_FRONT_DIFFUSE_SOURCE_SHIFT) |
@@ -1186,34 +1186,34 @@ void r200InitState( r200ContextPtr rmesa )
(R200_LM1_SOURCE_MATERIAL_1 << R200_BACK_EMISSIVE_SOURCE_SHIFT) |
(R200_LM1_SOURCE_MATERIAL_1 << R200_BACK_AMBIENT_SOURCE_SHIFT) |
(R200_LM1_SOURCE_MATERIAL_1 << R200_BACK_DIFFUSE_SOURCE_SHIFT) |
- (R200_LM1_SOURCE_MATERIAL_1 << R200_BACK_SPECULAR_SOURCE_SHIFT));
+ (R200_LM1_SOURCE_MATERIAL_1 << R200_BACK_SPECULAR_SOURCE_SHIFT));
rmesa->hw.tcl.cmd[TCL_PER_LIGHT_CTL_0] = 0; /* filled in via callbacks */
rmesa->hw.tcl.cmd[TCL_PER_LIGHT_CTL_1] = 0;
rmesa->hw.tcl.cmd[TCL_PER_LIGHT_CTL_2] = 0;
rmesa->hw.tcl.cmd[TCL_PER_LIGHT_CTL_3] = 0;
-
- rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] =
+
+ rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] =
(R200_UCP_IN_CLIP_SPACE |
R200_CULL_FRONT_IS_CCW);
/* Texgen/Texmat state */
rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_2] = 0x00ffffff;
- rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_3] =
+ rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_3] =
((0 << R200_TEXGEN_0_INPUT_TEX_SHIFT) |
(1 << R200_TEXGEN_1_INPUT_TEX_SHIFT) |
(2 << R200_TEXGEN_2_INPUT_TEX_SHIFT) |
(3 << R200_TEXGEN_3_INPUT_TEX_SHIFT) |
(4 << R200_TEXGEN_4_INPUT_TEX_SHIFT) |
- (5 << R200_TEXGEN_5_INPUT_TEX_SHIFT));
- rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0] = 0;
- rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_1] =
+ (5 << R200_TEXGEN_5_INPUT_TEX_SHIFT));
+ rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0] = 0;
+ rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_1] =
((0 << R200_TEXGEN_0_INPUT_SHIFT) |
(1 << R200_TEXGEN_1_INPUT_SHIFT) |
(2 << R200_TEXGEN_2_INPUT_SHIFT) |
(3 << R200_TEXGEN_3_INPUT_SHIFT) |
(4 << R200_TEXGEN_4_INPUT_SHIFT) |
- (5 << R200_TEXGEN_5_INPUT_SHIFT));
+ (5 << R200_TEXGEN_5_INPUT_SHIFT));
rmesa->hw.tcg.cmd[TCG_TEX_CYL_WRAP_CTL] = 0;
@@ -1231,14 +1231,14 @@ void r200InitState( r200ContextPtr rmesa )
ctx->Driver.Lightfv( ctx, p, GL_SPOT_CUTOFF, &l->SpotCutoff );
ctx->Driver.Lightfv( ctx, p, GL_CONSTANT_ATTENUATION,
&l->ConstantAttenuation );
- ctx->Driver.Lightfv( ctx, p, GL_LINEAR_ATTENUATION,
+ ctx->Driver.Lightfv( ctx, p, GL_LINEAR_ATTENUATION,
&l->LinearAttenuation );
- ctx->Driver.Lightfv( ctx, p, GL_QUADRATIC_ATTENUATION,
+ ctx->Driver.Lightfv( ctx, p, GL_QUADRATIC_ATTENUATION,
&l->QuadraticAttenuation );
*(float *)&(rmesa->hw.lit[i].cmd[LIT_ATTEN_XXX]) = 0.0;
}
- ctx->Driver.LightModelfv( ctx, GL_LIGHT_MODEL_AMBIENT,
+ ctx->Driver.LightModelfv( ctx, GL_LIGHT_MODEL_AMBIENT,
ctx->Light.Model.Ambient );
TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange( ctx );
@@ -1253,7 +1253,7 @@ void r200InitState( r200ContextPtr rmesa )
ctx->Driver.Fogfv( ctx, GL_FOG_END, &ctx->Fog.End );
ctx->Driver.Fogfv( ctx, GL_FOG_COLOR, ctx->Fog.Color );
ctx->Driver.Fogfv( ctx, GL_FOG_COORDINATE_SOURCE_EXT, NULL );
-
+
rmesa->hw.grd.cmd[GRD_VERT_GUARD_CLIP_ADJ] = IEEE_ONE;
rmesa->hw.grd.cmd[GRD_VERT_GUARD_DISCARD_ADJ] = IEEE_ONE;
rmesa->hw.grd.cmd[GRD_HORZ_GUARD_CLIP_ADJ] = IEEE_ONE;
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index d951bee4fa2..eda0411da03 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -36,7 +36,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/mtypes.h"
#include "main/enums.h"
#include "main/image.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/state.h"
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index 1802711eef0..d7b2479773d 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -33,7 +33,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "main/enums.h"
#include "main/light.h"
@@ -99,7 +99,7 @@ static GLboolean discrete_prim[0x10] = {
0, /* e quad strip */
0, /* f polygon */
};
-
+
#define LOCAL_VARS r200ContextPtr rmesa = R200_CONTEXT(ctx)
#define ELT_TYPE GLushort
@@ -138,7 +138,7 @@ static GLboolean discrete_prim[0x10] = {
#define ALLOC_ELTS(nr) r200AllocElts( rmesa, nr )
-static GLushort *r200AllocElts( r200ContextPtr rmesa, GLuint nr )
+static GLushort *r200AllocElts( r200ContextPtr rmesa, GLuint nr )
{
if (rmesa->radeon.dma.flush == r200FlushElts &&
rmesa->tcl.elt_used + nr*2 < R200_ELT_BUF_SZ) {
@@ -174,21 +174,21 @@ while (0)
* discrete and there are no intervening state changes. (Somewhat
* duplicates changes to DrawArrays code)
*/
-static void r200EmitPrim( struct gl_context *ctx,
- GLenum prim,
- GLuint hwprim,
- GLuint start,
- GLuint count)
+static void r200EmitPrim( struct gl_context *ctx,
+ GLenum prim,
+ GLuint hwprim,
+ GLuint start,
+ GLuint count)
{
r200ContextPtr rmesa = R200_CONTEXT( ctx );
r200TclPrimitive( ctx, prim, hwprim );
-
+
// fprintf(stderr,"Emit prim %d\n", rmesa->radeon.tcl.aos_count);
r200EmitAOS( rmesa,
rmesa->radeon.tcl.aos_count,
start );
-
+
/* Why couldn't this packet have taken an offset param?
*/
r200EmitVbufPrim( rmesa,
@@ -238,7 +238,7 @@ static void r200EmitPrim( struct gl_context *ctx,
/* External entrypoints */
/**********************************************************************/
-void r200EmitPrimitive( struct gl_context *ctx,
+void r200EmitPrimitive( struct gl_context *ctx,
GLuint first,
GLuint last,
GLuint flags )
@@ -246,7 +246,7 @@ void r200EmitPrimitive( struct gl_context *ctx,
tcl_render_tab_verts[flags&PRIM_MODE_MASK]( ctx, first, last, flags );
}
-void r200EmitEltPrimitive( struct gl_context *ctx,
+void r200EmitEltPrimitive( struct gl_context *ctx,
GLuint first,
GLuint last,
GLuint flags )
@@ -254,7 +254,7 @@ void r200EmitEltPrimitive( struct gl_context *ctx,
tcl_render_tab_elts[flags&PRIM_MODE_MASK]( ctx, first, last, flags );
}
-void r200TclPrimitive( struct gl_context *ctx,
+void r200TclPrimitive( struct gl_context *ctx,
GLenum prim,
int hw_prim )
{
@@ -360,14 +360,14 @@ static GLboolean r200_run_tcl_render( struct gl_context *ctx,
struct vertex_buffer *VB = &tnl->vb;
GLuint i;
GLubyte *vimap_rev;
-/* use hw fixed order for simplicity, pos 0, weight 1, normal 2, fog 3,
+/* use hw fixed order for simplicity, pos 0, weight 1, normal 2, fog 3,
color0 - color3 4-7, texcoord0 - texcoord5 8-13, pos 1 14. Must not use
more than 12 of those at the same time. */
GLubyte map_rev_fixed[15] = {255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255};
- /* TODO: separate this from the swtnl pipeline
+ /* TODO: separate this from the swtnl pipeline
*/
if (rmesa->radeon.TclFallback)
return GL_TRUE; /* fallback to software t&l */
@@ -485,7 +485,7 @@ static GLboolean r200_run_tcl_render( struct gl_context *ctx,
-/* Initial state for tcl stage.
+/* Initial state for tcl stage.
*/
const struct tnl_pipeline_stage _r200_tcl_stage =
{
@@ -519,9 +519,9 @@ static void transition_to_swtnl( struct gl_context *ctx )
r200ChooseVertexState( ctx );
r200ChooseRenderState( ctx );
- _tnl_validate_shine_tables( ctx );
+ _tnl_validate_shine_tables( ctx );
- tnl->Driver.NotifyMaterialChange =
+ tnl->Driver.NotifyMaterialChange =
_tnl_validate_shine_tables;
radeonReleaseArrays( ctx, ~0 );
@@ -544,11 +544,11 @@ static void transition_to_hwtnl( struct gl_context *ctx )
tnl->Driver.NotifyMaterialChange = r200UpdateMaterial;
- if ( rmesa->radeon.dma.flush )
- rmesa->radeon.dma.flush( &rmesa->radeon.glCtx );
+ if ( rmesa->radeon.dma.flush )
+ rmesa->radeon.dma.flush( &rmesa->radeon.glCtx );
rmesa->radeon.dma.flush = NULL;
-
+
R200_STATECHANGE( rmesa, vap );
rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] |= R200_VAP_TCL_ENABLE;
rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] &= ~R200_VAP_FORCE_W_TO_ONE;
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index c1d0717361c..51f4495e18a 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -32,7 +32,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/context.h"
#include "main/enums.h"
#include "main/image.h"
@@ -52,7 +52,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/**
* Set the texture wrap modes.
- *
+ *
* \param t Texture object whose wrap modes are to be set
* \param swrap Wrap mode for the \a s texture coordinate
* \param twrap Wrap mode for the \a t texture coordinate
@@ -205,7 +205,7 @@ static void r200SetTexMaxAnisotropy( radeonTexObjPtr t, GLfloat max )
/**
* Set the texture magnification and minification modes.
- *
+ *
* \param t Texture whose filter modes are to be set
* \param minf Texture minification mode
* \param magf Texture magnification mode
@@ -327,7 +327,7 @@ static void r200TexEnv( struct gl_context *ctx, GLenum target,
const int fixed_one = R200_LOD_BIAS_FIXED_ONE;
/* The R200's LOD bias is a signed 2's complement value with a
- * range of -16.0 <= bias < 16.0.
+ * range of -16.0 <= bias < 16.0.
*
* NOTE: Add a small bias to the bias for conform mipsel.c test.
*/
@@ -337,7 +337,7 @@ static void r200TexEnv( struct gl_context *ctx, GLenum target,
bias = CLAMP( bias, min, 16.0 );
b = ((int)(bias * fixed_one)
+ R200_LOD_BIAS_CORRECTION) & R200_LOD_BIAS_MASK;
-
+
if ( (rmesa->hw.tex[unit].cmd[TEX_PP_TXFORMAT_X] & R200_LOD_BIAS_MASK) != b ) {
R200_STATECHANGE( rmesa, tex[unit] );
rmesa->hw.tex[unit].cmd[TEX_PP_TXFORMAT_X] &= ~R200_LOD_BIAS_MASK;
@@ -426,7 +426,7 @@ static void r200DeleteTexture(struct gl_context * ctx, struct gl_texture_object
rmesa->hw.tex[i].dirty = GL_FALSE;
rmesa->hw.cube[i].dirty = GL_FALSE;
}
- }
+ }
}
radeon_miptree_unreference(&t->mt);
@@ -434,13 +434,13 @@ static void r200DeleteTexture(struct gl_context * ctx, struct gl_texture_object
_mesa_delete_texture_object(ctx, texObj);
}
-/* Need:
+/* Need:
* - Same GEN_MODE for all active bits
* - Same EyePlane/ObjPlane for all active bits when using Eye/Obj
* - STRQ presumably all supported (matrix means incoming R values
* can end up in STQ, this has implications for vertex support,
* presumably ok if maos is used, though?)
- *
+ *
* Basically impossible to do this on the fly - just collect some
* basic info & do the checks from ValidateState().
*/
diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
index f98fadf560a..f736391ca55 100644
--- a/src/mesa/drivers/dri/r200/r200_texstate.c
+++ b/src/mesa/drivers/dri/r200/r200_texstate.c
@@ -33,7 +33,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/context.h"
#include "main/macros.h"
#include "main/state.h"
@@ -457,7 +457,7 @@ static GLboolean r200UpdateTextureEnv( struct gl_context *ctx, int unit, int slo
break;
case GL_ADD:
color_combine = (R200_TXC_ARG_B_ZERO |
- R200_TXC_COMP_ARG_B |
+ R200_TXC_COMP_ARG_B |
R200_TXC_OP_MADD);
R200_COLOR_ARG( 0, A );
R200_COLOR_ARG( 1, C );
@@ -472,7 +472,7 @@ static GLboolean r200UpdateTextureEnv( struct gl_context *ctx, int unit, int slo
break;
case GL_SUBTRACT:
color_combine = (R200_TXC_ARG_B_ZERO |
- R200_TXC_COMP_ARG_B |
+ R200_TXC_COMP_ARG_B |
R200_TXC_NEG_ARG_C |
R200_TXC_OP_MADD);
R200_COLOR_ARG( 0, A );
@@ -798,7 +798,7 @@ static GLboolean r200UpdateAllTexEnv( struct gl_context *ctx )
continue;
}
currentnext = j;
-
+
const GLuint numColorArgs = texUnit->_CurrentCombine->_NumArgsRGB;
const GLuint numAlphaArgs = texUnit->_CurrentCombine->_NumArgsA;
const GLboolean isdot3rgba = (texUnit->_CurrentCombine->ModeRGB == GL_DOT3_RGBA) ||
@@ -940,10 +940,10 @@ static GLboolean r200UpdateAllTexEnv( struct gl_context *ctx )
R200_VOLUME_FILTER_MASK)
-static void disable_tex_obj_state( r200ContextPtr rmesa,
+static void disable_tex_obj_state( r200ContextPtr rmesa,
int unit )
{
-
+
R200_STATECHANGE( rmesa, vtx );
rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_1] &= ~(7 << (unit * 3));
@@ -1002,7 +1002,7 @@ static void import_tex_obj_state( r200ContextPtr rmesa,
}
-static void set_texgen_matrix( r200ContextPtr rmesa,
+static void set_texgen_matrix( r200ContextPtr rmesa,
GLuint unit,
const GLfloat *s_plane,
const GLfloat *t_plane,
@@ -1079,10 +1079,10 @@ static GLuint r200_need_dis_texgen(const GLbitfield texGenEnabled,
/*
- * Returns GL_FALSE if fallback required.
+ * Returns GL_FALSE if fallback required.
*/
static GLboolean r200_validate_texgen( struct gl_context *ctx, GLuint unit )
-{
+{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
const struct gl_fixedfunc_texture_unit *texUnit =
&ctx->Texture.FixedFuncUnit[unit];
@@ -1110,7 +1110,7 @@ static GLboolean r200_validate_texgen( struct gl_context *ctx, GLuint unit )
tgcm = rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_2] & ~(R200_TEXGEN_COMP_MASK <<
(unit * 4));
- if (0)
+ if (0)
fprintf(stderr, "%s unit %d\n", __func__, unit);
if (texUnit->TexGenEnabled & S_BIT) {
@@ -1179,7 +1179,7 @@ static GLboolean r200_validate_texgen( struct gl_context *ctx, GLuint unit )
}
tgi |= R200_TEXGEN_INPUT_OBJ << inputshift;
- set_texgen_matrix( rmesa, unit,
+ set_texgen_matrix( rmesa, unit,
(texUnit->TexGenEnabled & S_BIT) ? texUnit->GenS.ObjectPlane : I,
(texUnit->TexGenEnabled & T_BIT) ? texUnit->GenT.ObjectPlane : I + 4,
(texUnit->TexGenEnabled & R_BIT) ? texUnit->GenR.ObjectPlane : I + 8,
@@ -1219,7 +1219,7 @@ static GLboolean r200_validate_texgen( struct gl_context *ctx, GLuint unit )
tgi |= R200_TEXGEN_INPUT_EYE_REFLECT << inputshift;
/* pretty weird, must only negate when lighting is enabled? */
if (ctx->Light.Enabled)
- set_texgen_matrix( rmesa, unit,
+ set_texgen_matrix( rmesa, unit,
(texUnit->TexGenEnabled & S_BIT) ? reflect : I,
(texUnit->TexGenEnabled & T_BIT) ? reflect + 4 : I + 4,
(texUnit->TexGenEnabled & R_BIT) ? reflect + 8 : I + 8,
@@ -1253,7 +1253,7 @@ static GLboolean r200_validate_texgen( struct gl_context *ctx, GLuint unit )
rmesa->TexGenEnabled |= R200_TEXGEN_TEXMAT_0_ENABLE << unit;
rmesa->TexGenCompSel |= R200_OUTPUT_TEX_0 << unit;
- if (tgi != rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_1] ||
+ if (tgi != rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_1] ||
tgcm != rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_2])
{
R200_STATECHANGE(rmesa, tcg);
@@ -1313,11 +1313,11 @@ static void setup_hardware_state(r200ContextPtr rmesa, radeonTexObj *t)
#else
const struct tx_table *table = tx_table_be;
#endif
-
+
t->pp_txformat &= ~(R200_TXFORMAT_FORMAT_MASK |
R200_TXFORMAT_ALPHA_IN_MAP);
t->pp_txfilter &= ~R200_YUV_TO_RGB;
-
+
t->pp_txformat |= table[ firstImage->TexFormat ].format;
t->pp_txfilter |= table[ firstImage->TexFormat ].filter;
@@ -1349,9 +1349,9 @@ static void setup_hardware_state(r200ContextPtr rmesa, radeonTexObj *t)
R200_TXFORMAT_F5_HEIGHT_MASK);
t->pp_txformat |= (((log2Width + extra_size) << R200_TXFORMAT_WIDTH_SHIFT) |
((log2Height + extra_size)<< R200_TXFORMAT_HEIGHT_SHIFT));
-
+
t->tile_bits = 0;
-
+
t->pp_txformat_x &= ~(R200_DEPTH_LOG2_MASK | R200_TEXCOORD_MASK
| R200_MIN_MIP_LEVEL_MASK);
@@ -1424,7 +1424,7 @@ static GLboolean r200_validate_texture(struct gl_context *ctx, struct gl_texture
set_re_cntl_d3d( ctx, unit, GL_TRUE );
R200_STATECHANGE( rmesa, ctx );
rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_TEX_0_ENABLE << unit;
-
+
R200_STATECHANGE( rmesa, vtx );
rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_1] &= ~(7 << (unit * 3));
rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_1] |= 4 << (unit * 3);
diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
index 8332534c814..71fe9302cf7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
+++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
@@ -25,7 +25,6 @@
*
*/
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/bufferobj.h"
#include "util/u_memory.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index ad63ea2d240..1b734d26a57 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -43,7 +43,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <errno.h>
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/context.h"
#include "main/enums.h"
#include "main/fbobject.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 5435d0f34be..e05b8ba2ff6 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -40,7 +40,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/api_exec.h"
#include "main/context.h"
#include "util/simple_list.h"
-#include "util/imports.h"
#include "main/extensions.h"
#include "main/version.h"
#include "main/vtxfmt.h"
@@ -76,7 +75,7 @@ static const struct tnl_pipeline_stage *radeon_pipeline[] = {
/* Try and go straight to t&l
*/
- &_radeon_tcl_stage,
+ &_radeon_tcl_stage,
/* Catch any t&l fallbacks
*/
@@ -95,7 +94,7 @@ static const struct tnl_pipeline_stage *radeon_pipeline[] = {
static void r100_vtbl_pre_emit_state(radeonContextPtr radeon)
{
r100ContextPtr rmesa = (r100ContextPtr)radeon;
-
+
/* r100 always needs to emit ZBS to avoid TCL lockups */
rmesa->hw.zbs.dirty = 1;
radeon->hw.is_dirty = 1;
@@ -228,7 +227,7 @@ r100CreateContext( gl_api api,
ctx->Const.StripTextureBorder = GL_TRUE;
- /* FIXME: When no memory manager is available we should set this
+ /* FIXME: When no memory manager is available we should set this
* to some reasonable value based on texture memory pool size */
ctx->Const.MaxTextureSize = 2048;
ctx->Const.Max3DTextureLevels = 9;
@@ -255,9 +254,9 @@ r100CreateContext( gl_api api,
* fit in a single dma buffer for indexed rendering of quad strips,
* etc.
*/
- ctx->Const.MaxArrayLockSize =
- MIN2( ctx->Const.MaxArrayLockSize,
- RADEON_BUFFER_SIZE / RADEON_MAX_TCL_VERTSIZE );
+ ctx->Const.MaxArrayLockSize =
+ MIN2( ctx->Const.MaxArrayLockSize,
+ RADEON_BUFFER_SIZE / RADEON_MAX_TCL_VERTSIZE );
rmesa->boxes = 0;
@@ -319,7 +318,7 @@ r100CreateContext( gl_api api,
radeonInitState( rmesa );
radeonInitSwtcl( ctx );
- _mesa_vector4f_alloc( &rmesa->tcl.ObjClean, 0,
+ _mesa_vector4f_alloc( &rmesa->tcl.ObjClean, 0,
ctx->Const.MaxArrayLockSize, 32 );
fthrottle_mode = driQueryOptioni(&rmesa->radeon.optionCache, "fthrottle_mode");
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index 6105a9cf916..cff0c0d6f5f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Red Hat 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,11 +22,10 @@
* 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.
- *
+ *
**************************************************************************/
-#include "util/imports.h"
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/enums.h"
@@ -177,7 +176,7 @@ radeon_map_renderbuffer_s8z24(struct gl_renderbuffer *rb,
}
radeon_bo_unmap(rrb->bo);
-
+
*out_map = rrb->map_buffer;
*out_stride = rrb->map_pitch;
}
@@ -275,7 +274,7 @@ radeon_map_renderbuffer(struct gl_context *ctx,
rrb->map_bo = radeon_bo_open(rmesa->radeonScreen->bom, 0,
rrb->map_pitch * h, 4,
RADEON_GEM_DOMAIN_GTT, 0);
-
+
ok = rmesa->vtbl.blit(ctx, rrb->bo, rrb->draw_offset,
rb->Format, rrb->pitch / rrb->cpp,
rb->Width, rb->Height,
@@ -359,7 +358,7 @@ radeon_unmap_renderbuffer_s8z24(struct gl_context *ctx,
int y_bias = (rb->Name == 0) ? (rb->Height - 1) : 0;
radeon_bo_map(rrb->bo, 1);
-
+
tiled_s8z24_map = rrb->bo->ptr;
for (uint32_t pix_y = 0; pix_y < rrb->map_h; pix_y++) {
@@ -392,7 +391,7 @@ radeon_unmap_renderbuffer_z16(struct gl_context *ctx,
int y_bias = (rb->Name == 0) ? (rb->Height - 1) : 0;
radeon_bo_map(rrb->bo, 1);
-
+
tiled_z16_map = rrb->bo->ptr;
for (uint32_t pix_y = 0; pix_y < rrb->map_h; pix_y++) {
@@ -732,7 +731,7 @@ radeon_framebuffer_renderbuffer(struct gl_context * ctx,
}
static GLboolean
-radeon_update_wrapper(struct gl_context *ctx, struct radeon_renderbuffer *rrb,
+radeon_update_wrapper(struct gl_context *ctx, struct radeon_renderbuffer *rrb,
struct gl_texture_image *texImage)
{
struct gl_renderbuffer *rb = &rrb->base.Base;
@@ -881,7 +880,7 @@ void radeon_fbo_init(struct radeon_context *radeon)
radeon_image_target_renderbuffer_storage;
}
-
+
void radeon_renderbuffer_set_bo(struct radeon_renderbuffer *rb,
struct radeon_bo *bo)
{
diff --git a/src/mesa/drivers/dri/radeon/radeon_fog.c b/src/mesa/drivers/dri/radeon/radeon_fog.c
index c4df8d28cce..107bc23295a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fog.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fog.c
@@ -34,7 +34,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "c99_math.h"
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/context.h"
#include "main/mtypes.h"
#include "main/enums.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
index f5092a414bb..90f8a6cf263 100644
--- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
@@ -42,7 +42,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "swrast/swrast.h"
#include "main/glheader.h"
-#include "util/imports.h"
#include "util/simple_list.h"
#include "radeon_context.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c b/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
index bdfa0a8ca1c..0ac3748da49 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
@@ -33,7 +33,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/macros.h"
@@ -139,7 +138,7 @@ static void emit_tex_vector(struct gl_context *ctx, struct radeon_aos *aos,
/* Emit any changed arrays to new GART memory, re-emit a packet to
- * update the arrays.
+ * update the arrays.
*/
void radeonEmitArrays( struct gl_context *ctx, GLuint inputs )
{
@@ -149,15 +148,15 @@ void radeonEmitArrays( struct gl_context *ctx, GLuint inputs )
GLuint vfmt = 0;
GLuint count = VB->Count;
GLuint vtx, unit;
-
+
#if 0
if (RADEON_DEBUG & RADEON_VERTS)
_tnl_print_vert_flags( __func__, inputs );
#endif
if (1) {
- if (!rmesa->tcl.obj.buf)
- rcommon_emit_vector( ctx,
+ if (!rmesa->tcl.obj.buf)
+ rcommon_emit_vector( ctx,
&(rmesa->tcl.aos[nr]),
(char *)VB->AttribPtr[_TNL_ATTRIB_POS]->data,
VB->AttribPtr[_TNL_ATTRIB_POS]->size,
@@ -173,11 +172,11 @@ void radeonEmitArrays( struct gl_context *ctx, GLuint inputs )
}
nr++;
}
-
+
if (inputs & VERT_BIT_NORMAL) {
if (!rmesa->tcl.norm.buf)
- rcommon_emit_vector( ctx,
+ rcommon_emit_vector( ctx,
&(rmesa->tcl.aos[nr]),
(char *)VB->AttribPtr[_TNL_ATTRIB_NORMAL]->data,
3,
@@ -247,7 +246,7 @@ void radeonEmitArrays( struct gl_context *ctx, GLuint inputs )
vtx = (rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] &
~(RADEON_TCL_VTX_Q0|RADEON_TCL_VTX_Q1|RADEON_TCL_VTX_Q2));
-
+
for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
if (inputs & VERT_BIT_TEX(unit)) {
if (!rmesa->tcl.tex[unit].buf)
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
index 443068e06d9..51a85d17e45 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
@@ -33,7 +33,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/state.h"
@@ -280,7 +279,7 @@ static struct {
/***********************************************************************
- * Initialization
+ * Initialization
***********************************************************************/
@@ -370,8 +369,8 @@ void radeonEmitArrays( struct gl_context *ctx, GLuint inputs )
rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] = vtx;
}
- for (i = 0 ; i < RADEON_TCL_MAX_SETUP ; i++)
- if ((setup_tab[i].vertex_format & req) == req)
+ for (i = 0 ; i < RADEON_TCL_MAX_SETUP ; i++)
+ if ((setup_tab[i].vertex_format & req) == req)
break;
if (rmesa->tcl.vertex_format == setup_tab[i].vertex_format &&
@@ -384,12 +383,12 @@ void radeonEmitArrays( struct gl_context *ctx, GLuint inputs )
radeonAllocDmaRegion( &rmesa->radeon,
&rmesa->radeon.tcl.aos[0].bo,
&rmesa->radeon.tcl.aos[0].offset,
- VB->Count * setup_tab[i].vertex_size * 4,
+ VB->Count * setup_tab[i].vertex_size * 4,
4);
/* The vertex code expects Obj to be clean to element 3. To fix
* this, add more vertex code (for obj-2, obj-3) or preferably move
- * to maos.
+ * to maos.
*/
if (VB->AttribPtr[_TNL_ATTRIB_POS]->size < 3 ||
(VB->AttribPtr[_TNL_ATTRIB_POS]->size == 3 &&
@@ -422,7 +421,7 @@ void radeonEmitArrays( struct gl_context *ctx, GLuint inputs )
radeon_bo_map(rmesa->radeon.tcl.aos[0].bo, 1);
- setup_tab[i].emit( ctx, 0, VB->Count,
+ setup_tab[i].emit( ctx, 0, VB->Count,
rmesa->radeon.tcl.aos[0].bo->ptr + rmesa->radeon.tcl.aos[0].offset);
radeon_bo_unmap(rmesa->radeon.tcl.aos[0].bo);
// rmesa->radeon.tcl.aos[0].size = setup_tab[i].vertex_size;
diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.c b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
index 5225c99145d..ae2c721ce66 100644
--- a/src/mesa/drivers/dri/radeon/radeon_queryobj.c
+++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
@@ -28,7 +28,7 @@
#include "radeon_queryobj.h"
#include "radeon_debug.h"
-#include "util/imports.h"
+
#include "main/queryobj.h"
#include <inttypes.h>
diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.h b/src/mesa/drivers/dri/radeon/radeon_queryobj.h
index e1cda17b005..9dfeccbc4bb 100644
--- a/src/mesa/drivers/dri/radeon/radeon_queryobj.h
+++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.h
@@ -25,7 +25,6 @@
*
*/
-#include "util/imports.h"
#include "util/simple_list.h"
#include "radeon_common_context.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index c5bd995fe9d..62e680cd6db 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -37,7 +37,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <errno.h>
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/framebuffer.h"
#include "main/renderbuffer.h"
@@ -711,7 +710,7 @@ radeonCreateBuffer( __DRIscreen *driScrnPriv,
MESA_FORMAT_X8R8G8B8_UNORM;
#endif
else
- rgbFormat =
+ rgbFormat =
#if UTIL_ARCH_LITTLE_ENDIAN
MESA_FORMAT_B8G8R8A8_UNORM;
#else
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index b3873e2c0ec..59dc4708901 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -33,7 +33,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/enums.h"
#include "main/light.h"
#include "main/context.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index 18e0fea490e..ac387184f69 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state_init.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c
@@ -29,7 +29,6 @@
#include "main/errors.h"
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/api_arrayelt.h"
#include "swrast/swrast.h"
@@ -159,12 +158,12 @@ static struct {
/* =============================================================
* State initialization
*/
-static int cmdpkt( r100ContextPtr rmesa, int id )
+static int cmdpkt( r100ContextPtr rmesa, int id )
{
return CP_PACKET0(packet[id].start, packet[id].len - 1);
}
-static int cmdvec( int offset, int stride, int count )
+static int cmdvec( int offset, int stride, int count )
{
drm_radeon_cmd_header_t h;
h.i = 0;
@@ -175,7 +174,7 @@ static int cmdvec( int offset, int stride, int count )
return h.i;
}
-static int cmdscl( int offset, int stride, int count )
+static int cmdscl( int offset, int stride, int count )
{
drm_radeon_cmd_header_t h;
h.i = 0;
@@ -263,7 +262,7 @@ static void scl_emit(struct gl_context *ctx, struct radeon_state_atom *atom)
r100ContextPtr r100 = R100_CONTEXT(ctx);
BATCH_LOCALS(&r100->radeon);
uint32_t dwords = atom->check(ctx, atom);
-
+
BEGIN_BATCH(dwords);
OUT_SCL(atom->cmd[0], atom->cmd+1);
END_BATCH();
@@ -367,7 +366,7 @@ static void ctx_emit_cs(struct gl_context *ctx, struct radeon_state_atom *atom)
depth_fmt = RADEON_DEPTH_FORMAT_16BIT_INT_Z;
atom->cmd[CTX_RB3D_ZSTENCILCNTL] &= ~RADEON_DEPTH_FORMAT_MASK;
atom->cmd[CTX_RB3D_ZSTENCILCNTL] |= depth_fmt;
-
+
}
BEGIN_BATCH(dwords);
@@ -617,34 +616,34 @@ void radeonInitState( r100ContextPtr rmesa )
rmesa->hw.cube[2].cmd[CUBE_CMD_1] = cmdpkt(rmesa, RADEON_EMIT_PP_CUBIC_OFFSETS_T2);
rmesa->hw.zbs.cmd[ZBS_CMD_0] = cmdpkt(rmesa, RADEON_EMIT_SE_ZBIAS_FACTOR);
rmesa->hw.tcl.cmd[TCL_CMD_0] = cmdpkt(rmesa, RADEON_EMIT_SE_TCL_OUTPUT_VTX_FMT);
- rmesa->hw.mtl.cmd[MTL_CMD_0] =
+ rmesa->hw.mtl.cmd[MTL_CMD_0] =
cmdpkt(rmesa, RADEON_EMIT_SE_TCL_MATERIAL_EMMISSIVE_RED);
rmesa->hw.txr[0].cmd[TXR_CMD_0] = cmdpkt(rmesa, RADEON_EMIT_PP_TEX_SIZE_0);
rmesa->hw.txr[1].cmd[TXR_CMD_0] = cmdpkt(rmesa, RADEON_EMIT_PP_TEX_SIZE_1);
rmesa->hw.txr[2].cmd[TXR_CMD_0] = cmdpkt(rmesa, RADEON_EMIT_PP_TEX_SIZE_2);
- rmesa->hw.grd.cmd[GRD_CMD_0] =
+ rmesa->hw.grd.cmd[GRD_CMD_0] =
cmdscl( RADEON_SS_VERT_GUARD_CLIP_ADJ_ADDR, 1, 4 );
- rmesa->hw.fog.cmd[FOG_CMD_0] =
+ rmesa->hw.fog.cmd[FOG_CMD_0] =
cmdvec( RADEON_VS_FOG_PARAM_ADDR, 1, 4 );
- rmesa->hw.glt.cmd[GLT_CMD_0] =
+ rmesa->hw.glt.cmd[GLT_CMD_0] =
cmdvec( RADEON_VS_GLOBAL_AMBIENT_ADDR, 1, 4 );
- rmesa->hw.eye.cmd[EYE_CMD_0] =
+ rmesa->hw.eye.cmd[EYE_CMD_0] =
cmdvec( RADEON_VS_EYE_VECTOR_ADDR, 1, 4 );
for (i = 0 ; i < 6; i++) {
- rmesa->hw.mat[i].cmd[MAT_CMD_0] =
+ rmesa->hw.mat[i].cmd[MAT_CMD_0] =
cmdvec( RADEON_VS_MATRIX_0_ADDR + i*4, 1, 16);
}
for (i = 0 ; i < 8; i++) {
- rmesa->hw.lit[i].cmd[LIT_CMD_0] =
+ rmesa->hw.lit[i].cmd[LIT_CMD_0] =
cmdvec( RADEON_VS_LIGHT_AMBIENT_ADDR + i, 8, 24 );
- rmesa->hw.lit[i].cmd[LIT_CMD_1] =
+ rmesa->hw.lit[i].cmd[LIT_CMD_1] =
cmdscl( RADEON_SS_LIGHT_DCD_ADDR + i, 8, 6 );
}
for (i = 0 ; i < 6; i++) {
- rmesa->hw.ucp[i].cmd[UCP_CMD_0] =
+ rmesa->hw.ucp[i].cmd[UCP_CMD_0] =
cmdvec( RADEON_VS_UCP_ADDR + i, 1, 4 );
}
@@ -699,7 +698,7 @@ void radeonInitState( r100ContextPtr rmesa )
/* rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_HIERARCHY_ENABLE;*/
/* need this otherwise get lots of lockups with q3 ??? */
rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_FORCE_Z_DIRTY;
- }
+ }
}
rmesa->hw.ctx.cmd[CTX_PP_CNTL] = (RADEON_SCISSOR_ENABLE |
@@ -761,13 +760,13 @@ void radeonInitState( r100ContextPtr rmesa )
rmesa->hw.lin.cmd[LIN_RE_LINE_PATTERN] = ((1 << 16) | 0xffff);
- rmesa->hw.lin.cmd[LIN_RE_LINE_STATE] =
+ rmesa->hw.lin.cmd[LIN_RE_LINE_STATE] =
((0 << RADEON_LINE_CURRENT_PTR_SHIFT) |
(1 << RADEON_LINE_CURRENT_COUNT_SHIFT));
rmesa->hw.lin.cmd[LIN_SE_LINE_WIDTH] = (1 << 4);
- rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] =
+ rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] =
((0x00 << RADEON_STENCIL_REF_SHIFT) |
(0xff << RADEON_STENCIL_MASK_SHIFT) |
(0xff << RADEON_STENCIL_WRITEMASK_SHIFT));
@@ -775,7 +774,7 @@ void radeonInitState( r100ContextPtr rmesa )
rmesa->hw.msk.cmd[MSK_RB3D_ROPCNTL] = RADEON_ROP_COPY;
rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK] = 0xffffffff;
- rmesa->hw.msc.cmd[MSC_RE_MISC] =
+ rmesa->hw.msc.cmd[MSC_RE_MISC] =
((0 << RADEON_STIPPLE_X_OFFSET_SHIFT) |
(0 << RADEON_STIPPLE_Y_OFFSET_SHIFT) |
RADEON_STIPPLE_BIG_BIT_ORDER);
@@ -789,7 +788,7 @@ void radeonInitState( r100ContextPtr rmesa )
for ( i = 0 ; i < ctx->Const.MaxTextureUnits ; i++ ) {
rmesa->hw.tex[i].cmd[TEX_PP_TXFILTER] = RADEON_BORDER_MODE_OGL;
- rmesa->hw.tex[i].cmd[TEX_PP_TXFORMAT] =
+ rmesa->hw.tex[i].cmd[TEX_PP_TXFORMAT] =
(RADEON_TXFORMAT_ENDIAN_NO_SWAP |
RADEON_TXFORMAT_PERSPECTIVE_ENABLE |
(i << 24) | /* This is one of RADEON_TXFORMAT_ST_ROUTE_STQ[012] */
@@ -801,14 +800,14 @@ void radeonInitState( r100ContextPtr rmesa )
// rmesa->radeon.radeonScreen->texOffset[RADEON_LOCAL_TEX_HEAP];
rmesa->hw.tex[i].cmd[TEX_PP_BORDER_COLOR] = 0;
- rmesa->hw.tex[i].cmd[TEX_PP_TXCBLEND] =
+ rmesa->hw.tex[i].cmd[TEX_PP_TXCBLEND] =
(RADEON_COLOR_ARG_A_ZERO |
RADEON_COLOR_ARG_B_ZERO |
RADEON_COLOR_ARG_C_CURRENT_COLOR |
RADEON_BLEND_CTL_ADD |
RADEON_SCALE_1X |
RADEON_CLAMP_TX);
- rmesa->hw.tex[i].cmd[TEX_PP_TXABLEND] =
+ rmesa->hw.tex[i].cmd[TEX_PP_TXABLEND] =
(RADEON_ALPHA_ARG_A_ZERO |
RADEON_ALPHA_ARG_B_ZERO |
RADEON_ALPHA_ARG_C_CURRENT_ALPHA |
@@ -833,12 +832,12 @@ void radeonInitState( r100ContextPtr rmesa )
/* Can only add ST1 at the time of doing some multitex but can keep
* it after that. Errors if DIFFUSE is missing.
*/
- rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] =
+ rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] =
(RADEON_TCL_VTX_Z0 |
RADEON_TCL_VTX_W0 |
RADEON_TCL_VTX_PK_DIFFUSE
); /* need to keep this uptodate */
-
+
rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] =
( RADEON_TCL_COMPUTE_XYZW |
(RADEON_TCL_TEX_INPUT_TEX_0 << RADEON_TCL_TEX_0_OUTPUT_SHIFT) |
@@ -847,23 +846,23 @@ void radeonInitState( r100ContextPtr rmesa )
/* XXX */
- rmesa->hw.tcl.cmd[TCL_MATRIX_SELECT_0] =
+ rmesa->hw.tcl.cmd[TCL_MATRIX_SELECT_0] =
((MODEL << RADEON_MODELVIEW_0_SHIFT) |
(MODEL_IT << RADEON_IT_MODELVIEW_0_SHIFT));
- rmesa->hw.tcl.cmd[TCL_MATRIX_SELECT_1] =
+ rmesa->hw.tcl.cmd[TCL_MATRIX_SELECT_1] =
((MODEL_PROJ << RADEON_MODELPROJECT_0_SHIFT) |
(TEXMAT_0 << RADEON_TEXMAT_0_SHIFT) |
(TEXMAT_1 << RADEON_TEXMAT_1_SHIFT) |
(TEXMAT_2 << RADEON_TEXMAT_2_SHIFT));
- rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] =
+ rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] =
(RADEON_UCP_IN_CLIP_SPACE |
RADEON_CULL_FRONT_IS_CCW);
- rmesa->hw.tcl.cmd[TCL_TEXTURE_PROC_CTL] = 0;
+ rmesa->hw.tcl.cmd[TCL_TEXTURE_PROC_CTL] = 0;
- rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] =
+ rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] =
(RADEON_SPECULAR_LIGHTS |
RADEON_DIFFUSE_SPECULAR_COMBINE |
RADEON_LOCAL_LIGHT_VEC_GL |
@@ -886,14 +885,14 @@ void radeonInitState( r100ContextPtr rmesa )
ctx->Driver.Lightfv( ctx, p, GL_SPOT_CUTOFF, &l->SpotCutoff );
ctx->Driver.Lightfv( ctx, p, GL_CONSTANT_ATTENUATION,
&l->ConstantAttenuation );
- ctx->Driver.Lightfv( ctx, p, GL_LINEAR_ATTENUATION,
+ ctx->Driver.Lightfv( ctx, p, GL_LINEAR_ATTENUATION,
&l->LinearAttenuation );
- ctx->Driver.Lightfv( ctx, p, GL_QUADRATIC_ATTENUATION,
+ ctx->Driver.Lightfv( ctx, p, GL_QUADRATIC_ATTENUATION,
&l->QuadraticAttenuation );
*(float *)&(rmesa->hw.lit[i].cmd[LIT_ATTEN_XXX]) = 0.0;
}
- ctx->Driver.LightModelfv( ctx, GL_LIGHT_MODEL_AMBIENT,
+ ctx->Driver.LightModelfv( ctx, GL_LIGHT_MODEL_AMBIENT,
ctx->Light.Model.Ambient );
TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange( ctx );
@@ -908,7 +907,7 @@ void radeonInitState( r100ContextPtr rmesa )
ctx->Driver.Fogfv( ctx, GL_FOG_END, &ctx->Fog.End );
ctx->Driver.Fogfv( ctx, GL_FOG_COLOR, ctx->Fog.Color );
ctx->Driver.Fogfv( ctx, GL_FOG_COORDINATE_SOURCE_EXT, NULL );
-
+
rmesa->hw.grd.cmd[GRD_VERT_GUARD_CLIP_ADJ] = IEEE_ONE;
rmesa->hw.grd.cmd[GRD_VERT_GUARD_DISCARD_ADJ] = IEEE_ONE;
rmesa->hw.grd.cmd[GRD_HORZ_GUARD_CLIP_ADJ] = IEEE_ONE;
@@ -922,7 +921,7 @@ void radeonInitState( r100ContextPtr rmesa )
radeon_init_query_stateobj(&rmesa->radeon, R100_QUERYOBJ_CMDSIZE);
rmesa->radeon.query.queryobj.cmd[R100_QUERYOBJ_CMD_0] = CP_PACKET0(RADEON_RB3D_ZPASS_DATA, 0);
rmesa->radeon.query.queryobj.cmd[R100_QUERYOBJ_DATA_0] = 0;
-
+
rmesa->radeon.hw.all_dirty = GL_TRUE;
rcommonInitCmdBuf(&rmesa->radeon);
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index 84e216281e3..f1e55e0b68e 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
@@ -35,7 +35,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/glheader.h"
#include "main/mtypes.h"
#include "main/enums.h"
-#include "util/imports.h"
#include "main/macros.h"
#include "main/state.h"
@@ -60,7 +59,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define RADEON_MAX_TNL_VERTEX_SIZE (15 * sizeof(GLfloat)) /* for mesa _tnl stage */
/***********************************************************************
- * Initialization
+ * Initialization
***********************************************************************/
#define EMIT_ATTR( ATTR, STYLE, F0 ) \
@@ -113,19 +112,19 @@ static void radeonSetVertexFormat( struct gl_context *ctx )
if ( !rmesa->swtcl.needproj ||
(index_bitset & BITFIELD64_RANGE(_TNL_ATTRIB_TEX0, _TNL_NUM_TEX))) {
/* for projtex */
- EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_4F,
+ EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_4F,
RADEON_CP_VC_FRMT_XY | RADEON_CP_VC_FRMT_Z | RADEON_CP_VC_FRMT_W0 );
offset = 4;
}
else {
- EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_3F,
+ EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_3F,
RADEON_CP_VC_FRMT_XY | RADEON_CP_VC_FRMT_Z );
offset = 3;
}
rmesa->swtcl.coloroffset = offset;
-#if MESA_LITTLE_ENDIAN
- EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_RGBA,
+#if MESA_LITTLE_ENDIAN
+ EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_RGBA,
RADEON_CP_VC_FRMT_PKCOLOR );
#else
EMIT_ATTR( _TNL_ATTRIB_COLOR0, EMIT_4UB_4F_ABGR,
@@ -137,7 +136,7 @@ static void radeonSetVertexFormat( struct gl_context *ctx )
if (index_bitset &
(BITFIELD64_BIT(_TNL_ATTRIB_COLOR1) | BITFIELD64_BIT(_TNL_ATTRIB_FOG))) {
-#if MESA_LITTLE_ENDIAN
+#if MESA_LITTLE_ENDIAN
if (index_bitset & BITFIELD64_BIT(_TNL_ATTRIB_COLOR1)) {
rmesa->swtcl.specoffset = offset;
EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_3UB_3F_RGB,
@@ -220,7 +219,7 @@ static void radeonSetVertexFormat( struct gl_context *ctx )
rmesa->swtcl.vertex_format = fmt_0;
rmesa->radeon.swtcl.vertex_size =
_tnl_install_attrs( ctx,
- rmesa->radeon.swtcl.vertex_attrs,
+ rmesa->radeon.swtcl.vertex_attrs,
rmesa->radeon.swtcl.vertex_attr_count,
NULL, 0 );
rmesa->radeon.swtcl.vertex_size /= 4;
@@ -277,7 +276,7 @@ void radeonChooseVertexState( struct gl_context *ctx )
GLboolean unfilled = (ctx->Polygon.FrontMode != GL_FILL ||
ctx->Polygon.BackMode != GL_FILL);
GLboolean twosided = ctx->Light.Enabled && ctx->Light.Model.TwoSide;
-
+
se_coord_fmt &= ~(RADEON_VTX_XY_PRE_MULT_1_OVER_W0 |
RADEON_VTX_Z_PRE_MULT_1_OVER_W0 |
RADEON_VTX_W0_IS_NOT_1_OVER_W0);
@@ -293,7 +292,7 @@ void radeonChooseVertexState( struct gl_context *ctx )
* bigger one.
*/
- if ((0 == (tnl->render_inputs_bitset &
+ if ((0 == (tnl->render_inputs_bitset &
(BITFIELD64_RANGE(_TNL_ATTRIB_TEX0, _TNL_NUM_TEX)
| BITFIELD64_BIT(_TNL_ATTRIB_COLOR1))))
|| twosided
@@ -327,7 +326,7 @@ void r100_swtcl_flush(struct gl_context *ctx, uint32_t current_offset)
rmesa->radeon.swtcl.bo,
current_offset);
-
+
radeonEmitVbufPrim( rmesa,
rmesa->swtcl.vertex_format,
rmesa->radeon.swtcl.hw_primitive,
@@ -438,7 +437,7 @@ static GLboolean radeon_run_render( struct gl_context *ctx,
radeon_print(RADEON_SWRENDER, RADEON_NORMAL,
"radeon_render.c: prim %s %d..%d\n",
- _mesa_enum_to_string(prim & PRIM_MODE_MASK),
+ _mesa_enum_to_string(prim & PRIM_MODE_MASK),
start, start+length);
if (length)
@@ -498,7 +497,7 @@ static void radeonResetLineStipple( struct gl_context *ctx );
r100ContextPtr rmesa = R100_CONTEXT(ctx); \
const char *radeonverts = (char *)rmesa->radeon.swtcl.verts;
#define VERT(x) (radeonVertex *)(radeonverts + ((x) * (vertsize) * sizeof(int)))
-#define VERTEX radeonVertex
+#define VERTEX radeonVertex
#undef TAG
#define TAG(x) radeon_##x
#include "tnl_dd/t_dd_triemit.h"
@@ -699,7 +698,7 @@ void radeonChooseRenderState( struct gl_context *ctx )
ctx->Polygon.BackMode != GL_FILL);
GLboolean twosided = ctx->Light.Enabled && ctx->Light.Model.TwoSide;
- if (!rmesa->radeon.TclFallback || rmesa->radeon.Fallback)
+ if (!rmesa->radeon.TclFallback || rmesa->radeon.Fallback)
return;
if (twosided)
@@ -751,7 +750,7 @@ static void radeonRenderPrimitive( struct gl_context *ctx, GLenum prim )
ctx->Polygon.BackMode != GL_FILL);
rmesa->radeon.swtcl.render_primitive = prim;
- if (prim < GL_TRIANGLES || !unfilled)
+ if (prim < GL_TRIANGLES || !unfilled)
radeonRasterPrimitive( ctx, reduced_hw_prim[prim] );
}
@@ -870,9 +869,9 @@ void radeonInitSwtcl( struct gl_context *ctx )
tnl->Driver.Render.CopyPV = _tnl_copy_pv;
tnl->Driver.Render.Interp = _tnl_interp;
- _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12,
+ _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12,
RADEON_MAX_TNL_VERTEX_SIZE);
-
+
rmesa->radeon.swtcl.verts = (GLubyte *)tnl->clipspace.vertex_buf;
rmesa->radeon.swtcl.RenderIndex = ~0;
rmesa->radeon.swtcl.render_primitive = GL_TRIANGLES;
diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c
index 0a228d21aaf..4f0a127314a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c
@@ -33,7 +33,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/light.h"
#include "main/enums.h"
@@ -105,7 +104,7 @@ static GLboolean discrete_prim[0x10] = {
0,
0,
};
-
+
#define LOCAL_VARS r100ContextPtr rmesa = R100_CONTEXT(ctx)
#define ELT_TYPE GLushort
@@ -146,7 +145,7 @@ static GLboolean discrete_prim[0x10] = {
#define ALLOC_ELTS(nr) radeonAllocElts( rmesa, nr )
-static GLushort *radeonAllocElts( r100ContextPtr rmesa, GLuint nr )
+static GLushort *radeonAllocElts( r100ContextPtr rmesa, GLuint nr )
{
if (rmesa->radeon.dma.flush)
rmesa->radeon.dma.flush( &rmesa->radeon.glCtx );
@@ -166,19 +165,19 @@ static GLushort *radeonAllocElts( r100ContextPtr rmesa, GLuint nr )
* discrete and there are no intervening state changes. (Somewhat
* duplicates changes to DrawArrays code)
*/
-static void radeonEmitPrim( struct gl_context *ctx,
- GLenum prim,
- GLuint hwprim,
- GLuint start,
- GLuint count)
+static void radeonEmitPrim( struct gl_context *ctx,
+ GLenum prim,
+ GLuint hwprim,
+ GLuint start,
+ GLuint count)
{
r100ContextPtr rmesa = R100_CONTEXT( ctx );
radeonTclPrimitive( ctx, prim, hwprim );
-
+
radeonEmitAOS( rmesa,
rmesa->radeon.tcl.aos_count,
start );
-
+
/* Why couldn't this packet have taken an offset param?
*/
radeonEmitVbufPrim( rmesa,
@@ -230,7 +229,7 @@ static void radeonEmitPrim( struct gl_context *ctx,
/* External entrypoints */
/**********************************************************************/
-void radeonEmitPrimitive( struct gl_context *ctx,
+void radeonEmitPrimitive( struct gl_context *ctx,
GLuint first,
GLuint last,
GLuint flags )
@@ -238,7 +237,7 @@ void radeonEmitPrimitive( struct gl_context *ctx,
tcl_render_tab_verts[flags&PRIM_MODE_MASK]( ctx, first, last, flags );
}
-void radeonEmitEltPrimitive( struct gl_context *ctx,
+void radeonEmitEltPrimitive( struct gl_context *ctx,
GLuint first,
GLuint last,
GLuint flags )
@@ -246,7 +245,7 @@ void radeonEmitEltPrimitive( struct gl_context *ctx,
tcl_render_tab_elts[flags&PRIM_MODE_MASK]( ctx, first, last, flags );
}
-void radeonTclPrimitive( struct gl_context *ctx,
+void radeonTclPrimitive( struct gl_context *ctx,
GLenum prim,
int hw_prim )
{
@@ -267,7 +266,7 @@ void radeonTclPrimitive( struct gl_context *ctx,
se_cntl = rmesa->hw.set.cmd[SET_SE_CNTL];
se_cntl &= ~RADEON_FLAT_SHADE_VTX_LAST;
- if (prim == GL_POLYGON && ctx->Light.ShadeModel == GL_FLAT)
+ if (prim == GL_POLYGON && ctx->Light.ShadeModel == GL_FLAT)
se_cntl |= RADEON_FLAT_SHADE_VTX_0;
else
se_cntl |= RADEON_FLAT_SHADE_VTX_LAST;
@@ -363,7 +362,7 @@ static GLboolean radeon_run_tcl_render( struct gl_context *ctx,
GLuint i;
GLuint emit_end;
- /* TODO: separate this from the swtnl pipeline
+ /* TODO: separate this from the swtnl pipeline
*/
if (rmesa->radeon.TclFallback)
return GL_TRUE; /* fallback to software t&l */
@@ -427,7 +426,7 @@ static GLboolean radeon_run_tcl_render( struct gl_context *ctx,
-/* Initial state for tcl stage.
+/* Initial state for tcl stage.
*/
const struct tnl_pipeline_stage _radeon_tcl_stage =
{
@@ -463,16 +462,16 @@ static void transition_to_swtnl( struct gl_context *ctx )
radeonChooseVertexState( ctx );
radeonChooseRenderState( ctx );
- _tnl_validate_shine_tables( ctx );
+ _tnl_validate_shine_tables( ctx );
- tnl->Driver.NotifyMaterialChange =
+ tnl->Driver.NotifyMaterialChange =
_tnl_validate_shine_tables;
radeonReleaseArrays( ctx, ~0 );
se_cntl = rmesa->hw.set.cmd[SET_SE_CNTL];
se_cntl |= RADEON_FLAT_SHADE_VTX_LAST;
-
+
if (se_cntl != rmesa->hw.set.cmd[SET_SE_CNTL]) {
RADEON_STATECHANGE( rmesa, set );
rmesa->hw.set.cmd[SET_SE_CNTL] = se_cntl;
@@ -501,14 +500,14 @@ static void transition_to_hwtnl( struct gl_context *ctx )
tnl->Driver.NotifyMaterialChange = radeonUpdateMaterial;
- if ( rmesa->radeon.dma.flush )
- rmesa->radeon.dma.flush( &rmesa->radeon.glCtx );
+ if ( rmesa->radeon.dma.flush )
+ rmesa->radeon.dma.flush( &rmesa->radeon.glCtx );
rmesa->radeon.dma.flush = NULL;
rmesa->swtcl.vertex_format = 0;
-
- // if (rmesa->swtcl.indexed_verts.buf)
- // radeonReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts,
+
+ // if (rmesa->swtcl.indexed_verts.buf)
+ // radeonReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts,
// __func__ );
if (RADEON_DEBUG & RADEON_FALLBACKS)
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index bdae54eecad..c3d7affffab 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -32,7 +32,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/context.h"
#include "main/enums.h"
#include "main/image.h"
@@ -51,7 +50,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/**
* Set the texture wrap modes.
- *
+ *
* \param t Texture object whose wrap modes are to be set
* \param swrap Wrap mode for the \a s texture coordinate
* \param twrap Wrap mode for the \a t texture coordinate
@@ -158,7 +157,7 @@ static void radeonSetTexMaxAnisotropy( radeonTexObjPtr t, GLfloat max )
/**
* Set the texture magnification and minification modes.
- *
+ *
* \param t Texture whose filter modes are to be set
* \param minf Texture minification mode
* \param magf Texture magnification mode
@@ -378,13 +377,13 @@ static void radeonDeleteTexture( struct gl_context *ctx,
_mesa_delete_texture_object(ctx, texObj);
}
-/* Need:
+/* Need:
* - Same GEN_MODE for all active bits
* - Same EyePlane/ObjPlane for all active bits when using Eye/Obj
* - STRQ presumably all supported (matrix means incoming R values
* can end up in STQ, this has implications for vertex support,
* presumably ok if maos is used, though?)
- *
+ *
* Basically impossible to do this on the fly - just collect some
* basic info & do the checks from ValidateState().
*/
@@ -418,7 +417,7 @@ radeonNewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
t->pp_txfilter = RADEON_BORDER_MODE_OGL;
t->pp_txformat = (RADEON_TXFORMAT_ENDIAN_NO_SWAP |
RADEON_TXFORMAT_PERSPECTIVE_ENABLE);
-
+
radeonSetTexWrap( t, t->base.Sampler.WrapS, t->base.Sampler.WrapT );
radeonSetTexMaxAnisotropy( t, t->base.Sampler.MaxAnisotropy );
radeonSetTexFilter( t, t->base.Sampler.MinFilter, t->base.Sampler.MagFilter );
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 30cdc56bf1e..79f0095f480 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -34,7 +34,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/context.h"
#include "main/macros.h"
#include "main/teximage.h"
@@ -326,7 +325,7 @@ static GLboolean radeonUpdateTextureEnv( struct gl_context *ctx, int unit )
break;
case GL_TEXTURE0:
case GL_TEXTURE1:
- case GL_TEXTURE2: {
+ case GL_TEXTURE2: {
GLuint txunit = srcAi - GL_TEXTURE0;
if (texture_base_format(ctx->Texture.Unit[txunit]._Current) == GL_LUMINANCE)
alpha_arg[i] = radeon_zero_alpha[op+1];
@@ -670,7 +669,7 @@ void radeonSetTexBuffer(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *dPri
RADEON_TXFORMAT_NON_POWER2)
-static void disable_tex_obj_state( r100ContextPtr rmesa,
+static void disable_tex_obj_state( r100ContextPtr rmesa,
int unit )
{
RADEON_STATECHANGE( rmesa, tex[unit] );
@@ -678,7 +677,7 @@ static void disable_tex_obj_state( r100ContextPtr rmesa,
RADEON_STATECHANGE( rmesa, tcl );
rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] &= ~(RADEON_ST_BIT(unit) |
RADEON_Q_BIT(unit));
-
+
if (rmesa->radeon.TclFallback & (RADEON_TCL_FALLBACK_TEXGEN_0<<unit)) {
TCL_FALLBACK( &rmesa->radeon.glCtx, (RADEON_TCL_FALLBACK_TEXGEN_0<<unit), GL_FALSE);
rmesa->recheck_texgen[unit] = GL_TRUE;
@@ -701,7 +700,7 @@ static void disable_tex_obj_state( r100ContextPtr rmesa,
rmesa->TexGenEnabled &= ~(RADEON_TEXMAT_0_ENABLE<<unit);
rmesa->TexGenEnabled &= ~(RADEON_TEXGEN_INPUT_MASK<<inputshift);
rmesa->TexGenNeedNormals[unit] = 0;
- rmesa->TexGenEnabled |=
+ rmesa->TexGenEnabled |=
(RADEON_TEXGEN_INPUT_TEXCOORD_0+unit) << inputshift;
if (tmp != rmesa->TexGenEnabled) {
@@ -758,7 +757,7 @@ static void import_tex_obj_state( r100ContextPtr rmesa,
}
-static void set_texgen_matrix( r100ContextPtr rmesa,
+static void set_texgen_matrix( r100ContextPtr rmesa,
GLuint unit,
const GLfloat *s_plane,
const GLfloat *t_plane,
@@ -928,8 +927,8 @@ static GLboolean setup_hardware_state(r100ContextPtr rmesa, radeonTexObj *t, int
t->pp_txformat &= ~(RADEON_TXFORMAT_FORMAT_MASK |
RADEON_TXFORMAT_ALPHA_IN_MAP);
- t->pp_txfilter &= ~RADEON_YUV_TO_RGB;
-
+ t->pp_txfilter &= ~RADEON_YUV_TO_RGB;
+
t->pp_txformat |= table[ firstImage->TexFormat ].format;
t->pp_txfilter |= table[ firstImage->TexFormat ].filter;
} else {
@@ -941,7 +940,7 @@ static GLboolean setup_hardware_state(r100ContextPtr rmesa, radeonTexObj *t, int
t->pp_txfilter &= ~RADEON_MAX_MIP_LEVEL_MASK;
t->pp_txfilter |= (t->maxLod - t->minLod) << RADEON_MAX_MIP_LEVEL_SHIFT;
-
+
t->pp_txformat &= ~(RADEON_TXFORMAT_WIDTH_MASK |
RADEON_TXFORMAT_HEIGHT_MASK |
RADEON_TXFORMAT_CUBIC_MAP_ENABLE |
@@ -1004,7 +1003,7 @@ static GLboolean radeon_validate_texture(struct gl_context *ctx, struct gl_textu
return GL_FALSE;
RADEON_STATECHANGE( rmesa, ctx );
- rmesa->hw.ctx.cmd[CTX_PP_CNTL] |=
+ rmesa->hw.ctx.cmd[CTX_PP_CNTL] |=
(RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE) << unit;
RADEON_STATECHANGE( rmesa, tcl );
rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_ST_BIT(unit);
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 3bf7a0dbec3..86059c44751 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -30,7 +30,6 @@
*/
#include "main/glheader.h"
-#include "util/imports.h"
#include "main/context.h"
#include "main/enums.h"
#include "main/mipmap.h"
@@ -113,7 +112,7 @@ radeonAllocTextureImageBuffer(struct gl_context *ctx,
return GL_FALSE;
teximage_assign_miptree(rmesa, texobj, timage);
-
+
return GL_TRUE;
}
@@ -182,7 +181,7 @@ radeon_map_texture_image(struct gl_context *ctx,
} else if (likely(mt)) {
void *base;
radeon_mipmap_level *lvl = &image->mt->levels[texImage->Level];
-
+
radeon_bo_map(mt->bo, write);
base = mt->bo->ptr + lvl->faces[image->base.Base.Face].offset;
@@ -687,6 +686,6 @@ static radeon_mipmap_tree *radeon_miptree_create_for_teximage(radeonContextPtr r
return radeon_miptree_create(rmesa, texObj->Target,
texImage->TexFormat, firstLevel, lastLevel - firstLevel + 1,
- width, height, depth,
+ width, height, depth,
t->tile_bits);
-}
+}
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 1c1ecb66efd..a4f2985b6ab 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -39,7 +39,6 @@
#include "main/fbobject.h"
#include "main/formats.h"
#include "main/framebuffer.h"
-#include "util/imports.h"
#include "main/renderbuffer.h"
#include "main/version.h"
#include "main/vtxfmt.h"
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 43ba716c035..dea5ae1fe94 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -41,7 +41,6 @@
#include "main/extensions.h"
#include "main/formats.h"
#include "main/framebuffer.h"
-#include "util/imports.h"
#include "main/macros.h"
#include "main/mipmap.h"
#include "main/mtypes.h"
@@ -899,7 +898,7 @@ OSMesaCreateContextAttribs(const int *attribList, OSMesaContext sharelist)
free(osmesa);
return NULL;
}
-
+
_swsetup_Wakeup( ctx );
/* use default TCL pipeline */
@@ -1041,7 +1040,7 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type,
osmesa->DataType = type;
- /* Set renderbuffer fields. Set width/height = 0 to force
+ /* Set renderbuffer fields. Set width/height = 0 to force
* osmesa_renderbuffer_storage() being called by _mesa_resize_framebuffer()
*/
osmesa->srb->Buffer = buffer;
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 4201a05df8f..4c136cca4ed 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -47,7 +47,6 @@
#include "main/context.h"
#include "main/config.h"
#include "main/macros.h"
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/version.h"
#include "xfonts.h"
@@ -1207,8 +1206,8 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
stencil_size = 8;
if (accumRedSize > 0 || accumGreenSize > 0 || accumBlueSize > 0 ||
accumAlphaSize > 0) {
- accumRedSize =
- accumGreenSize =
+ accumRedSize =
+ accumGreenSize =
accumBlueSize = default_accum_bits();
accumAlphaSize = alpha_flag ? accumRedSize : 0;
}
diff --git a/src/mesa/drivers/x11/xfonts.c b/src/mesa/drivers/x11/xfonts.c
index 04f397bd27d..377edcb23b3 100644
--- a/src/mesa/drivers/x11/xfonts.c
+++ b/src/mesa/drivers/x11/xfonts.c
@@ -31,7 +31,6 @@
#include <stdio.h>
#include "glxheader.h"
#include "main/context.h"
-#include "util/imports.h"
#include "xfonts.h"
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index 61a1ea8a350..0011a842fb0 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -69,7 +69,6 @@
#include "main/context.h"
#include "main/extensions.h"
#include "main/framebuffer.h"
-#include "util/imports.h"
#include "main/macros.h"
#include "main/renderbuffer.h"
#include "main/teximage.h"
diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c
index d251cd4b93b..664de8dda77 100644
--- a/src/mesa/drivers/x11/xm_buffer.c
+++ b/src/mesa/drivers/x11/xm_buffer.c
@@ -32,7 +32,6 @@
#include "glxheader.h"
#include "xmesaP.h"
#include "main/errors.h"
-#include "util/imports.h"
#include "main/formats.h"
#include "main/framebuffer.h"
#include "main/renderbuffer.h"
@@ -43,7 +42,7 @@
#define XMESA_RENDERBUFFER 0x1234
-#if defined(USE_XSHM)
+#if defined(USE_XSHM)
static volatile int mesaXErrorFlag = 0;
/**
@@ -177,7 +176,7 @@ alloc_back_buffer(XMesaBuffer b, GLuint width, GLuint height)
if (b->db_mode == BACK_XIMAGE) {
/* Deallocate the old backxrb->ximage, if any */
if (b->backxrb->ximage) {
-#if defined(USE_XSHM)
+#if defined(USE_XSHM)
if (b->shm) {
XShmDetach(b->xm_visual->display, &b->shminfo);
XDestroyImage(b->backxrb->ximage);
@@ -396,7 +395,7 @@ xmesa_delete_framebuffer(struct gl_framebuffer *fb)
if (fb->Visual.doubleBufferMode) {
/* free back ximage/pixmap/shmregion */
if (b->backxrb->ximage) {
-#if defined(USE_XSHM)
+#if defined(USE_XSHM)
if (b->shm) {
XShmDetach( b->display, &b->shminfo );
XDestroyImage( b->backxrb->ximage );
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 9872115f96d..195684450a8 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -37,7 +37,6 @@
#include "main/macros.h"
#include "main/mipmap.h"
#include "main/image.h"
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/pbo.h"
#include "main/texformat.h"
@@ -316,7 +315,7 @@ can_do_DrawPixels_8R8G8B(struct gl_context *ctx, GLenum format, GLenum type)
if (swrast->NewState)
_swrast_validate_derived( ctx );
-
+
if ((swrast->_RasterMask & ~CLIP_BIT) == 0) /* no blend, z-test, etc */ {
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0];
if (rb) {
@@ -447,7 +446,7 @@ can_do_DrawPixels_5R6G5B(struct gl_context *ctx, GLenum format, GLenum type)
if (swrast->NewState)
_swrast_validate_derived( ctx );
-
+
if ((swrast->_RasterMask & ~CLIP_BIT) == 0) /* no blend, z-test, etc */ {
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0];
if (rb) {
@@ -487,7 +486,7 @@ xmesa_DrawPixels_5R6G5B( struct gl_context *ctx,
if (swrast->NewState)
_swrast_validate_derived( ctx );
-
+
if (unpack->BufferObj) {
/* unpack from PBO */
GLubyte *buf;
diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c
index d5a27a981dc..fff2af05a18 100644
--- a/src/mesa/drivers/x11/xm_tri.c
+++ b/src/mesa/drivers/x11/xm_tri.c
@@ -32,7 +32,6 @@
#include <stdio.h>
#include "c99_math.h"
-#include "util/imports.h"
#include "main/mtypes.h"
#include "glxheader.h"
#include "xmesaP.h"
@@ -1021,7 +1020,7 @@ get_triangle_func(struct gl_context *ctx)
return (swrast_tri_func) NULL;
if (swrast->_RasterMask & MULTI_DRAW_BIT)
return (swrast_tri_func) NULL;
- if (ctx->Polygon.CullFlag &&
+ if (ctx->Polygon.CullFlag &&
ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK)
return (swrast_tri_func) NULL;
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 86d19c57d92..ff1168afc45 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -29,7 +29,7 @@
#include "format_unpack.h"
#include "format_pack.h"
#include "framebuffer.h"
-#include "util/imports.h"
+
#include "macros.h"
#include "state.h"
#include "mtypes.h"
@@ -99,7 +99,7 @@ _mesa_clear_accum_buffer(struct gl_context *ctx)
for (j = 0; j < height; j++) {
GLshort *row = (GLshort *) accMap;
-
+
for (i = 0; i < width; i++) {
row[i * 4 + 0] = clearR;
row[i * 4 + 1] = clearG;
@@ -441,7 +441,7 @@ accum(struct gl_context *ctx, GLenum op, GLfloat value)
}
-void
+void
_mesa_init_accum( struct gl_context *ctx )
{
/* Accumulate buffer group */
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index bc74cede5fe..5df7b05fbd8 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -39,7 +39,7 @@
#include "api_arrayelt.h"
#include "bufferobj.h"
#include "context.h"
-#include "util/imports.h"
+
#include "macros.h"
#include "mtypes.h"
#include "main/dispatch.h"
diff --git a/src/mesa/main/arbprogram.c b/src/mesa/main/arbprogram.c
index 25de173784c..67162946015 100644
--- a/src/mesa/main/arbprogram.c
+++ b/src/mesa/main/arbprogram.c
@@ -32,7 +32,7 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/hash.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/arbprogram.h"
@@ -158,7 +158,7 @@ _mesa_BindProgramARB(GLenum target, GLuint id)
* \note Not compiled into display lists.
* \note Called by both glDeleteProgramsNV and glDeleteProgramsARB.
*/
-void GLAPIENTRY
+void GLAPIENTRY
_mesa_DeleteProgramsARB(GLsizei n, const GLuint *ids)
{
GLint i;
@@ -256,7 +256,7 @@ _mesa_GenProgramsARB(GLsizei n, GLuint *ids)
GLboolean GLAPIENTRY
_mesa_IsProgramARB(GLuint id)
{
- struct gl_program *prog = NULL;
+ struct gl_program *prog = NULL;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
@@ -487,7 +487,7 @@ void GLAPIENTRY
_mesa_ProgramEnvParameter4dARB(GLenum target, GLuint index,
GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
- _mesa_ProgramEnvParameter4fARB(target, index, (GLfloat) x, (GLfloat) y,
+ _mesa_ProgramEnvParameter4fARB(target, index, (GLfloat) x, (GLfloat) y,
(GLfloat) z, (GLfloat) w);
}
@@ -500,8 +500,8 @@ void GLAPIENTRY
_mesa_ProgramEnvParameter4dvARB(GLenum target, GLuint index,
const GLdouble *params)
{
- _mesa_ProgramEnvParameter4fARB(target, index, (GLfloat) params[0],
- (GLfloat) params[1], (GLfloat) params[2],
+ _mesa_ProgramEnvParameter4fARB(target, index, (GLfloat) params[0],
+ (GLfloat) params[1], (GLfloat) params[2],
(GLfloat) params[3]);
}
@@ -602,7 +602,7 @@ _mesa_GetProgramEnvParameterdvARB(GLenum target, GLuint index,
void GLAPIENTRY
-_mesa_GetProgramEnvParameterfvARB(GLenum target, GLuint index,
+_mesa_GetProgramEnvParameterfvARB(GLenum target, GLuint index,
GLfloat *params)
{
GLfloat *param;
@@ -746,7 +746,7 @@ _mesa_ProgramLocalParameter4dARB(GLenum target, GLuint index,
GLdouble x, GLdouble y,
GLdouble z, GLdouble w)
{
- _mesa_ProgramLocalParameter4fARB(target, index, (GLfloat) x, (GLfloat) y,
+ _mesa_ProgramLocalParameter4fARB(target, index, (GLfloat) x, (GLfloat) y,
(GLfloat) z, (GLfloat) w);
}
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index bbb79fb03e7..dd410c345cc 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -43,7 +43,7 @@
#include "glheader.h"
#include "hash.h"
#include "image.h"
-#include "util/imports.h"
+
#include "context.h"
#include "bufferobj.h"
#include "arrayobj.h"
@@ -1053,7 +1053,7 @@ delete_vertex_arrays(struct gl_context *ctx, GLsizei n, const GLuint *ids)
if (ctx->Array._DrawVAO == obj)
_mesa_set_draw_vao(ctx, ctx->Array._EmptyVAO, 0);
- /* Unreference the array object.
+ /* Unreference the array object.
* If refcount hits zero, the object will be deleted.
*/
_mesa_reference_vao(ctx, &obj, NULL);
diff --git a/src/mesa/main/atifragshader.c b/src/mesa/main/atifragshader.c
index 4d9ddcc56ef..44f6bb46484 100644
--- a/src/mesa/main/atifragshader.c
+++ b/src/mesa/main/atifragshader.c
@@ -24,7 +24,7 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/hash.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/enums.h"
#include "main/mtypes.h"
@@ -110,7 +110,7 @@ create_dst_mod_str(GLuint mod)
return ret_str;
}
-static char *atifs_ops[] = {"ColorFragmentOp1ATI", "ColorFragmentOp2ATI", "ColorFragmentOp3ATI",
+static char *atifs_ops[] = {"ColorFragmentOp1ATI", "ColorFragmentOp2ATI", "ColorFragmentOp3ATI",
"AlphaFragmentOp1ATI", "AlphaFragmentOp2ATI", "AlphaFragmentOp3ATI" };
static void debug_op(GLint optype, GLuint arg_count, GLenum op, GLuint dst,
@@ -122,14 +122,14 @@ static void debug_op(GLint optype, GLuint arg_count, GLenum op, GLuint dst,
char *op_name;
op_name = atifs_ops[(arg_count-1)+(optype?3:0)];
-
+
fprintf(stderr, "%s(%s, %s", op_name, _mesa_enum_to_string(op),
_mesa_enum_to_string(dst));
if (optype == ATI_FRAGMENT_SHADER_COLOR_OP)
fprintf(stderr, ", %d", dstMask);
-
+
fprintf(stderr, ", %s", create_dst_mod_str(dstMod));
-
+
fprintf(stderr, ", %s, %s, %d", _mesa_enum_to_string(arg1),
_mesa_enum_to_string(arg1Rep), arg1Mod);
if (arg_count>1)
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index d2bcdb8373f..35231335813 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -24,7 +24,7 @@
*/
#include "glheader.h"
-#include "util/imports.h"
+
#include "accum.h"
#include "arrayobj.h"
#include "attrib.h"
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 16283febef1..cc6d55d555a 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -77,7 +77,7 @@
#include "glheader.h"
-#include "util/imports.h"
+
#include "accum.h"
#include "api_exec.h"
#include "api_loopback.h"
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index a816131742e..f2feb7f9ed4 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -50,7 +50,7 @@
#include "errors.h"
-#include "util/imports.h"
+
#include "extensions.h"
#include "mtypes.h"
#include "vbo/vbo.h"
@@ -66,7 +66,7 @@ struct _glapi_table;
/** \name Visual-related functions */
/*@{*/
-
+
extern struct gl_config *
_mesa_create_visual( GLboolean dbFlag,
GLboolean stereoFlag,
@@ -257,7 +257,7 @@ do { \
/**
* Macro to assert that the API call was made outside the
* glBegin()/glEnd() pair, with return value.
- *
+ *
* \param ctx GL context.
* \param retval value to return in case the assertion fails.
*/
@@ -272,7 +272,7 @@ do { \
/**
* Macro to assert that the API call was made outside the
* glBegin()/glEnd() pair.
- *
+ *
* \param ctx GL context.
*/
#define ASSERT_OUTSIDE_BEGIN_END(ctx) \
diff --git a/src/mesa/main/cpuinfo.c b/src/mesa/main/cpuinfo.c
index c085d3430d4..1623a20892e 100644
--- a/src/mesa/main/cpuinfo.c
+++ b/src/mesa/main/cpuinfo.c
@@ -23,7 +23,10 @@
*/
-#include "util/imports.h"
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
#include "main/cpuinfo.h"
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index a646d4426ef..5d00cc0a8c7 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -30,7 +30,7 @@
#include "enums.h"
#include "formats.h"
#include "hash.h"
-#include "util/imports.h"
+
#include "macros.h"
#include "debug.h"
#include "get.h"
@@ -210,7 +210,7 @@ set_debug_flags(const char *str)
/**
* Initialize debugging variables from env vars.
*/
-void
+void
_mesa_init_debug( struct gl_context *ctx )
{
set_debug_flags(getenv("MESA_DEBUG"));
@@ -307,7 +307,7 @@ _mesa_write_renderbuffer_image(const struct gl_renderbuffer *rb)
char s[100];
GLenum format, type;
- if (rb->_BaseFormat == GL_RGB ||
+ if (rb->_BaseFormat == GL_RGB ||
rb->_BaseFormat == GL_RGBA) {
format = GL_RGBA;
type = GL_UNSIGNED_BYTE;
diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c
index e212ed965b9..3f1ca8bf340 100644
--- a/src/mesa/main/debug_output.c
+++ b/src/mesa/main/debug_output.c
@@ -28,7 +28,7 @@
#include "context.h"
#include "debug_output.h"
#include "enums.h"
-#include "util/imports.h"
+
#include "hash.h"
#include "mtypes.h"
#include "version.h"
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index f37d175b888..278a4ce40fa 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -24,7 +24,7 @@
#include "glheader.h"
-#include "util/imports.h"
+
#include "context.h"
#include "depth.h"
#include "enums.h"
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index bd2ce8f5053..a780100e456 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -31,7 +31,7 @@
#include "c99_math.h"
#include "glheader.h"
-#include "util/imports.h"
+
#include "api_arrayelt.h"
#include "api_exec.h"
#include "api_loopback.h"
diff --git a/src/mesa/main/draw_validate.c b/src/mesa/main/draw_validate.c
index 4b624af1e2f..5a1f6d2a194 100644
--- a/src/mesa/main/draw_validate.c
+++ b/src/mesa/main/draw_validate.c
@@ -28,7 +28,7 @@
#include "arrayobj.h"
#include "bufferobj.h"
#include "context.h"
-#include "util/imports.h"
+
#include "mtypes.h"
#include "pipelineobj.h"
#include "enums.h"
diff --git a/src/mesa/main/drawtex.c b/src/mesa/main/drawtex.c
index 304c74879b5..e7c76d1b044 100644
--- a/src/mesa/main/drawtex.c
+++ b/src/mesa/main/drawtex.c
@@ -24,7 +24,7 @@
#include "main/errors.h"
#include "main/drawtex.h"
#include "main/state.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index b3487efb522..91988f183f8 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -32,7 +32,7 @@
#include <stdio.h>
#include "errors.h"
#include "enums.h"
-#include "util/imports.h"
+
#include "context.h"
#include "debug_output.h"
@@ -82,8 +82,8 @@ output_if_debug(const char *prefixString, const char *outputString,
fflush(LogFile);
#if defined(_WIN32)
- /* stderr from windows applications without console is not usually
- * visible, so communicate with the debugger instead */
+ /* stderr from windows applications without console is not usually
+ * visible, so communicate with the debugger instead */
{
char buf[4096];
snprintf(buf, sizeof(buf), "%s: %s%s", prefixString, outputString, newline ? "\n" : "");
diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c
index 020d891ae33..38d8bdaa399 100644
--- a/src/mesa/main/es1_conversion.c
+++ b/src/mesa/main/es1_conversion.c
@@ -9,7 +9,7 @@
#include "context.h"
#include "depth.h"
#include "fog.h"
-#include "util/imports.h"
+
#include "light.h"
#include "lines.h"
#include "matrix.h"
diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c
index 37a043a0b3a..b2018b5e767 100644
--- a/src/mesa/main/execmem.c
+++ b/src/mesa/main/execmem.c
@@ -32,7 +32,6 @@
#include <stdio.h>
-#include "util/imports.h"
#include "main/glheader.h"
#include "execmem.h"
#include "c11/threads.h"
@@ -80,7 +79,7 @@ init_heap(void)
if (!exec_heap)
exec_heap = u_mmInit( 0, EXEC_HEAP_SIZE );
-
+
if (!exec_mem)
exec_mem = mmap(NULL, EXEC_HEAP_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
@@ -107,24 +106,24 @@ _mesa_exec_malloc(unsigned size)
if (block)
addr = exec_mem + block->ofs;
- else
+ else
printf("_mesa_exec_malloc failed\n");
bail:
mtx_unlock(&exec_mutex);
-
+
return addr;
}
-
-void
+
+void
_mesa_exec_free(void *addr)
{
mtx_lock(&exec_mutex);
if (exec_heap) {
struct mem_block *block = u_mmFindBlock(exec_heap, (unsigned char *)addr - exec_mem);
-
+
if (block)
u_mmFreeMem(block);
}
@@ -145,8 +144,8 @@ _mesa_exec_malloc(unsigned size)
return malloc( size );
}
-
-void
+
+void
_mesa_exec_free(void *addr)
{
free(addr);
diff --git a/src/mesa/main/execmem.h b/src/mesa/main/execmem.h
index f9479b96379..d98cad7135b 100644
--- a/src/mesa/main/execmem.h
+++ b/src/mesa/main/execmem.h
@@ -26,6 +26,7 @@
#ifndef EXECMEM_H
#define EXECMEM_H
+#include "glheader.h"
extern void *
_mesa_exec_malloc(unsigned size);
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 6c1551687b2..2d780c0743c 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -31,7 +31,7 @@
#include "glheader.h"
-#include "util/imports.h"
+
#include "context.h"
#include "extensions.h"
#include "macros.h"
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index 9ae86f4ee13..05633d0d7d4 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -1,10 +1,10 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, Inc.
* All Rights Reserved.
* Copyright 2009 VMware, Inc. All Rights Reserved.
* Copyright © 2010-2011 Intel Corporation
- *
+ *
* 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
@@ -12,11 +12,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -24,12 +24,12 @@
* 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.
- *
+ *
**************************************************************************/
#include "main/glheader.h"
#include "main/context.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/samplerobj.h"
#include "main/shaderobj.h"
@@ -503,7 +503,7 @@ static GLboolean args_match( const struct state_key *key, GLuint unit )
return GL_FALSE;
}
break;
- default:
+ default:
return GL_FALSE; /* impossible */
}
}
@@ -587,7 +587,7 @@ emit_combine(texenv_fragment_program *p,
case TEXENV_MODE_ADD_PRODUCTS_SIGNED_NV:
return add(add(mul(src[0], src[1]), mul(src[2], src[3])),
new(p->mem_ctx) ir_constant(-0.5f));
- default:
+ default:
assert(0);
return src[0];
}
@@ -606,7 +606,7 @@ emit_texenv(texenv_fragment_program *p, GLuint unit)
if (!key->unit[unit].enabled) {
return get_source(p, TEXENV_SRC_PREVIOUS, 0);
}
-
+
switch (key->unit[unit].ModeRGB) {
case TEXENV_MODE_DOT3_RGB_EXT:
alpha_shift = key->unit[unit].ScaleShiftA;
@@ -621,7 +621,7 @@ emit_texenv(texenv_fragment_program *p, GLuint unit)
alpha_shift = key->unit[unit].ScaleShiftA;
break;
}
-
+
/* If we'll do rgb/alpha shifting don't saturate in emit_combine().
* We don't want to clamp twice.
*/
@@ -869,7 +869,7 @@ load_texenv_source(texenv_fragment_program *p,
case TEXENV_SRC_TEXTURE7:
load_texture(p, src - TEXENV_SRC_TEXTURE0);
break;
-
+
default:
/* not a texture src - do nothing */
break;
diff --git a/src/mesa/main/format_unpack.py b/src/mesa/main/format_unpack.py
index e3c86bbf4bc..161a4021567 100644
--- a/src/mesa/main/format_unpack.py
+++ b/src/mesa/main/format_unpack.py
@@ -42,6 +42,7 @@ string = """/*
*/
#include <stdint.h>
+#include <stdlib.h>
#include "format_unpack.h"
#include "format_utils.h"
diff --git a/src/mesa/main/format_utils.c b/src/mesa/main/format_utils.c
index 732e2424cbb..1ac1cf36bc8 100644
--- a/src/mesa/main/format_utils.c
+++ b/src/mesa/main/format_utils.c
@@ -22,6 +22,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <stdlib.h>
+
#include "errors.h"
#include "format_utils.h"
#include "glformats.h"
diff --git a/src/mesa/main/format_utils.h b/src/mesa/main/format_utils.h
index c298d0477ad..9b6d1c39be7 100644
--- a/src/mesa/main/format_utils.h
+++ b/src/mesa/main/format_utils.h
@@ -32,7 +32,7 @@
#define FORMAT_UTILS_H
#include "formats.h"
-#include "util/imports.h"
+
#include "macros.h"
#include "util/rounding.h"
#include "util/half_float.h"
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 53f01ffc18a..114ea5218be 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -25,7 +25,7 @@
#include "errors.h"
-#include "util/imports.h"
+
#include "formats.h"
#include "macros.h"
#include "glformats.h"
@@ -574,7 +574,7 @@ _mesa_is_format_unsigned(mesa_format format)
bool
_mesa_is_format_signed(mesa_format format)
{
- if (format == MESA_FORMAT_R11G11B10_FLOAT ||
+ if (format == MESA_FORMAT_R11G11B10_FLOAT ||
format == MESA_FORMAT_R9G9B9E5_FLOAT) {
/* these packed float formats only store unsigned values */
return false;
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index ae961689901..5061c179ee9 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -31,7 +31,7 @@
#include <stdio.h>
#include "glheader.h"
-#include "util/imports.h"
+
#include "blend.h"
#include "buffers.h"
#include "context.h"
diff --git a/src/mesa/main/hash.h b/src/mesa/main/hash.h
index 040c6cb5824..0a3996a7d00 100644
--- a/src/mesa/main/hash.h
+++ b/src/mesa/main/hash.h
@@ -1,6 +1,6 @@
/**
* \file hash.h
- * Generic hash table.
+ * Generic hash table.
*/
/*
@@ -32,8 +32,10 @@
#define HASH_H
+#include <stdbool.h>
+#include <stdint.h>
#include "glheader.h"
-#include "util/imports.h"
+
#include "c11/threads.h"
/**
diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c
index 5a09a7362a9..890be7b39c8 100644
--- a/src/mesa/main/hint.c
+++ b/src/mesa/main/hint.c
@@ -28,7 +28,7 @@
#include "enums.h"
#include "context.h"
#include "hint.h"
-#include "util/imports.h"
+
#include "mtypes.h"
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 0ec1d09853e..4358503e3ca 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -34,7 +34,7 @@
#include "colormac.h"
#include "glformats.h"
#include "image.h"
-#include "util/imports.h"
+
#include "macros.h"
#include "mtypes.h"
@@ -288,7 +288,7 @@ _mesa_image_address3d( const struct gl_pixelstore_attrib *packing,
* \param width image width.
* \param format pixel format.
* \param type pixel data type.
- *
+ *
* \return the stride in bytes for the given parameters, or -1 if error
*/
GLint
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 3e1227328e1..caa310fd021 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -34,8 +34,9 @@
#include "util/macros.h"
#include "util/u_math.h"
#include "util/rounding.h"
-#include "util/imports.h"
+#include "util/compiler.h"
#include "main/glheader.h"
+#include "mesa_private.h"
/**
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index 58a48ed9933..eba3e8b3317 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -36,7 +36,7 @@
#include "glheader.h"
-#include "util/imports.h"
+
#include "context.h"
#include "enums.h"
#include "macros.h"
@@ -382,7 +382,7 @@ pop_matrix( struct gl_context *ctx, struct gl_matrix_stack *stack )
* Pop the current matrix stack.
*
* \sa glPopMatrix().
- *
+ *
* Flushes the vertices, verifies the current matrix stack is not empty, and
* moves the stack head down.
* Marks __struct gl_contextRec::NewState with the dirty stack flag.
@@ -896,7 +896,7 @@ _mesa_MatrixMultTransposedEXT( GLenum matrixMode, const GLdouble *m )
*
* Calls _math_matrix_analyse() with the top-matrix of the projection matrix
* stack, and recomputes user clip positions if necessary.
- *
+ *
* \note This routine references __struct gl_contextRec::Tranform attribute
* values to compute userclip positions in clip space, but is only called on
* _NEW_PROJECTION. The _mesa_ClipPlane() function keeps these values up to
@@ -982,7 +982,7 @@ void _mesa_update_modelview_project( struct gl_context *ctx, GLuint new_state )
* \param stack matrix stack.
* \param maxDepth maximum stack depth.
* \param dirtyFlag dirty flag.
- *
+ *
* Allocates an array of \p maxDepth elements for the matrix stack and calls
* _math_matrix_ctr() for each element to initialize it.
*/
@@ -1002,9 +1002,9 @@ init_matrix_stack(struct gl_matrix_stack *stack,
/**
* Free matrix stack.
- *
+ *
* \param stack matrix stack.
- *
+ *
* Calls _math_matrix_dtr() for each element of the matrix stack and
* frees the array.
*/
@@ -1060,7 +1060,7 @@ void _mesa_init_matrix( struct gl_context * ctx )
/**
* Free the context matrix data.
- *
+ *
* \param ctx GL context.
*
* Frees each of the matrix stacks and the combined modelview-projection
@@ -1082,7 +1082,7 @@ void _mesa_free_matrix_data( struct gl_context *ctx )
}
-/**
+/**
* Initialize the context transform attribute group.
*
* \param ctx GL context.
diff --git a/src/util/imports.h b/src/mesa/main/mesa_private.h
index 345e9114aa3..229a746a809 100644
--- a/src/util/imports.h
+++ b/src/mesa/main/mesa_private.h
@@ -22,26 +22,16 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-
/**
- * \file imports.h
- * Standard C library function wrappers.
+ * \file mesa_private.h
+ * Contains mesa internal values
*
- * This file provides wrappers for all the standard C library functions
- * like malloc(), free(), printf(), getenv(), etc.
*/
+#ifndef MESA_PRIVATE_H
+#define MESA_PRIVATE_H
-#ifndef IMPORTS_H
-#define IMPORTS_H
-
-
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include "util/compiler.h"
-#include "util/bitscan.h"
-#include "util/u_memory.h"
+#include "glheader.h"
#ifdef __cplusplus
extern "C" {
@@ -63,5 +53,4 @@ typedef union { float f; int i; unsigned u; } fi_type;
}
#endif
-
-#endif /* IMPORTS_H */
+#endif /* MESA_PRIVATE_H */
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index dc606877d01..f882bae89ce 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -28,7 +28,7 @@
*/
#include "errors.h"
-#include "util/imports.h"
+
#include "formats.h"
#include "glformats.h"
#include "mipmap.h"
@@ -1620,7 +1620,7 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
GLubyte *dstImgRow = imgDst;
for (row = 0; row < dstHeightNB; row++) {
- do_row_3D(datatype, comps, srcWidthNB,
+ do_row_3D(datatype, comps, srcWidthNB,
srcImgARowA, srcImgARowB,
srcImgBRowA, srcImgBRowB,
dstWidthNB, dstImgRow);
diff --git a/src/mesa/main/objectpurge.c b/src/mesa/main/objectpurge.c
index 615862e32ae..78bc4487617 100644
--- a/src/mesa/main/objectpurge.c
+++ b/src/mesa/main/objectpurge.c
@@ -31,7 +31,7 @@
#include "glheader.h"
#include "enums.h"
#include "hash.h"
-#include "util/imports.h"
+
#include "context.h"
#include "bufferobj.h"
#include "fbobject.h"
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
index 818fcf85384..223bbb5adc1 100644
--- a/src/mesa/main/pack.c
+++ b/src/mesa/main/pack.c
@@ -46,12 +46,12 @@
#include "glheader.h"
#include "enums.h"
#include "image.h"
-#include "util/imports.h"
+
#include "macros.h"
#include "mtypes.h"
#include "pack.h"
#include "pixeltransfer.h"
-#include "util/imports.h"
+
#include "glformats.h"
#include "format_utils.h"
#include "format_pack.h"
@@ -1263,7 +1263,7 @@ _mesa_unpack_image( GLuint dimensions,
for (i = 0; i < width; i++) {
if (*s & srcMask) {
*d |= dstMask;
- }
+ }
if (srcMask == 128) {
srcMask = 1;
s++;
@@ -1305,7 +1305,7 @@ _mesa_unpack_image( GLuint dimensions,
}
else {
dstMask = dstMask >> 1;
- }
+ }
}
}
}
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index c0b6871c7b3..f12bcfe0e85 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -48,6 +48,7 @@
#include "program/program.h"
#include "program/prog_parameter.h"
#include "util/ralloc.h"
+#include "util/bitscan.h"
/**
* Delete a pipeline object.
diff --git a/src/mesa/main/pixeltransfer.c b/src/mesa/main/pixeltransfer.c
index 1b8abd87a61..b4dff56bdaa 100644
--- a/src/mesa/main/pixeltransfer.c
+++ b/src/mesa/main/pixeltransfer.c
@@ -33,7 +33,7 @@
#include "glheader.h"
#include "macros.h"
#include "pixeltransfer.h"
-#include "util/imports.h"
+
#include "mtypes.h"
#include "util/rounding.h"
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index f44542385b9..6eee6948336 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -29,7 +29,7 @@
#include "glheader.h"
-#include "util/imports.h"
+
#include "context.h"
#include "image.h"
#include "enums.h"
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 8577a57fbe4..e54a37b8e89 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -28,7 +28,7 @@
#include "context.h"
#include "enums.h"
#include "hash.h"
-#include "util/imports.h"
+
#include "queryobj.h"
#include "mtypes.h"
#include "util/u_memory.h"
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index a7ca828e3f1..bca9c0c90a4 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -23,7 +23,7 @@
*/
#include "glheader.h"
-#include "util/imports.h"
+
#include "blend.h"
#include "bufferobj.h"
#include "context.h"
diff --git a/src/mesa/main/remap.c b/src/mesa/main/remap.c
index c8b01fb1a58..2110140ab95 100644
--- a/src/mesa/main/remap.c
+++ b/src/mesa/main/remap.c
@@ -36,8 +36,9 @@
*/
#include <stdbool.h>
+#include <string.h>
#include "remap.h"
-#include "util/imports.h"
+
#include "glapi/glapi.h"
#define MAX_ENTRY_POINTS 16
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 2624f01259d..27c6d90fb9b 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -24,7 +24,7 @@
#include "glheader.h"
-#include "util/imports.h"
+
#include "context.h"
#include "fbobject.h"
#include "formats.h"
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index 18e1d750155..357368b38de 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -27,7 +27,7 @@
* Shared-context state
*/
-#include "util/imports.h"
+
#include "mtypes.h"
#include "hash.h"
#include "atifragshader.h"
@@ -330,7 +330,7 @@ delete_semaphore_object_cb(GLuint id, void *data, void *userData)
*
* \param ctx GL context.
* \param shared shared state pointer.
- *
+ *
* Frees the display lists, the texture objects (calling the driver texture
* deletion callback to free its private data) and the vertex programs, as well
* as their hash tables.
diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c
index 6ef6833bb71..604167ae2d7 100644
--- a/src/mesa/main/stencil.c
+++ b/src/mesa/main/stencil.c
@@ -48,7 +48,7 @@
#include "glheader.h"
-#include "util/imports.h"
+
#include "context.h"
#include "macros.h"
#include "stencil.h"
@@ -318,9 +318,9 @@ _mesa_StencilMask( GLuint mask )
* \param zfail action to take when stencil test passes, but depth test fails.
* \param zpass action to take when stencil test passes and the depth test
* passes (or depth testing is not enabled).
- *
+ *
* \sa glStencilOp().
- *
+ *
* Verifies the parameters and updates the respective fields in
* __struct gl_contextRec::Stencil. On change flushes the vertices and notifies
* the driver via the dd_function_table::StencilOp callback.
diff --git a/src/mesa/main/streaming-load-memcpy.h b/src/mesa/main/streaming-load-memcpy.h
index d31c199a27c..9ecb685d660 100644
--- a/src/mesa/main/streaming-load-memcpy.h
+++ b/src/mesa/main/streaming-load-memcpy.h
@@ -33,6 +33,8 @@
#ifndef STREAMING_LOAD_MEMCPY_H
#define STREAMING_LOAD_MEMCPY_H
+#include <stdlib.h>
+
void
_mesa_streaming_load_memcpy(void *restrict dst, void *restrict src, size_t len);
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index 838d2d00a02..23b49c981ae 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -57,7 +57,7 @@
#include <inttypes.h>
#include "glheader.h"
-#include "util/imports.h"
+
#include "context.h"
#include "macros.h"
#include "get.h"
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index 6b97695c8ef..992818cc001 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -31,7 +31,7 @@
#include "glheader.h"
-#include "util/imports.h"
+
#include "context.h"
#include "formats.h"
#include "mtypes.h"
diff --git a/src/mesa/main/texcompress_astc.cpp b/src/mesa/main/texcompress_astc.cpp
index 63676dfa64c..583e582a4b6 100644
--- a/src/mesa/main/texcompress_astc.cpp
+++ b/src/mesa/main/texcompress_astc.cpp
@@ -37,6 +37,7 @@
#include "macros.h"
#include "util/half_float.h"
#include <stdio.h>
+#include <cstdlib> // for abort() on windows
static bool VERBOSE_DECODE = false;
static bool VERBOSE_WRITE = false;
diff --git a/src/mesa/main/texcompress_cpal.c b/src/mesa/main/texcompress_cpal.c
index db99649e2bf..76f3cd9bfb4 100644
--- a/src/mesa/main/texcompress_cpal.c
+++ b/src/mesa/main/texcompress_cpal.c
@@ -34,7 +34,7 @@
#include "glheader.h"
#include "context.h"
#include "mtypes.h"
-#include "util/imports.h"
+
#include "pixelstore.h"
#include "texcompress_cpal.h"
#include "teximage.h"
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 5b93eee3439..7eedd6e1732 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -31,7 +31,7 @@
#include "errors.h"
#include "glheader.h"
-#include "util/imports.h"
+
#include "image.h"
#include "macros.h"
#include "mipmap.h"
@@ -667,7 +667,7 @@ fxt1_quantize_ALPHA1 (GLuint *cc,
}
sumL += sum;
}
-
+
nn_comp--;
}
@@ -742,7 +742,7 @@ fxt1_quantize_ALPHA1 (GLuint *cc,
lolo <<= 2;
lolo |= texel;
}
-
+
cc[0] = lolo;
}
@@ -1117,7 +1117,7 @@ fxt1_quantize_MIXED0 (GLuint *cc,
}
lolo = ~lolo;
}
-
+
cc[0] = lolo;
}
diff --git a/src/mesa/main/texcompress_rgtc.c b/src/mesa/main/texcompress_rgtc.c
index e6f6075ecff..6839432966f 100644
--- a/src/mesa/main/texcompress_rgtc.c
+++ b/src/mesa/main/texcompress_rgtc.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Red Hat Inc.
- *
+ *
* block compression parts are:
* Copyright (C) 2004 Roland Scheidegger All Rights Reserved.
*
@@ -32,10 +32,11 @@
* GL_EXT_texture_compression_rgtc support.
*/
+#include <stdlib.h>
#include "config.h"
#include "glheader.h"
-#include "util/imports.h"
+
#include "image.h"
#include "macros.h"
#include "mipmap.h"
diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c
index faec72f365d..06546a2a590 100644
--- a/src/mesa/main/texcompress_s3tc.c
+++ b/src/mesa/main/texcompress_s3tc.c
@@ -30,7 +30,7 @@
*/
#include "glheader.h"
-#include "util/imports.h"
+
#include "image.h"
#include "macros.h"
#include "mtypes.h"
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index ea93ac2f3b2..7eddbc33f95 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -38,7 +38,7 @@
#include "framebuffer.h"
#include "hash.h"
#include "image.h"
-#include "util/imports.h"
+
#include "macros.h"
#include "mipmap.h"
#include "multisample.h"
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 684c34b2c06..8bd9cee4615 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -35,7 +35,7 @@
#include "fbobject.h"
#include "formats.h"
#include "hash.h"
-#include "util/imports.h"
+
#include "macros.h"
#include "shaderimage.h"
#include "teximage.h"
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index 5f2d78e07d4..932308c6471 100644
--- a/src/mesa/main/texstorage.c
+++ b/src/mesa/main/texstorage.c
@@ -30,7 +30,7 @@
#include "glheader.h"
#include "context.h"
#include "enums.h"
-#include "util/imports.h"
+
#include "macros.h"
#include "teximage.h"
#include "texobj.h"
@@ -744,7 +744,7 @@ _mesa_TextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels,
GLsizei width)
{
GET_CURRENT_CONTEXT(ctx);
- /* 'texture' must always be initialized, even if the call to
+ /* 'texture' must always be initialized, even if the call to
* glTextureStorage1DEXT will generate an error.
*/
if (!_mesa_lookup_or_create_texture(ctx, target, texture, false, true,
@@ -761,7 +761,7 @@ _mesa_TextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels,
GLsizei width, GLsizei height)
{
GET_CURRENT_CONTEXT(ctx);
- /* 'texture' must always be initialized, even if the call to
+ /* 'texture' must always be initialized, even if the call to
* glTextureStorage2DEXT will generate an error.
*/
if (!_mesa_lookup_or_create_texture(ctx, target, texture, false, true,
@@ -778,7 +778,7 @@ _mesa_TextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels,
GLsizei width, GLsizei height, GLsizei depth)
{
GET_CURRENT_CONTEXT(ctx);
- /* 'texture' must always be initialized, even if the call to
+ /* 'texture' must always be initialized, even if the call to
* glTextureStorage3DEXT will generate an error.
*/
if (!_mesa_lookup_or_create_texture(ctx, target, texture, false, true,
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 5c5331a6402..04325a9a143 100755
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -62,7 +62,7 @@
#include "mtypes.h"
#include "pack.h"
#include "pbo.h"
-#include "util/imports.h"
+
#include "texcompress.h"
#include "texcompress_fxt1.h"
#include "texcompress_rgtc.h"
diff --git a/src/mesa/main/texturebindless.c b/src/mesa/main/texturebindless.c
index 2e11b9f8c79..c1cef4b1e46 100644
--- a/src/mesa/main/texturebindless.c
+++ b/src/mesa/main/texturebindless.c
@@ -24,7 +24,7 @@
#include "glheader.h"
#include "context.h"
#include "enums.h"
-#include "util/imports.h"
+
#include "hash.h"
#include "mtypes.h"
#include "shaderimage.h"
diff --git a/src/mesa/main/textureview.c b/src/mesa/main/textureview.c
index da09c1e3c58..6aafeed2d17 100644
--- a/src/mesa/main/textureview.c
+++ b/src/mesa/main/textureview.c
@@ -34,7 +34,7 @@
#include "glheader.h"
#include "context.h"
#include "enums.h"
-#include "util/imports.h"
+
#include "macros.h"
#include "teximage.h"
#include "texobj.h"
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 0dd630c7a3a..559ff9d949f 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -28,7 +28,7 @@
#include <inttypes.h> /* for PRId64 macro */
#include "glheader.h"
-#include "util/imports.h"
+
#include "bufferobj.h"
#include "context.h"
#include "enable.h"
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 0cb0aabb896..7e51bb53439 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -25,7 +25,7 @@
#include <stdio.h>
#include "context.h"
-#include "util/imports.h"
+
#include "mtypes.h"
#include "version.h"
#include "git_sha1.h"
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index 666124e1ca6..c80b329137f 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -28,7 +28,7 @@
#include "glheader.h"
#include "api_arrayelt.h"
#include "context.h"
-#include "util/imports.h"
+
#include "mtypes.h"
#include "vtxfmt.h"
#include "eval.h"
diff --git a/src/mesa/math/m_debug_clip.c b/src/mesa/math/m_debug_clip.c
index adb731ca8c0..afbe09bb7a7 100644
--- a/src/mesa/math/m_debug_clip.c
+++ b/src/mesa/math/m_debug_clip.c
@@ -28,7 +28,7 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "m_matrix.h"
#include "m_xform.h"
diff --git a/src/mesa/meson.build b/src/mesa/meson.build
index ba594258363..1a0fedc2a74 100644
--- a/src/mesa/meson.build
+++ b/src/mesa/meson.build
@@ -179,6 +179,7 @@ files_libmesa_common = files(
'main/histogram.h',
'main/image.c',
'main/image.h',
+ 'main/mesa_private.h',
'main/light.c',
'main/light.h',
'main/lines.c',
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c
index 7216f9fdcce..42f84944a1e 100644
--- a/src/mesa/program/arbprogparse.c
+++ b/src/mesa/program/arbprogparse.c
@@ -52,7 +52,7 @@ having three separate program parameter arrays.
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/context.h"
#include "main/mtypes.h"
#include "arbprogparse.h"
@@ -183,7 +183,7 @@ _mesa_parse_arb_vertex_program(struct gl_context *ctx, GLenum target,
ralloc_free(program->String);
- /* Copy the relevant contents of the arb_program struct into the
+ /* Copy the relevant contents of the arb_program struct into the
* vertex_program struct.
*/
program->String = prog.String;
diff --git a/src/mesa/program/prog_cache.c b/src/mesa/program/prog_cache.c
index d1cfc27837b..aee61f90f47 100644
--- a/src/mesa/program/prog_cache.c
+++ b/src/mesa/program/prog_cache.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,13 +22,13 @@
* 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.
- *
+ *
**************************************************************************/
#include "main/glheader.h"
#include "main/mtypes.h"
-#include "util/imports.h"
+
#include "main/shaderobj.h"
#include "program/prog_cache.h"
#include "program/program.h"
@@ -112,7 +112,7 @@ clear_cache(struct gl_context *ctx, struct gl_program_cache *cache,
{
struct cache_item *c, *next;
GLuint i;
-
+
cache->last = NULL;
for (i = 0; i < cache->size; i++) {
@@ -220,7 +220,7 @@ _mesa_program_cache_insert(struct gl_context *ctx,
if (cache->n_items > cache->size * 1.5) {
if (cache->size < 1000)
rehash(cache);
- else
+ else
clear_cache(ctx, cache, GL_FALSE);
}
diff --git a/src/mesa/program/prog_instruction.c b/src/mesa/program/prog_instruction.c
index 7a2407048aa..3bbb23a41fc 100644
--- a/src/mesa/program/prog_instruction.c
+++ b/src/mesa/program/prog_instruction.c
@@ -25,8 +25,9 @@
#include <stdio.h>
+#include <assert.h>
+
#include "main/glheader.h"
-#include "util/imports.h"
#include "prog_instruction.h"
#include "prog_parameter.h"
diff --git a/src/mesa/program/prog_noise.c b/src/mesa/program/prog_noise.c
index 75a22d8b991..e42b5ba739f 100644
--- a/src/mesa/program/prog_noise.c
+++ b/src/mesa/program/prog_noise.c
@@ -49,7 +49,7 @@
*/
-#include "util/imports.h"
+
#include "prog_noise.h"
#define FASTFLOOR(x) ( ((x)>0) ? ((int)x) : (((int)x)-1) )
diff --git a/src/mesa/program/prog_parameter.c b/src/mesa/program/prog_parameter.c
index b674472b4fd..ed3b6d34dc9 100644
--- a/src/mesa/program/prog_parameter.c
+++ b/src/mesa/program/prog_parameter.c
@@ -28,7 +28,6 @@
* \author Brian Paul
*/
-
#include "main/glheader.h"
#include "main/macros.h"
#include "util/u_memory.h"
diff --git a/src/mesa/program/prog_parameter.h b/src/mesa/program/prog_parameter.h
index c91156f623c..1fb0c5b7d1f 100644
--- a/src/mesa/program/prog_parameter.h
+++ b/src/mesa/program/prog_parameter.h
@@ -31,6 +31,8 @@
#ifndef PROG_PARAMETER_H
#define PROG_PARAMETER_H
+#include <stdbool.h>
+#include <stdint.h>
#include "prog_statevars.h"
#include <string.h>
diff --git a/src/mesa/program/prog_parameter_layout.c b/src/mesa/program/prog_parameter_layout.c
index a254dc072af..4fca765e419 100644
--- a/src/mesa/program/prog_parameter_layout.c
+++ b/src/mesa/program/prog_parameter_layout.c
@@ -28,7 +28,7 @@
* \author Ian Romanick <[email protected]>
*/
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "prog_parameter.h"
#include "prog_parameter_layout.h"
@@ -82,7 +82,7 @@ copy_indirect_accessed_array(struct gl_program_parameter_list *src,
j = dst->NumParameters;
} else {
for (j = 0; j < dst->NumParameters; j++) {
- if (memcmp(dst->Parameters[j].StateIndexes, curr->StateIndexes,
+ if (memcmp(dst->Parameters[j].StateIndexes, curr->StateIndexes,
sizeof(curr->StateIndexes)) == 0) {
return -1;
}
@@ -200,7 +200,7 @@ _mesa_layout_parameters(struct asm_parser_state *state)
inst->Base.SrcReg[i].Index =
_mesa_add_unnamed_constant(layout, v, p->Size, & swizzle);
- inst->Base.SrcReg[i].Swizzle =
+ inst->Base.SrcReg[i].Swizzle =
_mesa_combine_swizzles(swizzle, inst->Base.SrcReg[i].Swizzle);
break;
}
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index 0b280828341..7e043302da2 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -33,11 +33,12 @@
#include "main/glheader.h"
#include "main/context.h"
-#include "util/imports.h"
+
#include "prog_instruction.h"
#include "prog_parameter.h"
#include "prog_print.h"
#include "prog_statevars.h"
+#include "util/bitscan.h"
@@ -535,7 +536,7 @@ fprint_dst_reg(FILE * f,
reg_string((gl_register_file) dstReg->File,
dstReg->Index, mode, dstReg->RelAddr, prog),
_mesa_writemask_string(dstReg->WriteMask));
-
+
#if 0
fprintf(f, "%s[%d]%s",
_mesa_register_file_name((gl_register_file) dstReg->File),
@@ -547,7 +548,7 @@ fprint_dst_reg(FILE * f,
static void
fprint_src_reg(FILE *f,
- const struct prog_src_register *srcReg,
+ const struct prog_src_register *srcReg,
gl_prog_print_mode mode,
const struct gl_program *prog)
{
@@ -901,7 +902,7 @@ _mesa_fprint_program_parameters(FILE *f,
const GLfloat *p = prog->LocalParams[i];
fprintf(f, "%2d: %f, %f, %f, %f\n", i, p[0], p[1], p[2], p[3]);
}
-#endif
+#endif
_mesa_print_parameter_list(prog->Parameters);
}
diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c
index 06da12074cb..225acd853a0 100644
--- a/src/mesa/program/prog_statevars.c
+++ b/src/mesa/program/prog_statevars.c
@@ -33,7 +33,7 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/blend.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/fbobject.h"
@@ -451,10 +451,10 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index16 state[],
return;
case STATE_NORMAL_SCALE:
- ASSIGN_4V(value,
- ctx->_ModelViewInvScale,
- ctx->_ModelViewInvScale,
- ctx->_ModelViewInvScale,
+ ASSIGN_4V(value,
+ ctx->_ModelViewInvScale,
+ ctx->_ModelViewInvScale,
+ ctx->_ModelViewInvScale,
1);
return;
@@ -613,7 +613,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index16 state[],
}
return;
- /* XXX: make sure new tokens added here are also handled in the
+ /* XXX: make sure new tokens added here are also handled in the
* _mesa_program_state_flags() switch, below.
*/
default:
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index c0c9ba66544..31ad0cb58c5 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -26,7 +26,7 @@
#include "compiler/nir/nir.h"
#include "compiler/nir/nir_builder.h"
#include "compiler/glsl/list.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "util/ralloc.h"
diff --git a/src/mesa/program/program_lexer.l b/src/mesa/program/program_lexer.l
index 2c2a66812c7..6c3099f88d7 100644
--- a/src/mesa/program/program_lexer.l
+++ b/src/mesa/program/program_lexer.l
@@ -27,7 +27,7 @@
#endif
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "program/prog_instruction.h"
#include "program/prog_statevars.h"
#include "program/symbol_table.h"
@@ -379,7 +379,7 @@ ARRAYSHADOW2D { return_token_or_IDENTIFIER(require_ARB_fp && require
const unsigned s = swiz_from_char(yytext[1]);
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
yylval->swiz_mask.mask = mask_from_char(yytext[1]);
- return MASK1;
+ return MASK1;
}
"."[xyzw]{4} {
diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y
index 53489410253..577537dd7ab 100644
--- a/src/mesa/program/program_parse.y
+++ b/src/mesa/program/program_parse.y
@@ -29,7 +29,7 @@
#include "main/errors.h"
#include "main/mtypes.h"
-#include "util/imports.h"
+
#include "program/program.h"
#include "program/prog_parameter.h"
#include "program/prog_parameter_layout.h"
@@ -188,7 +188,7 @@ static struct asm_instruction *asm_instruction_copy_ctor(
%token TEXCOORD TEXENV TEXGEN TEXGEN_Q TEXGEN_R TEXGEN_S TEXGEN_T TEXTURE TRANSPOSE
%token TEXTURE_UNIT TEX_1D TEX_2D TEX_3D TEX_CUBE TEX_RECT
%token TEX_SHADOW1D TEX_SHADOW2D TEX_SHADOWRECT
-%token TEX_ARRAY1D TEX_ARRAY2D TEX_ARRAYSHADOW1D TEX_ARRAYSHADOW2D
+%token TEX_ARRAY1D TEX_ARRAY2D TEX_ARRAYSHADOW1D TEX_ARRAYSHADOW2D
%token VERTEX VTXATTRIB
%token <string> IDENTIFIER USED_IDENTIFIER
@@ -250,7 +250,7 @@ static struct asm_instruction *asm_instruction_copy_ctor(
%type <integer> statePointProperty
%type <integer> stateOptMatModifier stateMatModifier stateMatrixRowNum
-%type <integer> stateOptModMatNum stateModMatNum statePaletteMatNum
+%type <integer> stateOptModMatNum stateModMatNum statePaletteMatNum
%type <integer> stateProgramMatNum
%type <integer> ambDiffSpecProperty
@@ -800,7 +800,7 @@ srcReg: USED_IDENTIFIER /* temporaryReg | progParamSingle */
}
| paramSingleItemUse
{
- gl_register_file file = ($1.name != NULL)
+ gl_register_file file = ($1.name != NULL)
? $1.param_binding_type
: PROGRAM_CONSTANT;
set_src_reg_swz(& $$, file, $1.param_binding_begin,
@@ -965,7 +965,7 @@ swizzleSuffix: MASK1
| { $$.swizzle = SWIZZLE_NOOP; $$.mask = WRITEMASK_XYZW; }
;
-optionalMask: MASK4 | MASK3 | MASK2 | MASK1
+optionalMask: MASK4 | MASK3 | MASK2 | MASK1
| { $$.swizzle = SWIZZLE_NOOP; $$.mask = WRITEMASK_XYZW; }
;
@@ -1092,7 +1092,7 @@ PARAM_multipleStmt: PARAM IDENTIFIER '[' optArraySize ']' paramMultipleInit
{
if (($4 != 0) && ((unsigned) $4 != $6.param_binding_length)) {
free($2);
- yyerror(& @4, state,
+ yyerror(& @4, state,
"parameter array size and number of bindings must match");
YYERROR;
} else {
@@ -1505,7 +1505,7 @@ stateMatrixItem: MATRIX stateMatrixName stateOptMatModifier
}
;
-stateOptMatModifier:
+stateOptMatModifier:
{
$$ = 0;
}
@@ -1515,11 +1515,11 @@ stateOptMatModifier:
}
;
-stateMatModifier: INVERSE
+stateMatModifier: INVERSE
{
$$ = STATE_MATRIX_INVERSE;
}
- | TRANSPOSE
+ | TRANSPOSE
{
$$ = STATE_MATRIX_TRANSPOSE;
}
@@ -1946,7 +1946,7 @@ optResultFaceType:
optResultColorType:
{
- $$ = 0;
+ $$ = 0;
}
| PRIMARY
{
@@ -2323,7 +2323,7 @@ int add_state_reference(struct gl_program_parameter_list *param_list,
int
initialize_symbol_from_state(struct gl_program *prog,
- struct asm_symbol *param_var,
+ struct asm_symbol *param_var,
const gl_state_index16 tokens[STATE_LENGTH])
{
int idx = -1;
@@ -2375,7 +2375,7 @@ initialize_symbol_from_state(struct gl_program *prog,
int
initialize_symbol_from_param(struct gl_program *prog,
- struct asm_symbol *param_var,
+ struct asm_symbol *param_var,
const gl_state_index16 tokens[STATE_LENGTH])
{
int idx = -1;
@@ -2440,7 +2440,7 @@ initialize_symbol_from_param(struct gl_program *prog,
*/
int
initialize_symbol_from_const(struct gl_program *prog,
- struct asm_symbol *param_var,
+ struct asm_symbol *param_var,
const struct asm_vector *vec,
GLboolean allowSwizzle)
{
@@ -2585,7 +2585,7 @@ _mesa_parse_arb_program(struct gl_context *ctx, GLenum target, const GLubyte *st
}
-
+
/* Add one instruction to store the "END" instruction.
*/
state->prog->arb.Instructions =
diff --git a/src/mesa/program/symbol_table.c b/src/mesa/program/symbol_table.c
index dcb32895828..f86588b76bd 100644
--- a/src/mesa/program/symbol_table.c
+++ b/src/mesa/program/symbol_table.c
@@ -21,10 +21,10 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include "util/imports.h"
+
#include "main/errors.h"
#include "symbol_table.h"
-#include "../../util/hash_table.h"
+#include "util/hash_table.h"
#include "util/u_string.h"
struct symbol {
@@ -63,7 +63,7 @@ struct symbol {
struct scope_level {
/** Link to next (inner) scope level. */
struct scope_level *next;
-
+
/** Linked list of symbols with the same scope. */
struct symbol *symbols;
};
diff --git a/src/mesa/state_tracker/st_atom_atomicbuf.c b/src/mesa/state_tracker/st_atom_atomicbuf.c
index 1dd868b5095..2121e85e609 100644
--- a/src/mesa/state_tracker/st_atom_atomicbuf.c
+++ b/src/mesa/state_tracker/st_atom_atomicbuf.c
@@ -24,7 +24,7 @@
*
**************************************************************************/
-#include "util/imports.h"
+
#include "program/prog_parameter.h"
#include "program/prog_print.h"
#include "compiler/glsl/ir_uniform.h"
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index c1682544f49..181fef1b749 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -31,7 +31,7 @@
* Brian Paul
*/
-#include "util/imports.h"
+
#include "program/prog_parameter.h"
#include "program/prog_print.h"
#include "main/shaderapi.h"
diff --git a/src/mesa/state_tracker/st_atom_image.c b/src/mesa/state_tracker/st_atom_image.c
index 598109d24f4..a7fd17535a5 100644
--- a/src/mesa/state_tracker/st_atom_image.c
+++ b/src/mesa/state_tracker/st_atom_image.c
@@ -24,7 +24,7 @@
*
**************************************************************************/
-#include "util/imports.h"
+
#include "main/shaderimage.h"
#include "program/prog_parameter.h"
#include "program/prog_print.h"
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index e09be71f59c..893dc59e58f 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
/**
@@ -35,7 +35,7 @@
* Brian Paul
*/
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "main/framebuffer.h"
#include "main/state.h"
@@ -236,7 +236,7 @@ st_update_vp( struct st_context *st )
st_reference_prog(st, &st->vp, stvp);
- cso_set_vertex_shader_handle(st->cso_context,
+ cso_set_vertex_shader_handle(st->cso_context,
st->vp_variant->base.driver_shader);
}
diff --git a/src/mesa/state_tracker/st_atom_storagebuf.c b/src/mesa/state_tracker/st_atom_storagebuf.c
index 2c5d4885841..60028365bc4 100644
--- a/src/mesa/state_tracker/st_atom_storagebuf.c
+++ b/src/mesa/state_tracker/st_atom_storagebuf.c
@@ -24,7 +24,7 @@
*
**************************************************************************/
-#include "util/imports.h"
+
#include "program/prog_parameter.h"
#include "program/prog_print.h"
#include "compiler/glsl/ir_uniform.h"
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 06cbb980013..5ba3c87b417 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
/*
@@ -31,7 +31,7 @@
*/
#include "main/errors.h"
-#include "util/imports.h"
+
#include "main/image.h"
#include "main/bufferobj.h"
#include "main/dlist.h"
diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
index 73068b795f6..d91cc9623ac 100644
--- a/src/mesa/state_tracker/st_cb_blit.c
+++ b/src/mesa/state_tracker/st_cb_blit.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
/*
@@ -30,7 +30,7 @@
* Brian Paul
*/
-#include "util/imports.h"
+
#include "main/image.h"
#include "main/macros.h"
@@ -245,7 +245,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
/* get src/dst depth surfaces */
struct st_renderbuffer *srcDepthRb =
st_renderbuffer(readFB->Attachment[BUFFER_DEPTH].Renderbuffer);
- struct st_renderbuffer *dstDepthRb =
+ struct st_renderbuffer *dstDepthRb =
st_renderbuffer(drawFB->Attachment[BUFFER_DEPTH].Renderbuffer);
struct pipe_surface *dstDepthSurf =
dstDepthRb ? dstDepthRb->surface : NULL;
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index ea0861d340c..c95a3d4d2ac 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -34,7 +34,7 @@
#include <inttypes.h> /* for PRId64 macro */
#include "main/errors.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "main/arrayobj.h"
#include "main/bufferobj.h"
diff --git a/src/mesa/state_tracker/st_cb_condrender.c b/src/mesa/state_tracker/st_cb_condrender.c
index b2897bacb28..4fd5ccb51f3 100644
--- a/src/mesa/state_tracker/st_cb_condrender.c
+++ b/src/mesa/state_tracker/st_cb_condrender.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
@@ -33,7 +33,7 @@
*/
-#include "util/imports.h"
+
#include "main/context.h"
#include "pipe/p_context.h"
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 3bcd784d5d0..3f84b22154d 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
/*
@@ -31,7 +31,7 @@
*/
#include "main/errors.h"
-#include "util/imports.h"
+
#include "main/image.h"
#include "main/bufferobj.h"
#include "main/blit.h"
@@ -977,7 +977,7 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
y = ctx->DrawBuffer->Height - y - height;
}
- if (format == GL_STENCIL_INDEX &&
+ if (format == GL_STENCIL_INDEX &&
_mesa_is_format_packed_depth_stencil(strb->Base.Format)) {
/* writing stencil to a combined depth+stencil buffer */
usage = PIPE_TRANSFER_READ_WRITE;
diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c
index 4be1195279b..4960a55e986 100644
--- a/src/mesa/state_tracker/st_cb_drawtex.c
+++ b/src/mesa/state_tracker/st_cb_drawtex.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 VMware, Inc.
* All Rights Reserved.
*
@@ -12,7 +12,7 @@
-#include "util/imports.h"
+
#include "main/image.h"
#include "main/macros.h"
#include "main/teximage.h"
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 81a099795bc..2455a351c49 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -33,7 +33,7 @@
*/
-#include "util/imports.h"
+
#include "main/context.h"
#include "main/fbobject.h"
#include "main/framebuffer.h"
diff --git a/src/mesa/state_tracker/st_cb_feedback.c b/src/mesa/state_tracker/st_cb_feedback.c
index f8a7629be0c..d04cf28b7bb 100644
--- a/src/mesa/state_tracker/st_cb_feedback.c
+++ b/src/mesa/state_tracker/st_cb_feedback.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
/**
@@ -37,7 +37,7 @@
* Brian Paul
*/
-#include "util/imports.h"
+
#include "main/context.h"
#include "main/feedback.h"
#include "main/varray.h"
diff --git a/src/mesa/state_tracker/st_cb_memoryobjects.c b/src/mesa/state_tracker/st_cb_memoryobjects.c
index 5176df68e78..d81c7692c1f 100644
--- a/src/mesa/state_tracker/st_cb_memoryobjects.c
+++ b/src/mesa/state_tracker/st_cb_memoryobjects.c
@@ -22,7 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "main/externalobjects.h"
diff --git a/src/mesa/state_tracker/st_cb_msaa.c b/src/mesa/state_tracker/st_cb_msaa.c
index 720a24e7254..ff4de881410 100644
--- a/src/mesa/state_tracker/st_cb_msaa.c
+++ b/src/mesa/state_tracker/st_cb_msaa.c
@@ -26,7 +26,7 @@
**************************************************************************/
#include "main/bufferobj.h"
-#include "util/imports.h"
+
#include "main/framebuffer.h"
#include "state_tracker/st_cb_msaa.h"
diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c
index cee49f4eb14..50a776df745 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.c
+++ b/src/mesa/state_tracker/st_cb_queryobj.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
@@ -33,7 +33,6 @@
*/
-#include "util/imports.h"
#include "util/compiler.h"
#include "main/context.h"
#include "main/queryobj.h"
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c
index 823fb200587..c3684176071 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
/**
@@ -36,7 +36,7 @@
*/
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/arrayobj.h"
#include "main/feedback.h"
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 96526508cfc..f5498523775 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,13 +22,13 @@
* 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.
- *
+ *
**************************************************************************/
#include "main/bufferobj.h"
#include "main/image.h"
#include "main/pbo.h"
-#include "util/imports.h"
+
#include "main/readpix.h"
#include "main/enums.h"
#include "main/framebuffer.h"
diff --git a/src/mesa/state_tracker/st_cb_semaphoreobjects.c b/src/mesa/state_tracker/st_cb_semaphoreobjects.c
index d32de094fc1..7a32d9b138f 100644
--- a/src/mesa/state_tracker/st_cb_semaphoreobjects.c
+++ b/src/mesa/state_tracker/st_cb_semaphoreobjects.c
@@ -21,7 +21,7 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "main/context.h"
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index c688680a268..1cb85b8b406 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -34,7 +34,7 @@
#include "main/format_utils.h"
#include "main/glformats.h"
#include "main/image.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/mipmap.h"
#include "main/pack.h"
diff --git a/src/mesa/state_tracker/st_cb_texturebarrier.c b/src/mesa/state_tracker/st_cb_texturebarrier.c
index 45db0a3a576..a790a7f649d 100644
--- a/src/mesa/state_tracker/st_cb_texturebarrier.c
+++ b/src/mesa/state_tracker/st_cb_texturebarrier.c
@@ -33,7 +33,7 @@
*/
-#include "util/imports.h"
+
#include "main/context.h"
#include "pipe/p_context.h"
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index b4be7078aec..0a6e9951a1d 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -25,7 +25,7 @@
*
**************************************************************************/
-#include "util/imports.h"
+
#include "main/accum.h"
#include "main/api_exec.h"
#include "main/context.h"
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 10374746734..cbc8b139dbb 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -37,7 +37,7 @@
#include "main/errors.h"
-#include "util/imports.h"
+
#include "main/image.h"
#include "main/bufferobj.h"
#include "main/macros.h"
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index a4a38556199..32eebd74154 100644
--- a/src/mesa/state_tracker/st_draw_feedback.c
+++ b/src/mesa/state_tracker/st_draw_feedback.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,10 +22,10 @@
* 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.
- *
+ *
**************************************************************************/
-#include "util/imports.h"
+
#include "main/arrayobj.h"
#include "main/image.h"
#include "main/macros.h"
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 96a329741be..42d8a5b9f51 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, Inc.
* Copyright (c) 2008 VMware, 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
@@ -11,11 +11,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -23,12 +23,12 @@
* 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.
- *
+ *
**************************************************************************/
#include "compiler/nir/nir.h"
-#include "util/imports.h"
+
#include "main/context.h"
#include "main/macros.h"
#include "main/spirv_extensions.h"
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 99e91ca96de..22da741472a 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, Inc.
* Copyright (c) 2008-2010 VMware, 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
@@ -11,11 +11,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* 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.
- *
+ *
**************************************************************************/
@@ -32,7 +32,7 @@
* \author Brian Paul
*/
-#include "util/imports.h"
+
#include "main/context.h"
#include "main/enums.h"
#include "main/formats.h"
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index 1983bbc76c2..90b0b2d9745 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,12 +22,12 @@
* 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.
- *
+ *
**************************************************************************/
#include "main/errors.h"
-#include "util/imports.h"
+
#include "main/mipmap.h"
#include "main/teximage.h"
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 199825b55d5..3fa5ff7b74c 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 VMware, 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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:
@@ -32,7 +32,7 @@
#include "main/errors.h"
-#include "util/imports.h"
+
#include "main/hash.h"
#include "main/mtypes.h"
#include "program/prog_parameter.h"
diff --git a/src/mesa/swrast/s_clear.c b/src/mesa/swrast/s_clear.c
index 158e5dace16..e409be3c05f 100644
--- a/src/mesa/swrast/s_clear.c
+++ b/src/mesa/swrast/s_clear.c
@@ -27,7 +27,7 @@
#include "main/condrender.h"
#include "main/format_pack.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "s_context.h"
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index 0f58376382f..b06e81533a6 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -26,7 +26,7 @@
*/
#include "main/errors.h"
-#include "util/imports.h"
+
#include "main/bufferobj.h"
#include "main/mtypes.h"
#include "main/samplerobj.h"
@@ -582,7 +582,7 @@ _swrast_validate_derived( struct gl_context *ctx )
_NEW_TEXTURE))
_swrast_update_active_attribs(ctx);
- if (swrast->NewState & (_NEW_FOG |
+ if (swrast->NewState & (_NEW_FOG |
_NEW_PROGRAM |
_NEW_LIGHT |
_NEW_TEXTURE))
@@ -893,7 +893,7 @@ _swrast_render_start( struct gl_context *ctx )
swrast->Driver.SpanRenderStart( ctx );
swrast->PointSpan.end = 0;
}
-
+
void
_swrast_render_finish( struct gl_context *ctx )
{
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index acfa472066f..fc378a657f7 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -29,7 +29,7 @@
#include "main/macros.h"
#include "main/blit.h"
#include "main/pixeltransfer.h"
-#include "util/imports.h"
+
#include "s_context.h"
#include "s_depth.h"
@@ -618,7 +618,7 @@ _swrast_CopyPixels(struct gl_context *ctx,
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
struct gl_renderbuffer *rb;
-
+
if (!_mesa_check_conditional_render(ctx))
return; /* don't copy */
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index fcf534428a1..7af764f671b 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -29,7 +29,7 @@
#include "main/format_unpack.h"
#include "main/format_pack.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "s_context.h"
#include "s_depth.h"
@@ -182,7 +182,7 @@ _swrast_depth_clamp_span( struct gl_context *ctx, SWspan *span )
/* Convert floating point values in [0,1] to device Z coordinates in
* [0, DepthMax].
* ex: If the Z buffer has 24 bits, DepthMax = 0xffffff.
- *
+ *
* XXX this all falls apart if we have 31 or more bits of Z because
* the triangle rasterization code produces unsigned Z values. Negative
* vertex Z values come out as large fragment Z uints.
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 253d70cbbf2..31c6a6a971a 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -32,7 +32,7 @@
#include "main/format_utils.h"
#include "main/glformats.h"
#include "main/image.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/pack.h"
#include "main/pbo.h"
@@ -623,7 +623,7 @@ draw_depth_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
return;
}
}
-
+
depthRb = ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Renderbuffer;
stencilRb = ctx->ReadBuffer->Attachment[BUFFER_STENCIL].Renderbuffer;
assert(depthRb);
diff --git a/src/mesa/swrast/s_logic.c b/src/mesa/swrast/s_logic.c
index 6571acbba69..304e3d5312c 100644
--- a/src/mesa/swrast/s_logic.c
+++ b/src/mesa/swrast/s_logic.c
@@ -25,7 +25,7 @@
#include "main/glheader.h"
#include "main/context.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "s_context.h"
diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c
index df92b3c7575..27e2fce3cb0 100644
--- a/src/mesa/swrast/s_renderbuffer.c
+++ b/src/mesa/swrast/s_renderbuffer.c
@@ -31,7 +31,7 @@
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/context.h"
#include "main/fbobject.h"
#include "main/formats.h"
@@ -585,7 +585,7 @@ map_attachment(struct gl_context *ctx,
assert(srb->Map);
}
-
+
static void
unmap_attachment(struct gl_context *ctx,
@@ -667,8 +667,8 @@ _swrast_map_renderbuffers(struct gl_context *ctx)
}
}
}
-
-
+
+
/**
* Unmap renderbuffers after rendering.
*/
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index cd97d0416e5..2eb22539a0f 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -37,7 +37,7 @@
#include "main/format_pack.h"
#include "main/format_unpack.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "main/image.h"
#include "main/samplerobj.h"
#include "main/state.h"
@@ -74,7 +74,7 @@ _swrast_span_default_attribs(struct gl_context *ctx, SWspan *span)
if (ctx->DrawBuffer->Visual.depthBits <= 16)
span->z = FloatToFixed(ctx->Current.RasterPos[2] * depthMax + 0.5F);
else {
- GLfloat tmpf = ctx->Current.RasterPos[2] * depthMax;
+ GLfloat tmpf = ctx->Current.RasterPos[2] * depthMax;
tmpf = MIN2(tmpf, depthMax);
span->z = (GLint)tmpf;
}
@@ -390,7 +390,7 @@ _swrast_span_interpolate_z( const struct gl_context *ctx, SWspan *span )
if (ctx->DrawBuffer->Visual.depthBits <= 16) {
GLfixed zval = span->z;
- GLuint *z = span->array->z;
+ GLuint *z = span->array->z;
for (i = 0; i < n; i++) {
z[i] = FixedToInt(zval);
zval += span->zStep;
@@ -1314,7 +1314,7 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
{
const GLuint numBuffers = fb->_NumColorDrawBuffers;
const struct gl_program *fp = ctx->FragmentProgram._Current;
- const GLboolean multiFragOutputs =
+ const GLboolean multiFragOutputs =
_swrast_use_fragment_program(ctx)
&& fp->info.outputs_written >= (1 << FRAG_RESULT_DATA0);
/* Save srcColorType because convert_color_type() can change it */
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index 2c59d2e7b3c..5c1118bba69 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -25,7 +25,7 @@
#include "main/glheader.h"
#include "main/context.h"
-#include "util/imports.h"
+
#include "main/format_pack.h"
#include "main/format_unpack.h"
#include "main/stencil.h"
@@ -434,9 +434,9 @@ _swrast_stencil_and_ztest_span(struct gl_context *ctx, SWspan *span)
put_s8_values(ctx, rb, count, span->array->x, span->array->y,
stencilBuf);
}
-
+
span->writeAll = GL_FALSE;
-
+
return GL_TRUE; /* one or more fragments passed both tests */
}
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 36574f93610..1ee906effd9 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -26,7 +26,7 @@
#include "main/glheader.h"
#include "main/context.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/pixeltransfer.h"
#include "main/samplerobj.h"
@@ -72,7 +72,7 @@ get_texel_array(SWcontext *swrast, GLuint unit)
* \param unit the texture combiner unit
* \param primary_rgba incoming fragment color array
* \param texelBuffer pointer to texel colors for all texture units
- *
+ *
* \param span two fields are used in this function:
* span->end: number of fragments to process
* span->array->rgba: incoming/result fragment colors
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 5da7f888140..7f1354785a4 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -26,7 +26,7 @@
#include "c99_math.h"
#include "main/glheader.h"
#include "main/context.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/samplerobj.h"
#include "main/teximage.h"
@@ -1406,7 +1406,7 @@ sample_linear_2d(struct gl_context *ctx,
* Optimized 2-D texture sampling:
* S and T wrap mode == GL_REPEAT
* GL_NEAREST min/mag filter
- * No border,
+ * No border,
* RowStride == Width,
* Format = GL_RGB
*/
@@ -1666,7 +1666,7 @@ sample_2d_ewa(struct gl_context *ctx,
GLfloat uy = dudy * scaling;
GLfloat vy = dvdy * scaling;
- /* compute ellipse coefficients to bound the region:
+ /* compute ellipse coefficients to bound the region:
* A*x*x + B*x*y + C*y*y = F.
*/
GLfloat A = vx*vx+vy*vy+1;
@@ -1847,7 +1847,7 @@ texture_unit_index(const struct gl_context *ctx,
}
if (u >= maxUnit)
u = 0; /* not found, use 1st one; should never happen */
-
+
return u;
}
@@ -1871,7 +1871,7 @@ sample_lambda_2d_aniso(struct gl_context *ctx,
const struct swrast_texture_image *swImg = swrast_texture_image_const(tImg);
const GLfloat maxEccentricity =
samp->MaxAnisotropy * samp->MaxAnisotropy;
-
+
/* re-calculate the lambda values so that they are usable with anisotropic
* filtering
*/
@@ -1880,7 +1880,7 @@ sample_lambda_2d_aniso(struct gl_context *ctx,
/* based on interpolate_texcoords(struct gl_context *ctx, SWspan *span)
* in swrast/s_span.c
*/
-
+
/* find the texture unit index by looking up the current texture object
* from the context list of available texture objects.
*/
@@ -1905,7 +1905,7 @@ sample_lambda_2d_aniso(struct gl_context *ctx,
|| (samp->MinLod != -1000.0F || samp->MaxLod != 1000.0F);
GLuint i;
-
+
/* on first access create the lookup table containing the filter weights. */
if (!weightLut) {
create_filter_table();
@@ -1916,13 +1916,13 @@ sample_lambda_2d_aniso(struct gl_context *ctx,
for (i = 0; i < n; i++) {
const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q);
-
+
GLfloat dudx = texW * ((s + dsdx) / (q + dqdx) - s * invQ);
GLfloat dvdx = texH * ((t + dtdx) / (q + dqdx) - t * invQ);
GLfloat dudy = texW * ((s + dsdy) / (q + dqdy) - s * invQ);
GLfloat dvdy = texH * ((t + dtdy) / (q + dqdy) - t * invQ);
-
- /* note: instead of working with Px and Py, we will use the
+
+ /* note: instead of working with Px and Py, we will use the
* squared length instead, to avoid sqrt.
*/
GLfloat Px2 = dudx * dudx + dvdx * dvdx;
@@ -1936,7 +1936,7 @@ sample_lambda_2d_aniso(struct gl_context *ctx,
s += dsdx;
t += dtdx;
q += dqdx;
-
+
if (Px2 < Py2) {
Pmax2 = Py2;
Pmin2 = Px2;
@@ -1945,7 +1945,7 @@ sample_lambda_2d_aniso(struct gl_context *ctx,
Pmax2 = Px2;
Pmin2 = Py2;
}
-
+
/* if the eccentricity of the ellipse is too big, scale up the shorter
* of the two vectors to limit the maximum amount of work per pixel
*/
@@ -1957,12 +1957,12 @@ sample_lambda_2d_aniso(struct gl_context *ctx,
Pmin2 *= s; */
Pmin2 = Pmax2 / maxEccentricity;
}
-
+
/* note: we need to have Pmin=sqrt(Pmin2) here, but we can avoid
* this since 0.5*log(x) = log(sqrt(x))
*/
lod = 0.5f * util_fast_log2(Pmin2);
-
+
if (adjustLOD) {
/* from swrast/s_texcombine.c _swrast_texture_span */
if (texUnit->LodBias + samp->LodBias != 0.0F) {
@@ -1980,7 +1980,7 @@ sample_lambda_2d_aniso(struct gl_context *ctx,
}
}
}
-
+
/* If the ellipse covers the whole image, we can
* simply return the average of the whole image.
*/
@@ -2406,7 +2406,7 @@ choose_cube_face(const struct gl_texture_object *texObj,
}
}
- {
+ {
const float ima = 1.0F / ma;
newCoord[0] = ( sc * ima + 1.0F ) * 0.5F;
newCoord[1] = ( tc * ima + 1.0F ) * 0.5F;
@@ -2917,7 +2917,7 @@ sample_2d_array_linear(struct gl_context *ctx,
else {
swImg->FetchTexel(swImg, i1, j1, array, t11);
}
-
+
/* trilinear interpolation of samples */
lerp_rgba_2d(rgba, a, b, t00, t10, t01, t11);
}
@@ -3099,7 +3099,7 @@ sample_lambda_2d_array(struct gl_context *ctx,
case GL_LINEAR_MIPMAP_LINEAR:
sample_2d_array_linear_mipmap_linear(ctx, samp, tObj, m,
texcoords + minStart,
- lambda + minStart,
+ lambda + minStart,
rgba + minStart);
break;
default:
@@ -3373,7 +3373,7 @@ sample_lambda_1d_array(struct gl_context *ctx,
lambda + minStart, rgba + minStart);
break;
case GL_LINEAR_MIPMAP_NEAREST:
- sample_1d_array_linear_mipmap_nearest(ctx, samp, tObj, m,
+ sample_1d_array_linear_mipmap_nearest(ctx, samp, tObj, m,
texcoords + minStart,
lambda + minStart,
rgba + minStart);
@@ -3383,9 +3383,9 @@ sample_lambda_1d_array(struct gl_context *ctx,
lambda + minStart, rgba + minStart);
break;
case GL_LINEAR_MIPMAP_LINEAR:
- sample_1d_array_linear_mipmap_linear(ctx, samp, tObj, m,
+ sample_1d_array_linear_mipmap_linear(ctx, samp, tObj, m,
texcoords + minStart,
- lambda + minStart,
+ lambda + minStart,
rgba + minStart);
break;
default:
@@ -3579,7 +3579,7 @@ sample_depth_texture( struct gl_context *ctx,
nearest_texcoord(samp, tObj, level, texcoords[i], &col, &row, &slice);
- if (col >= 0 && row >= 0 && col < width && row < height &&
+ if (col >= 0 && row >= 0 && col < width && row < height &&
slice >= 0 && slice < depth) {
swImg->FetchTexel(swImg, col, row, slice, &depthSample);
}
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c
index 7228d2e0e0d..24fddd7718d 100644
--- a/src/mesa/swrast/s_texture.c
+++ b/src/mesa/swrast/s_texture.c
@@ -32,6 +32,7 @@
#include "main/teximage.h"
#include "main/texobj.h"
#include "util/u_memory.h"
+#include "util/u_math.h"
#include "swrast/swrast.h"
#include "swrast/s_context.h"
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 467439c3fc0..289fa12228b 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -31,7 +31,7 @@
#include "main/glheader.h"
#include "main/context.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/state.h"
@@ -782,7 +782,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
}
break;
}
-
+
assert(span->arrayMask & SPAN_RGBA);
_swrast_write_rgba_span(ctx, span);
diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c
index 973e8cfedce..ca4ead9e754 100644
--- a/src/mesa/swrast/s_zoom.c
+++ b/src/mesa/swrast/s_zoom.c
@@ -25,7 +25,7 @@
#include "main/errors.h"
#include "main/glheader.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "main/format_pack.h"
#include "s_context.h"
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 0cddb0f1467..a435972b054 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -26,7 +26,7 @@
*/
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/state.h"
#include "tnl/tnl.h"
@@ -60,7 +60,7 @@ _swsetup_CreateContext( struct gl_context *ctx )
swsetup->NewState = ~0;
_swsetup_trifuncs_init( ctx );
- _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12,
+ _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12,
sizeof(SWvertex) );
@@ -263,7 +263,7 @@ _swsetup_Wakeup( struct gl_context *ctx )
/**
* Populate a swrast SWvertex from an attrib-style vertex.
*/
-void
+void
_swsetup_Translate( struct gl_context *ctx, const void *vertex, SWvertex *dest )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index af87c1f86cf..1b787180e36 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -27,7 +27,7 @@
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/context.h"
#include "main/macros.h"
#include "main/mtypes.h"
@@ -171,7 +171,7 @@ _tnl_InvalidateState( struct gl_context *ctx, GLuint new_state )
tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_FOG);
}
- if (ctx->Polygon.FrontMode != GL_FILL ||
+ if (ctx->Polygon.FrontMode != GL_FILL ||
ctx->Polygon.BackMode != GL_FILL)
tnl->render_inputs_bitset |= BITFIELD64_BIT(_TNL_ATTRIB_EDGEFLAG);
@@ -210,7 +210,7 @@ _tnl_wakeup( struct gl_context *ctx )
#if 0
if (ctx->Light.ColorMaterialEnabled) {
- _mesa_update_color_material( ctx,
+ _mesa_update_color_material( ctx,
ctx->Current.Attrib[VERT_ATTRIB_COLOR0] );
}
#endif
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h
index 21a5156708d..a5bcdb80dbb 100644
--- a/src/mesa/tnl/t_context.h
+++ b/src/mesa/tnl/t_context.h
@@ -50,7 +50,7 @@
#define _T_CONTEXT_H
#include "main/glheader.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "math/m_vector.h"
@@ -205,7 +205,7 @@ struct vertex_buffer
* such as backface color or eye-space coordinates, they are stored
* here.
*/
- GLuint *Elts;
+ GLuint *Elts;
GLvector4f *EyePtr; /* _TNL_BIT_POS */
GLvector4f *ClipPtr; /* _TNL_BIT_POS */
GLvector4f *NdcPtr; /* _TNL_BIT_POS */
@@ -218,8 +218,8 @@ struct vertex_buffer
GLvector4f *BackfaceColorPtr;
GLvector4f *BackfaceSecondaryColorPtr;
- const struct _mesa_prim *Primitive;
- GLuint PrimitiveCount;
+ const struct _mesa_prim *Primitive;
+ GLuint PrimitiveCount;
/* Inputs to the vertex program stage */
GLvector4f *AttribPtr[_TNL_ATTRIB_MAX];
@@ -264,10 +264,10 @@ struct tnl_pipeline_stage
/** Contains the array of all pipeline stages.
- * The default values are defined at the end of t_pipeline.c
+ * The default values are defined at the end of t_pipeline.c
*/
struct tnl_pipeline {
-
+
GLuint last_attrib_stride[_TNL_ATTRIB_MAX];
GLuint last_attrib_size[_TNL_ATTRIB_MAX];
GLuint input_changes;
@@ -280,16 +280,16 @@ struct tnl_pipeline {
struct tnl_clipspace;
struct tnl_clipspace_attr;
-typedef void (*tnl_extract_func)( const struct tnl_clipspace_attr *a,
- GLfloat *out,
+typedef void (*tnl_extract_func)( const struct tnl_clipspace_attr *a,
+ GLfloat *out,
const GLubyte *v );
-typedef void (*tnl_insert_func)( const struct tnl_clipspace_attr *a,
- GLubyte *v,
+typedef void (*tnl_insert_func)( const struct tnl_clipspace_attr *a,
+ GLubyte *v,
const GLfloat *in );
-typedef void (*tnl_emit_func)( struct gl_context *ctx,
- GLuint count,
+typedef void (*tnl_emit_func)( struct gl_context *ctx,
+ GLuint count,
GLubyte *dest );
@@ -357,7 +357,7 @@ struct tnl_clipspace_fastpath {
struct tnl_clipspace
{
GLboolean need_extras;
-
+
GLuint new_inputs;
GLubyte *vertex_buf;
@@ -374,13 +374,13 @@ struct tnl_clipspace
/* Parameters and constants for codegen:
*/
GLboolean need_viewport;
- GLfloat vp_scale[4];
+ GLfloat vp_scale[4];
GLfloat vp_xlate[4];
GLfloat chan_scale[4];
GLfloat identity[4];
struct tnl_clipspace_fastpath *fastpath;
-
+
void (*codegen_emit)( struct gl_context *ctx );
};
@@ -408,7 +408,7 @@ struct tnl_device_driver
void (*RunPipeline)(struct gl_context *ctx);
/* Replaces PipelineStart/PipelineFinish -- intended to allow
* drivers to wrap _tnl_run_pipeline() with code to validate state
- * and grab/release hardware locks.
+ * and grab/release hardware locks.
*/
void (*NotifyMaterialChange)(struct gl_context *ctx);
@@ -483,7 +483,7 @@ struct tnl_device_driver
*
* This function is called only from _tnl_render_stage in tnl/t_render.c.
*/
-
+
GLboolean (*Multipass)( struct gl_context *ctx, GLuint passno );
/* Driver may request additional render passes by returning GL_TRUE
@@ -563,7 +563,7 @@ typedef struct
GLvector4f tmp_inputs[VERT_ATTRIB_MAX];
- /* Temp storage for t_draw.c:
+ /* Temp storage for t_draw.c:
*/
GLubyte *block[VERT_ATTRIB_MAX];
GLuint nr_blocks;
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index ea9d4c76df9..e8b45af081c 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -32,7 +32,7 @@
#include "main/bufferobj.h"
#include "main/condrender.h"
#include "main/context.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/enums.h"
diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c
index b0b46aa2678..760e69dba9d 100644
--- a/src/mesa/tnl/t_pipeline.c
+++ b/src/mesa/tnl/t_pipeline.c
@@ -27,7 +27,7 @@
#include "main/glheader.h"
#include "main/context.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "t_context.h"
@@ -75,7 +75,7 @@ static GLuint check_input_changes( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint i;
-
+
for (i = 0; i <= _TNL_LAST_MAT; i++) {
if (tnl->vb.AttribPtr[i]->size != tnl->pipeline.last_attrib_size[i] ||
tnl->vb.AttribPtr[i]->stride != tnl->pipeline.last_attrib_stride[i]) {
@@ -93,7 +93,7 @@ static GLuint check_output_changes( struct gl_context *ctx )
{
#if 0
TNLcontext *tnl = TNL_CONTEXT(ctx);
-
+
for (i = 0; i < VARYING_SLOT_MAX; i++) {
if (tnl->vb.ResultPtr[i]->size != tnl->last_result_size[i] ||
tnl->vb.ResultPtr[i]->stride != tnl->last_result_stride[i]) {
@@ -103,9 +103,9 @@ static GLuint check_output_changes( struct gl_context *ctx )
}
}
- if (tnl->pipeline.output_changes)
+ if (tnl->pipeline.output_changes)
tnl->Driver.NotifyOutputChanges( ctx, tnl->pipeline.output_changes );
-
+
return tnl->pipeline.output_changes;
#else
return ~0;
@@ -212,10 +212,10 @@ void _tnl_run_pipeline( struct gl_context *ctx )
if (s->validate)
s->validate( ctx, s );
}
-
+
tnl->pipeline.new_state = 0;
tnl->pipeline.input_changes = 0;
-
+
/* Pipeline can only change its output in response to either a
* statechange or an input size/stride change. No other changes
* are allowed.
@@ -287,10 +287,10 @@ const struct tnl_pipeline_stage *_tnl_default_pipeline[] = {
&_tnl_texgen_stage,
&_tnl_texture_transform_stage,
&_tnl_point_attenuation_stage,
- &_tnl_vertex_program_stage,
+ &_tnl_vertex_program_stage,
&_tnl_fog_coordinate_stage,
&_tnl_render_stage,
- NULL
+ NULL
};
const struct tnl_pipeline_stage *_tnl_vp_pipeline[] = {
diff --git a/src/mesa/tnl/t_split_copy.c b/src/mesa/tnl/t_split_copy.c
index f1d8274766a..cee50fc9605 100644
--- a/src/mesa/tnl/t_split_copy.c
+++ b/src/mesa/tnl/t_split_copy.c
@@ -33,7 +33,7 @@
#include "main/glheader.h"
#include "main/bufferobj.h"
-#include "util/imports.h"
+
#include "main/glformats.h"
#include "main/macros.h"
#include "main/mtypes.h"
diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c
index f6ccd49d6bb..6c95006f551 100644
--- a/src/mesa/tnl/t_vb_fog.c
+++ b/src/mesa/tnl/t_vb_fog.c
@@ -30,7 +30,7 @@
#include "main/errors.h"
#include "main/glheader.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "math/m_xform.h"
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index 655e5827d0c..15c8b0ebccf 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -27,7 +27,7 @@
#include "main/glheader.h"
#include "main/light.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "util/simple_list.h"
#include "main/mtypes.h"
@@ -175,7 +175,7 @@ _tnl_validate_shine_tables( struct gl_context *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLfloat shininess;
-
+
shininess = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SHININESS][0];
if (!tnl->_ShineTable[0] || tnl->_ShineTable[0]->shininess != shininess)
validate_shine_table( ctx, 0, shininess );
@@ -205,7 +205,7 @@ update_materials(struct gl_context *ctx, struct light_stage_data *store)
/* increment src vertex color pointer */
STRIDE_F(store->mat[i].ptr, store->mat[i].stride);
}
-
+
/* recompute derived light/material values */
_mesa_update_material( ctx, store->mat_bitmask );
/* XXX we should only call this if we're tracking/changing the specular
@@ -224,7 +224,7 @@ prepare_materials(struct gl_context *ctx,
struct vertex_buffer *VB, struct light_stage_data *store)
{
GLuint i;
-
+
store->mat_count = 0;
store->mat_bitmask = 0;
@@ -325,7 +325,7 @@ static void init_lighting_tables( void )
}
-static GLboolean run_lighting( struct gl_context *ctx,
+static GLboolean run_lighting( struct gl_context *ctx,
struct tnl_pipeline_stage *stage )
{
struct light_stage_data *store = LIGHT_STAGE_DATA(stage);
@@ -354,7 +354,7 @@ static GLboolean run_lighting( struct gl_context *ctx,
*/
_mesa_vector4f_clean_elem(&store->Input, VB->Count, 2);
}
-
+
if (input->size <= 1) {
/* Clean y.
*/
@@ -363,7 +363,7 @@ static GLboolean run_lighting( struct gl_context *ctx,
input = &store->Input;
}
-
+
idx = 0;
if (prepare_materials( ctx, VB, store ))
@@ -373,7 +373,7 @@ static GLboolean run_lighting( struct gl_context *ctx,
idx |= LIGHT_TWOSIDE;
/* The individual functions know about replaying side-effects
- * vs. full re-execution.
+ * vs. full re-execution.
*/
store->light_func_tab[idx]( ctx, VB, stage, input );
diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c
index a4fd8e94065..ca753317d67 100644
--- a/src/mesa/tnl/t_vb_normals.c
+++ b/src/mesa/tnl/t_vb_normals.c
@@ -28,7 +28,7 @@
#include "main/glheader.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "math/m_xform.h"
diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c
index 17da53949d8..4e7801b2d10 100644
--- a/src/mesa/tnl/t_vb_points.c
+++ b/src/mesa/tnl/t_vb_points.c
@@ -29,7 +29,7 @@
#include "main/glheader.h"
#include "main/mtypes.h"
#include "main/dd.h"
-#include "util/imports.h"
+
#include "t_context.h"
#include "t_pipeline.h"
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c
index d58f050e94d..02f521c7fb3 100644
--- a/src/mesa/tnl/t_vb_render.c
+++ b/src/mesa/tnl/t_vb_render.c
@@ -43,7 +43,7 @@
#include "main/context.h"
#include "main/enums.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "math/m_xform.h"
#include "util/bitscan.h"
@@ -297,8 +297,8 @@ static GLboolean run_render( struct gl_context *ctx,
clip_render_tab_elts[GL_TRIANGLES] = clip_elt_triangles;
}
else {
- tab = (VB->Elts ?
- tnl->Driver.Render.PrimTabElts :
+ tab = (VB->Elts ?
+ tnl->Driver.Render.PrimTabElts :
tnl->Driver.Render.PrimTabVerts);
}
@@ -314,9 +314,9 @@ static GLboolean run_render( struct gl_context *ctx,
assert((prim & PRIM_MODE_MASK) <= GL_POLYGON);
- if (MESA_VERBOSE & VERBOSE_PRIMS)
- _mesa_debug(NULL, "MESA prim %s %d..%d\n",
- _mesa_enum_to_string(prim & PRIM_MODE_MASK),
+ if (MESA_VERBOSE & VERBOSE_PRIMS)
+ _mesa_debug(NULL, "MESA prim %s %d..%d\n",
+ _mesa_enum_to_string(prim & PRIM_MODE_MASK),
start, start+length);
if (length)
diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c
index de0a9995e73..aa8d10b4de4 100644
--- a/src/mesa/tnl/t_vb_texgen.c
+++ b/src/mesa/tnl/t_vb_texgen.c
@@ -37,7 +37,7 @@
#include "main/errors.h"
#include "main/glheader.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "math/m_xform.h"
@@ -263,7 +263,7 @@ static void texgen_reflection_map_nv( struct gl_context *ctx,
out->flags |= (in->flags & VEC_SIZE_FLAGS) | VEC_SIZE_3;
out->count = VB->Count;
out->size = MAX2(in->size, 3);
- if (in->size == 4)
+ if (in->size == 4)
_mesa_copy_tab[0x8]( out, in );
}
@@ -292,7 +292,7 @@ static void texgen_normal_map_nv( struct gl_context *ctx,
out->flags |= (in->flags & VEC_SIZE_FLAGS) | VEC_SIZE_3;
out->count = count;
out->size = MAX2(in->size, 3);
- if (in->size == 4)
+ if (in->size == 4)
_mesa_copy_tab[0x8]( out, in );
}
@@ -487,7 +487,7 @@ static GLboolean run_texgen_stage( struct gl_context *ctx,
struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage);
GLuint i;
- if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Current)
+ if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Current)
return GL_TRUE;
for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) {
@@ -511,7 +511,7 @@ static void validate_texgen_stage( struct gl_context *ctx,
struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage);
GLuint i;
- if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Current)
+ if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Current)
return;
for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) {
diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c
index 49875ead3e8..cf8099509dc 100644
--- a/src/mesa/tnl/t_vb_texmat.c
+++ b/src/mesa/tnl/t_vb_texmat.c
@@ -28,7 +28,7 @@
#include "main/glheader.h"
#include "main/macros.h"
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "math/m_xform.h"
@@ -59,7 +59,7 @@ static GLboolean run_texmat_stage( struct gl_context *ctx,
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLuint i;
- if (!ctx->Texture._TexMatEnabled || ctx->VertexProgram._Current)
+ if (!ctx->Texture._TexMatEnabled || ctx->VertexProgram._Current)
return GL_TRUE;
/* ENABLE_TEXMAT implies that the texture matrix is not the
diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h
index 24f0aa3384a..040dfc19046 100644
--- a/src/mesa/vbo/vbo_exec.h
+++ b/src/mesa/vbo/vbo_exec.h
@@ -35,7 +35,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define VBO_EXEC_H
#include "main/dd.h"
-#include "util/imports.h"
+#include "main/mesa_private.h"
#include "vbo.h"
#include "vbo_attrib.h"
diff --git a/src/mesa/vbo/vbo_primitive_restart.c b/src/mesa/vbo/vbo_primitive_restart.c
index 8dd059f165a..ff5df0c2e79 100644
--- a/src/mesa/vbo/vbo_primitive_restart.c
+++ b/src/mesa/vbo/vbo_primitive_restart.c
@@ -29,7 +29,7 @@
*/
#include "main/errors.h"
-#include "util/imports.h"
+
#include "main/macros.h"
#include "main/varray.h"
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index 115e9626ade..5d0c6c54ed3 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -31,7 +31,7 @@
#include "main/glheader.h"
#include "main/bufferobj.h"
#include "main/context.h"
-#include "util/imports.h"
+#include "main/mesa_private.h"
#include "main/macros.h"
#include "main/light.h"
#include "main/state.h"
diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c
index 83885922495..9cedc6c067c 100644
--- a/src/mesa/vbo/vbo_save_loopback.c
+++ b/src/mesa/vbo/vbo_save_loopback.c
@@ -29,7 +29,7 @@
#include "main/context.h"
#include "main/glheader.h"
#include "main/enums.h"
-#include "util/imports.h"
+#include "main/mesa_private.h"
#include "main/dispatch.h"
#include "glapi/glapi.h"
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index bdc1417f5ee..a237fc0c997 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -54,8 +54,10 @@
#endif
#endif
+#include <stdlib.h>
+
#include "main/errors.h"
-#include "util/imports.h"
+
#include "common_x86_asm.h"
@@ -158,10 +160,10 @@ void _mesa_check_os_sse_support( void )
}
#elif defined(_WIN32)
LPTOP_LEVEL_EXCEPTION_FILTER oldFilter;
-
+
/* Install our ExceptionFilter */
oldFilter = SetUnhandledExceptionFilter( ExceptionFilter );
-
+
if ( cpu_has_xmm ) {
_mesa_debug(NULL, "Testing OS support for SSE...\n");
diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c
index 14107bae6c6..0d3242f1ae5 100644
--- a/src/mesa/x86/rtasm/x86sse.c
+++ b/src/mesa/x86/rtasm/x86sse.c
@@ -2,8 +2,9 @@
#if defined(__i386__) || defined(__386__)
#include <stdio.h>
+#include <string.h>
+#include <assert.h>
-#include "util/imports.h"
#include "main/execmem.h"
#include "x86sse.h"
@@ -89,18 +90,18 @@ static void emit_3ub( struct x86_function *p, unsigned char b0, unsigned char b1
/* Build a modRM byte + possible displacement. No treatment of SIB
* indexing. BZZT - no way to encode an absolute address.
*/
-static void emit_modrm( struct x86_function *p,
- struct x86_reg reg,
+static void emit_modrm( struct x86_function *p,
+ struct x86_reg reg,
struct x86_reg regmem )
{
unsigned char val = 0;
-
+
assert(reg.mod == mod_REG);
-
+
val |= regmem.mod << 6; /* mod field */
val |= reg.idx << 3; /* reg field */
val |= regmem.idx; /* r/m field */
-
+
emit_1ub(p, val);
/* Oh-oh we've stumbled into the SIB thing.
@@ -141,11 +142,11 @@ static void emit_modrm_noreg( struct x86_function *p,
* the arguments presented.
*/
static void emit_op_modrm( struct x86_function *p,
- unsigned char op_dst_is_reg,
+ unsigned char op_dst_is_reg,
unsigned char op_dst_is_mem,
struct x86_reg dst,
struct x86_reg src )
-{
+{
switch (dst.mod) {
case mod_REG:
emit_1ub(p, op_dst_is_reg);
@@ -232,7 +233,7 @@ void x86_jcc( struct x86_function *p,
unsigned char *label )
{
int offset = label - (x86_get_label(p) + 2);
-
+
if (offset <= 127 && offset >= -128) {
emit_1ub(p, 0x70 + cc);
emit_1b(p, (char) offset);
@@ -616,7 +617,7 @@ void sse_cvtps2pi( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
- assert(dst.file == file_MMX &&
+ assert(dst.file == file_MMX &&
(src.file == file_XMM || src.mod != mod_REG));
p->need_emms = 1;
@@ -632,21 +633,21 @@ void sse_cvtps2pi( struct x86_function *p,
void sse_shufps( struct x86_function *p,
struct x86_reg dest,
struct x86_reg arg0,
- unsigned char shuf)
+ unsigned char shuf)
{
emit_2ub(p, X86_TWOB, 0xC6);
emit_modrm(p, dest, arg0);
- emit_1ub(p, shuf);
+ emit_1ub(p, shuf);
}
void sse_cmpps( struct x86_function *p,
struct x86_reg dest,
struct x86_reg arg0,
- unsigned char cc)
+ unsigned char cc)
{
emit_2ub(p, X86_TWOB, 0xC2);
emit_modrm(p, dest, arg0);
- emit_1ub(p, cc);
+ emit_1ub(p, cc);
}
void sse_pmovmskb( struct x86_function *p,
@@ -667,11 +668,11 @@ void sse_pmovmskb( struct x86_function *p,
void sse2_pshufd( struct x86_function *p,
struct x86_reg dest,
struct x86_reg arg0,
- unsigned char shuf)
+ unsigned char shuf)
{
emit_3ub(p, 0x66, X86_TWOB, 0x70);
emit_modrm(p, dest, arg0);
- emit_1ub(p, shuf);
+ emit_1ub(p, shuf);
}
void sse2_cvttps2dq( struct x86_function *p,
@@ -818,9 +819,9 @@ static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86
assert(dst.file == file_x87);
if (arg.file == file_x87) {
- if (dst.idx == 0)
+ if (dst.idx == 0)
emit_2ub(p, dst0ub0, dst0ub1+arg.idx);
- else if (arg.idx == 0)
+ else if (arg.idx == 0)
emit_2ub(p, arg0ub0, arg0ub1+arg.idx);
else
assert(0);
@@ -836,7 +837,7 @@ static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86
void x87_fmul( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
{
- x87_arith_op(p, dst, arg,
+ x87_arith_op(p, dst, arg,
0xd8, 0xc8,
0xdc, 0xc8,
4);
@@ -844,7 +845,7 @@ void x87_fmul( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
void x87_fsub( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
{
- x87_arith_op(p, dst, arg,
+ x87_arith_op(p, dst, arg,
0xd8, 0xe0,
0xdc, 0xe8,
4);
@@ -852,7 +853,7 @@ void x87_fsub( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
void x87_fsubr( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
{
- x87_arith_op(p, dst, arg,
+ x87_arith_op(p, dst, arg,
0xd8, 0xe8,
0xdc, 0xe0,
5);
@@ -860,7 +861,7 @@ void x87_fsubr( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
void x87_fadd( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
{
- x87_arith_op(p, dst, arg,
+ x87_arith_op(p, dst, arg,
0xd8, 0xc0,
0xdc, 0xc0,
0);
@@ -868,7 +869,7 @@ void x87_fadd( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
void x87_fdiv( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
{
- x87_arith_op(p, dst, arg,
+ x87_arith_op(p, dst, arg,
0xd8, 0xf0,
0xdc, 0xf8,
6);
@@ -876,7 +877,7 @@ void x87_fdiv( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
void x87_fdivr( struct x86_function *p, struct x86_reg dst, struct x86_reg arg )
{
- x87_arith_op(p, dst, arg,
+ x87_arith_op(p, dst, arg,
0xd8, 0xf8,
0xdc, 0xf0,
7);
@@ -1013,7 +1014,7 @@ void x87_fyl2x( struct x86_function *p )
/* st1 = st1 * log2(st0 + 1.0);
* pop_stack;
*
- * A fast operation, with restrictions: -.29 < st0 < .29
+ * A fast operation, with restrictions: -.29 < st0 < .29
*/
void x87_fyl2xp1( struct x86_function *p )
{
@@ -1023,7 +1024,7 @@ void x87_fyl2xp1( struct x86_function *p )
void x87_fld( struct x86_function *p, struct x86_reg arg )
{
- if (arg.file == file_x87)
+ if (arg.file == file_x87)
emit_2ub(p, 0xd9, 0xc0 + arg.idx);
else {
emit_1ub(p, 0xd9);
@@ -1033,7 +1034,7 @@ void x87_fld( struct x86_function *p, struct x86_reg arg )
void x87_fst( struct x86_function *p, struct x86_reg dst )
{
- if (dst.file == file_x87)
+ if (dst.file == file_x87)
emit_2ub(p, 0xdd, 0xd0 + dst.idx);
else {
emit_1ub(p, 0xd9);
@@ -1043,7 +1044,7 @@ void x87_fst( struct x86_function *p, struct x86_reg dst )
void x87_fstp( struct x86_function *p, struct x86_reg dst )
{
- if (dst.file == file_x87)
+ if (dst.file == file_x87)
emit_2ub(p, 0xdd, 0xd8 + dst.idx);
else {
emit_1ub(p, 0xd9);
@@ -1053,7 +1054,7 @@ void x87_fstp( struct x86_function *p, struct x86_reg dst )
void x87_fcom( struct x86_function *p, struct x86_reg dst )
{
- if (dst.file == file_x87)
+ if (dst.file == file_x87)
emit_2ub(p, 0xd8, 0xd0 + dst.idx);
else {
emit_1ub(p, 0xd8);
@@ -1063,7 +1064,7 @@ void x87_fcom( struct x86_function *p, struct x86_reg dst )
void x87_fcomp( struct x86_function *p, struct x86_reg dst )
{
- if (dst.file == file_x87)
+ if (dst.file == file_x87)
emit_2ub(p, 0xd8, 0xd8 + dst.idx);
else {
emit_1ub(p, 0xd8);
@@ -1077,7 +1078,7 @@ void x87_fnstsw( struct x86_function *p, struct x86_reg dst )
assert(dst.file == file_REG32);
if (dst.idx == reg_AX &&
- dst.mod == mod_REG)
+ dst.mod == mod_REG)
emit_2ub(p, 0xdf, 0xe0);
else {
emit_1ub(p, 0xdd);
@@ -1103,7 +1104,7 @@ void mmx_packssdw( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
- assert(dst.file == file_MMX &&
+ assert(dst.file == file_MMX &&
(src.file == file_MMX || src.mod != mod_REG));
p->need_emms = 1;
@@ -1116,7 +1117,7 @@ void mmx_packuswb( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
- assert(dst.file == file_MMX &&
+ assert(dst.file == file_MMX &&
(src.file == file_MMX || src.mod != mod_REG));
p->need_emms = 1;
@@ -1155,7 +1156,7 @@ void mmx_movq( struct x86_function *p,
struct x86_reg x86_fn_arg( struct x86_function *p,
unsigned arg )
{
- return x86_make_disp(x86_make_reg(file_REG32, reg_SP),
+ return x86_make_disp(x86_make_reg(file_REG32, reg_SP),
p->stack_offset + arg * 4); /* ??? */
}
diff --git a/src/meson.build b/src/meson.build
index cf0c34c9560..bdc6a54cc3f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -30,7 +30,8 @@ libglsl_util = static_library(
'glsl_util',
files(
'mesa/main/extensions_table.c',
- 'mesa/program/prog_parameter.c', 'mesa/program/symbol_table.c',
+ 'mesa/program/prog_parameter.c',
+ 'mesa/program/symbol_table.c',
'mesa/program/dummy_errors.c',
),
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 339035f40d2..5af053f7cd3 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -27,7 +27,6 @@
#include "main/mtypes.h"
#include "compiler/glsl/glsl_to_nir.h"
#include "compiler/nir_types.h"
-#include "util/imports.h"
#include "compiler/nir/nir_builder.h"
#include "disassemble.h"
@@ -206,7 +205,7 @@ bi_emit_st_vary(bi_context *ctx, nir_intrinsic_instr *instr)
{ 0 },
{ 0 }, { 1 }, { 2}
},
- .store_channels = nr,
+ .store_channels = nr,
};
for (unsigned i = 0; i < nr; ++i)
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index 1dc021a2fb0..905344bc6ac 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -33,7 +33,6 @@
#include "main/mtypes.h"
#include "compiler/glsl/glsl_to_nir.h"
#include "compiler/nir_types.h"
-#include "util/imports.h"
#include "compiler/nir/nir_builder.h"
#include "util/half_float.h"
#include "util/u_math.h"
@@ -1136,7 +1135,7 @@ emit_global(
{
/* TODO: types */
- midgard_instruction ins;
+ midgard_instruction ins;
if (is_read)
ins = m_ld_int4(srcdest, 0);
@@ -1640,7 +1639,7 @@ emit_intrinsic(compiler_context *ctx, nir_intrinsic_instr *instr)
case nir_intrinsic_get_buffer_size:
emit_sysval_read(ctx, &instr->instr, 1, 8);
break;
-
+
case nir_intrinsic_load_viewport_scale:
case nir_intrinsic_load_viewport_offset:
case nir_intrinsic_load_num_work_groups:
diff --git a/src/util/Makefile.sources b/src/util/Makefile.sources
index 0e8fbb7ee85..95e2f788c1e 100644
--- a/src/util/Makefile.sources
+++ b/src/util/Makefile.sources
@@ -51,8 +51,6 @@ MESA_UTIL_FILES := \
half_float.h \
hash_table.c \
hash_table.h \
- imports.c \
- imports.h \
list.h \
macros.h \
mesa-sha1.c \
diff --git a/src/util/imports.c b/src/util/imports.c
deleted file mode 100644
index 776e86efb7a..00000000000
--- a/src/util/imports.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * \file imports.c
- * Standard C library function wrappers.
- *
- * Imports are services which the device driver or window system or
- * operating system provides to the core renderer. The core renderer (Mesa)
- * will call these functions in order to do memory allocation, simple I/O,
- * etc.
- *
- * Some drivers will want to override/replace this file with something
- * specialized, but that'll be rare.
- *
- * Eventually, I want to move roll the glheader.h file into this.
- *
- * \todo Functions still needed:
- * - scanf
- * - qsort
- * - rand and RAND_MAX
- */
-
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 1999-2007 Brian Paul 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.
- */
-
-#include <stdio.h>
-#include <stdarg.h>
-#include "c99_math.h"
-#include "imports.h"
-
-#ifdef _GNU_SOURCE
-#include <locale.h>
-#ifdef __APPLE__
-#include <xlocale.h>
-#endif
-#endif
-
-
-#ifdef _WIN32
-#define vsnprintf _vsnprintf
-#elif defined(__IBMC__) || defined(__IBMCPP__)
-extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg);
-#endif
diff --git a/src/util/meson.build b/src/util/meson.build
index ff25a9ea851..68ae31f421b 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -55,8 +55,6 @@ files_mesa_util = files(
'half_float.h',
'hash_table.c',
'hash_table.h',
- 'imports.c',
- 'imports.h',
'list.h',
'macros.h',
'mesa-sha1.c',
diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c
index af43c2fbb43..faae56752cd 100644
--- a/src/util/register_allocate.c
+++ b/src/util/register_allocate.c
@@ -71,10 +71,10 @@
*/
#include <stdbool.h>
-#include <limits.h>
+#include <stdlib.h>
#include "ralloc.h"
-#include "util/imports.h"
+#include "main/macros.h"
#include "util/bitset.h"
#include "u_math.h"
#include "register_allocate.h"