Commit 8e369613 authored by Dylan Baker's avatar Dylan Baker

remove final imports.h and imports.c bits

This moves the fi_types to a new mesa_private.h and removes the
imports.c file. The vast majority of this patch is just removing
pound includes of imports.h and fixing up the recursive includes.
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen's avatarKristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
Part-of: <!3024>
parent 289f02d1
Pipeline #135492 canceled with stages
in 46 minutes and 56 seconds
......@@ -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;
}
......
......@@ -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"
......
......@@ -26,7 +26,6 @@
*/
#include "nir.h"
#include <util/imports.h>
/**
* SSA-based copy propagation
......
......@@ -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 */
......
......@@ -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);
*/
......
......@@ -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
......
......@@ -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. */
......
......@@ -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 {')
......
......@@ -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"
......
......@@ -103,6 +103,7 @@ class PrintRemapTable(gl_XML.gl_print_base):
#include "main/glheader.h"
""")
print('#include "main/glheader.h"')
return
......
......@@ -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
......
......@@ -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 \
......
......@@ -24,7 +24,6 @@
#include "main/glheader.h"
#include "util/imports.h"
#include "main/accum.h"
#include "main/arrayobj.h"
#include "main/context.h"
......
......@@ -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().
*/
......
......@@ -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"
......
/**************************************************************************
*
*
* 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"
......
/**************************************************************************
*
*
* 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"
......
/**************************************************************************
*
*
* 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] = {
......
/**************************************************************************
*
*
* 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);
......
/**************************************************************************
*
*
* 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();
......
/**************************************************************************
*
*
* 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"
......
/**************************************************************************
*
*
* 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