Merge branch 'mesa_7_7_branch'
authorBrian Paul <brianp@vmware.com>
Mon, 25 Jan 2010 21:46:17 +0000 (14:46 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 25 Jan 2010 21:46:17 +0000 (14:46 -0700)
Conflicts:

src/mesa/drivers/dri/intel/intel_screen.c
src/mesa/drivers/dri/intel/intel_swapbuffers.c
src/mesa/drivers/dri/r300/r300_emit.c
src/mesa/drivers/dri/r300/r300_ioctl.c
src/mesa/drivers/dri/r300/r300_tex.c
src/mesa/drivers/dri/r300/r300_texstate.c

97 files changed:
SConstruct
progs/demos/Makefile
progs/demos/shadowtex.c
scons/gallium.py
src/gallium/auxiliary/util/u_tile.c
src/gallium/state_trackers/vega/shader.c
src/gallium/state_trackers/xorg/xorg_dri2.c
src/gallium/state_trackers/xorg/xorg_driver.c
src/gallium/state_trackers/xorg/xorg_tracker.h
src/gallium/state_trackers/xorg/xorg_winsys.h
src/gallium/winsys/drm/vmware/xorg/vmw_video.c
src/gallium/winsys/drm/vmware/xorg/vmw_xorg.c
src/mesa/drivers/dri/i915/i830_context.c
src/mesa/drivers/dri/i915/i915_context.c
src/mesa/drivers/dri/i915/i915_debug_fp.c
src/mesa/drivers/dri/i915/i915_vtbl.c
src/mesa/drivers/dri/i915/intel_tris.c
src/mesa/drivers/dri/i965/brw_cc.c
src/mesa/drivers/dri/i965/brw_clip_line.c
src/mesa/drivers/dri/i965/brw_clip_point.c
src/mesa/drivers/dri/i965/brw_clip_state.c
src/mesa/drivers/dri/i965/brw_clip_tri.c
src/mesa/drivers/dri/i965/brw_clip_unfilled.c
src/mesa/drivers/dri/i965/brw_clip_util.c
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/i965/brw_fallback.c
src/mesa/drivers/dri/i965/brw_gs_emit.c
src/mesa/drivers/dri/i965/brw_gs_state.c
src/mesa/drivers/dri/i965/brw_program.c
src/mesa/drivers/dri/i965/brw_sf_state.c
src/mesa/drivers/dri/i965/brw_vs_surface_state.c
src/mesa/drivers/dri/i965/brw_vtbl.c
src/mesa/drivers/dri/i965/brw_wm.c
src/mesa/drivers/dri/intel/intel_blit.c
src/mesa/drivers/dri/intel/intel_buffers.c
src/mesa/drivers/dri/intel/intel_clear.c
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_pixel.c
src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
src/mesa/drivers/dri/intel/intel_pixel_draw.c
src/mesa/drivers/dri/intel/intel_pixel_read.c
src/mesa/drivers/dri/intel/intel_regions.c
src/mesa/drivers/dri/intel/intel_screen.c
src/mesa/drivers/dri/intel/intel_state.c
src/mesa/drivers/dri/intel/intel_tex_copy.c
src/mesa/drivers/dri/intel/intel_tex_image.c
src/mesa/drivers/dri/intel/intel_tex_validate.c
src/mesa/drivers/dri/mga/mga_xmesa.c
src/mesa/drivers/dri/mga/mgadd.c
src/mesa/drivers/dri/mga/mgaioctl.c
src/mesa/drivers/dri/mga/mgarender.c
src/mesa/drivers/dri/mga/mgatex.c
src/mesa/drivers/dri/mga/mgatris.c
src/mesa/drivers/dri/mga/mgavb.c
src/mesa/drivers/dri/r200/r200_vertprog.c
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/r300/r300_draw.c
src/mesa/drivers/dri/r300/r300_emit.c
src/mesa/drivers/dri/r300/r300_fragprog_common.c
src/mesa/drivers/dri/r300/r300_render.c
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/r300_tex.c
src/mesa/drivers/dri/r300/r300_texstate.c
src/mesa/drivers/dri/r300/r300_vertprog.c
src/mesa/drivers/dri/radeon/radeon_cs_legacy.c
src/mesa/drivers/dri/savage/savagedd.c
src/mesa/drivers/dri/savage/savageioctl.c
src/mesa/drivers/dri/savage/savagerender.c
src/mesa/drivers/dri/savage/savagespan.c
src/mesa/drivers/dri/savage/savagetex.c
src/mesa/drivers/dri/savage/savagetris.c
src/mesa/drivers/dri/sis/sis6326_state.c
src/mesa/drivers/dri/sis/sis_context.c
src/mesa/drivers/dri/sis/sis_dd.c
src/mesa/drivers/dri/sis/sis_fog.c
src/mesa/drivers/dri/sis/sis_screen.c
src/mesa/drivers/dri/sis/sis_state.c
src/mesa/drivers/dri/sis/sis_tex.c
src/mesa/drivers/dri/sis/sis_texstate.c
src/mesa/drivers/dri/sis/sis_tris.c
src/mesa/drivers/dri/tdfx/tdfx_dd.c
src/mesa/drivers/dri/tdfx/tdfx_lock.c
src/mesa/drivers/dri/tdfx/tdfx_pixels.c
src/mesa/drivers/dri/tdfx/tdfx_screen.c
src/mesa/drivers/dri/tdfx/tdfx_state.c
src/mesa/drivers/dri/tdfx/tdfx_texman.c
src/mesa/drivers/dri/tdfx/tdfx_texstate.c
src/mesa/drivers/dri/tdfx/tdfx_vb.c
src/mesa/glapi/gl_x86_asm.py
src/mesa/main/scissor.c
src/mesa/state_tracker/st_atom_scissor.c
src/mesa/x86/assyntax.h
src/mesa/x86/glapi_x86.S
src/mesa/x86/read_rgba_span_x86.S

index 5f6933eadff31ae193ab55899978c46c6984b859..ff06b9b5921c20d0901dd0ab77fd715f57da84c2 100644 (file)
@@ -113,6 +113,8 @@ if platform in ('posix', 'linux', 'freebsd', 'darwin'):
                'PTHREADS',
                'HAVE_POSIX_MEMALIGN',
        ])
+       if platform == 'darwin':
+               env.Append(CPPDEFINES = ['_DARWIN_C_SOURCE'])
        env.Append(CPPPATH = ['/usr/X11R6/include'])
        env.Append(LIBPATH = ['/usr/X11R6/lib'])
        env.Append(LIBS = [
index 65fdbaaad8e5d20863b924a8e8223cc37f95a10d..f21d916330b500c6f563472db1fc711454553805 100644 (file)
@@ -124,13 +124,6 @@ reflect.o: reflect.c showbuffer.h
        $(APP_CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
 
 
-shadowtex: shadowtex.o showbuffer.o
-       $(APP_CC) $(CFLAGS) $(LDFLAGS) shadowtex.o showbuffer.o $(LIBS) -o $@
-
-shadowtex.o: shadowtex.c showbuffer.h
-       $(APP_CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
-
-
 gloss: gloss.o trackball.o readtex.o
        $(APP_CC) $(CFLAGS) $(LDFLAGS) gloss.o trackball.o readtex.o $(LIBS) -o $@
 
index 036f73d40b6650b563cbe94b47ccb05fb2393989..677a42104f8d8746440bb28a0332950b3784846c 100644 (file)
@@ -38,7 +38,6 @@
 #include <math.h>
 #include <GL/glew.h>
 #include <GL/glut.h>
-#include "showbuffer.h"
 
 #define DEG_TO_RAD (3.14159 / 180.0)
 
index 69a356908fb07a926600210ed47f5a642537269d..24f88e104bda24677b5c20e09fa655d2ab708c11 100644 (file)
@@ -377,7 +377,10 @@ def generate(env):
             '-Wl,-Bsymbolic',
         ]
         # Handle circular dependencies in the libraries
-        env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group'
+        if env['platform'] in ('darwin'):
+            pass
+        else:
+            env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group'
     if msvc:
         if not env['debug']:
             # enable Link-time Code Generation
index f9936eb1cb2bbfefda7df6fb9aab6607b24bd2a5..c25e1e52e9dc56a3b97f83434b98c888b163a2a3 100644 (file)
@@ -390,7 +390,7 @@ a4r4g4b4_put_tile_rgba(ushort *dst,
          g >>= 4;
          b >>= 4;
          a >>= 4;
-         *dst++ = (a << 12) | (r << 16) | (g << 4) | b;
+         *dst++ = (a << 12) | (r << 8) | (g << 4) | b;
       }
       p += src_stride;
    }
index bd5ae79e551544443b34653f3e59ae9dcf3b2d5f..8e59d53dc7a816ba1fee5570007aad227dccf424 100644 (file)
@@ -135,8 +135,8 @@ static VGint blend_bind_samplers(struct vg_context *ctx,
       textures[2] = stfb->blend_texture;
 
       if (!samplers[0] || !textures[0]) {
-         samplers[1] = samplers[2];
-         textures[1] = textures[2];
+         samplers[0] = samplers[2];
+         textures[0] = textures[2];
       }
       if (!samplers[1] || !textures[1]) {
          samplers[1] = samplers[0];
index e6a89c764510ef029a0a6f6c5ac4da229f74d017..11b81c9ce26e4ece3471dcf2a479e96ac6dcd007 100644 (file)
@@ -376,6 +376,7 @@ xorg_dri2_init(ScreenPtr pScreen)
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
     modesettingPtr ms = modesettingPTR(pScrn);
     DRI2InfoRec dri2info;
+#if DRI2INFOREC_VERSION >= 2
     int major, minor;
 
     if (xf86LoaderCheckSymbol("DRI2Version")) {
@@ -385,6 +386,7 @@ xorg_dri2_init(ScreenPtr pScreen)
        major = 1;
        minor = 0;
     }
+#endif
 
     dri2info.version = DRI2INFOREC_VERSION;
     dri2info.fd = ms->fd;
index 41bfcd0f5e74a2a538cd0936b765db34077f0205..e4ad789e9bccb2dbc26391b70ec638acb44fd1a3 100644 (file)
@@ -78,11 +78,13 @@ typedef enum
 {
     OPTION_SW_CURSOR,
     OPTION_2D_ACCEL,
+    OPTION_DEBUG_FALLBACK,
 } drv_option_enums;
 
 static const OptionInfoRec drv_options[] = {
     {OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE},
     {OPTION_2D_ACCEL, "2DAccel", OPTV_BOOLEAN, {0}, FALSE},
+    {OPTION_DEBUG_FALLBACK, "DebugFallback", OPTV_BOOLEAN, {0}, FALSE},
     {-1, NULL, OPTV_NONE, {0}, FALSE}
 };
 
@@ -110,6 +112,28 @@ xorg_tracker_set_functions(ScrnInfoPtr scrn)
     scrn->ValidMode = drv_valid_mode;
 }
 
+Bool
+xorg_tracker_have_modesetting(ScrnInfoPtr pScrn, struct pci_device *device)
+{
+    char *BusID = xalloc(64);
+    sprintf(BusID, "pci:%04x:%02x:%02x.%d",
+           device->domain, device->bus,
+           device->dev, device->func);
+
+    if (drmCheckModesettingSupported(BusID)) {
+       xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
+                      "Drm modesetting not supported %s\n", BusID);
+       xfree(BusID);
+       return FALSE;
+    }
+
+    xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
+                  "Drm modesetting supported on %s\n", BusID);
+
+    xfree(BusID);
+    return TRUE;
+}
+
 
 /*
  * Internal function definitions
@@ -648,10 +672,11 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
     xf86SetBlackWhitePixels(pScreen);
 
+    ms->accelerate_2d = xf86ReturnOptValBool(ms->Options, OPTION_2D_ACCEL, FALSE);
+    ms->debug_fallback = xf86ReturnOptValBool(ms->Options, OPTION_DEBUG_FALLBACK, TRUE);
+
     if (ms->screen) {
-       ms->exa = xorg_exa_init(pScrn, xf86ReturnOptValBool(ms->Options,
-                                                           OPTION_2D_ACCEL, TRUE));
-       ms->debug_fallback = debug_get_bool_option("XORG_DEBUG_FALLBACK", TRUE);
+       ms->exa = xorg_exa_init(pScrn, ms->accelerate_2d);
 
        xorg_xv_init(pScreen);
 #ifdef DRI2
@@ -659,6 +684,17 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 #endif
     }
 
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "2D Acceleration is %s\n",
+              ms->screen && ms->accelerate_2d ? "enabled" : "disabled");
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Fallback debugging is %s\n",
+              ms->debug_fallback ? "enabled" : "disabled");
+#ifdef DRI2
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "3D Acceleration is %s\n",
+              ms->screen ? "enabled" : "disabled");
+#else
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "3D Acceleration is disabled\n");
+#endif
+
     miInitializeBackingStore(pScreen);
     xf86SetBackingStore(pScreen);
     xf86SetSilkenMouse(pScreen);
@@ -1030,12 +1066,22 @@ drv_bind_front_buffer_kms(ScrnInfoPtr pScrn)
        goto err_destroy;
 
     pScreen->ModifyPixmapHeader(rootPixmap,
-                               pScreen->width,
-                               pScreen->height,
+                               pScrn->virtualX,
+                               pScrn->virtualY,
                                pScreen->rootDepth,
                                pScrn->bitsPerPixel,
                                stride,
                                ptr);
+
+    /* This a hack to work around EnableDisableFBAccess setting the pointer
+     * the real fix would be to replace pScrn->EnableDisableFBAccess hook
+     * and set the rootPixmap->devPrivate.ptr to something valid before that.
+     *
+     * But in its infinit visdome something uses either this some times before
+     * that, so our hook doesn't get called before the crash happens.
+     */
+    pScrn->pixmapPrivate.ptr = ptr;
+
     return TRUE;
 
 err_destroy:
index 4d5d4780dc412eef6652b3a67bf41ad474b72fa4..a88b1d520dce3e586736fde2a4de24da8e7b95cd 100644 (file)
@@ -112,6 +112,7 @@ typedef struct _modesettingRec
     /* exa */
     struct exa_context *exa;
     Bool noEvict;
+    Bool accelerate_2d;
     Bool debug_fallback;
 
     /* winsys hocks */
index 47ee4b9ffd8a9b7f5d550ad902fe399c5e7dbc02..865733bca2bd6a6d9b27c7de212a781c6443a757 100644 (file)
@@ -45,5 +45,6 @@
 
 void xorg_tracker_set_functions(ScrnInfoPtr scrn);
 const OptionInfoRec * xorg_tracker_available_options(int chipid, int busid);
+Bool xorg_tracker_have_modesetting(ScrnInfoPtr pScrn, struct pci_device *device);
 
 #endif
index b065b96346a9c8aa00a5bd2562a9ba58e59df378..ff3b992d078ff0430eac6b07f174f49b452ff464 100644 (file)
@@ -649,7 +649,8 @@ vmw_video_port_play(ScrnInfoPtr pScrn, struct vmw_video_port *port,
        return XvBadAlloc;
     }
 
-    port->currBuf = ++port->currBuf & (VMWARE_VID_NUM_BUFFERS - 1);
+    if (++(port->currBuf) >= VMWARE_VID_NUM_BUFFERS)
+       port->currBuf = 0;
 
     return Success;
 }
index 4b208719ca36ef3cf0010659fd8fea10c97ac327..cd273d091fed33c20e0c7d20f6cb1f156520aaef 100644 (file)
 #include "vmw_hook.h"
 
 static void vmw_xorg_identify(int flags);
-static Bool vmw_xorg_pci_probe(DriverPtr driver,
-                              int entity_num,
-                              struct pci_device *device,
-                              intptr_t match_data);
+_X_EXPORT Bool vmw_xorg_pci_probe(DriverPtr driver,
+                                 int entity_num,
+                                 struct pci_device *device,
+                                 intptr_t match_data);
 
 static const struct pci_id_match vmw_xorg_device_match[] = {
     {0x15ad, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, 0},
@@ -126,7 +126,7 @@ vmw_xorg_identify(int flags)
                      vmw_xorg_chipsets);
 }
 
-static Bool
+_X_EXPORT Bool
 vmw_xorg_pci_probe(DriverPtr driver,
          int entity_num, struct pci_device *device, intptr_t match_data)
 {
index 4cb63059884b7cadde81bea3bb02fff28009b94d..947330b2f1683d939f30aa3552e0d84ace08dde6 100644 (file)
 #include "i830_context.h"
 #include "main/imports.h"
 #include "texmem.h"
-#include "intel_tex.h"
 #include "tnl/tnl.h"
 #include "tnl/t_vertex.h"
 #include "tnl/t_context.h"
 #include "tnl/t_pipeline.h"
-#include "utils.h"
 #include "intel_span.h"
-#include "intel_pixel.h"
 #include "intel_tris.h"
 
 /***************************************
index 7c7711da099a588a60f31ad98011e59c97db0c70..8477e2f9a42d99b9b359b0663544da4ac13b2447 100644 (file)
@@ -28,7 +28,6 @@
 #include "i915_context.h"
 #include "main/imports.h"
 #include "main/macros.h"
-#include "intel_tex.h"
 #include "intel_tris.h"
 #include "tnl/t_context.h"
 #include "tnl/t_pipeline.h"
 #include "swrast_setup/swrast_setup.h"
 #include "tnl/tnl.h"
 
-#include "utils.h"
 #include "i915_reg.h"
 #include "i915_program.h"
 
-#include "intel_regions.h"
-#include "intel_batchbuffer.h"
 #include "intel_tris.h"
 #include "intel_span.h"
-#include "intel_pixel.h"
 
 /***************************************
  * Mesa's Driver Functions
index 84347a01efe419bad6cc1f03f8684c713e3ac712..bf500e54fa29de536483cc76d30535314a0fc162 100644 (file)
@@ -30,9 +30,6 @@
 #include "i915_reg.h"
 #include "i915_debug.h"
 #include "main/imports.h"
-#include "shader/program.h"
-#include "shader/prog_instruction.h"
-#include "shader/prog_print.h"
 
 #define PRINTF( ... ) _mesa_printf( __VA_ARGS__ )
 
index df82d7e8bee339c91b8573b7dff6bcb2dd70029f..933a565f0283ba062181692a4f463d1aa00071eb 100644 (file)
@@ -37,7 +37,6 @@
 #include "tnl/t_vertex.h"
 
 #include "intel_batchbuffer.h"
-#include "intel_tex.h"
 #include "intel_regions.h"
 #include "intel_tris.h"
 #include "intel_fbo.h"
index e99baf8e0e6e5151a6e5a5246871658d9e043941..763c1a0ae7ea5d6c4b4c4eaf09fc14a43ed4a37f 100644 (file)
@@ -52,7 +52,6 @@
 #include "intel_buffers.h"
 #include "intel_reg.h"
 #include "intel_span.h"
-#include "intel_tex.h"
 #include "intel_chipset.h"
 #include "i830_context.h"
 #include "i830_reg.h"
index 016f27a6a31ea3be8e240bfce5c8d88d65971be6..fa2d394b2222012a58c329358901572f99078c4d 100644 (file)
@@ -34,9 +34,7 @@
 #include "brw_state.h"
 #include "brw_defines.h"
 #include "brw_util.h"
-#include "intel_fbo.h"
 #include "main/macros.h"
-#include "main/enums.h"
 
 static void prepare_cc_vp( struct brw_context *brw )
 {
index afc0b11049406575fc09944c85d939171ab886db..ceb62a311626800f9b57533edb98ae6cf245f1bf 100644 (file)
@@ -39,7 +39,6 @@
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
-#include "brw_util.h"
 #include "brw_clip.h"
 
 
index 8458f61c5a029a5d7d0a06e8f72c1894c8706271..7f47634dca80cb893d1ea3580a2125304fbebac2 100644 (file)
@@ -39,7 +39,6 @@
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
-#include "brw_util.h"
 #include "brw_clip.h"
 
 
index 22df7722b686d69e5146b6d3d26c165d7aef6ed6..424c9a1f1985afc6cc71fe0e22037f54ac2ea7cb 100644 (file)
@@ -32,7 +32,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "main/macros.h"
 
 struct brw_clip_unit_key {
    unsigned int total_grf;
index cfbb8f2686aee6421471c5f2d23b439ba14df8cb..815211acc21dd9046c7c464c354fa693721d8982 100644 (file)
@@ -39,7 +39,6 @@
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
-#include "brw_util.h"
 #include "brw_clip.h"
 
 static void release_tmps( struct brw_clip_compile *c )
index ad1bfa435fb7e8b1de1505f2a51506cf612f814e..f36d22fdbf8b9ce0eae5e18e99ec86caed96cc4e 100644 (file)
@@ -39,7 +39,6 @@
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
-#include "brw_util.h"
 #include "brw_clip.h"
 
 
index 86fed59fa4b89dfbc90b7747a3407d72d7a38b95..14bc889b0f8e9260b741d87d45b131a23e2a1094 100644 (file)
@@ -40,7 +40,6 @@
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
-#include "brw_util.h"
 #include "brw_clip.h"
 
 
index 7bb15956b5615aac21a77cd547c01989d2722d62..568db97ec7439323572cd954188237f5360d6d18 100644 (file)
 #include "main/imports.h"
 #include "main/api_noop.h"
 #include "main/macros.h"
-#include "main/vtxfmt.h"
 #include "main/simple_list.h"
 #include "shader/shader_api.h"
 
 #include "brw_context.h"
-#include "brw_defines.h"
 #include "brw_draw.h"
 #include "brw_state.h"
-#include "brw_vs.h"
-#include "intel_tex.h"
-#include "intel_blit.h"
-#include "intel_batchbuffer.h"
-#include "intel_pixel.h"
 #include "intel_span.h"
 #include "tnl/t_pipeline.h"
 
-#include "utils.h"
-
 
 /***************************************
  * Mesa's Driver Functions
index df281b27d5c11df8450bc18ccd64d5a61ae4ea69..d510d767f97fd3774c66208c1313ede665919a7c 100644 (file)
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_state.h"
-#include "brw_fallback.h"
 
 #include "intel_batchbuffer.h"
-#include "intel_buffer_objects.h"
 
 #define FILE_DEBUG_FLAG DEBUG_BATCH
 
index 6161de8a848c7a2eb99cc41771258352265d290c..c46b9ba89ce3a78d14ffca45be63ebd5086c1515 100644 (file)
 #include "main/glheader.h"
 #include "main/bufferobj.h"
 #include "main/context.h"
-#include "main/state.h"
-#include "main/api_validate.h"
 #include "main/enums.h"
 
 #include "brw_draw.h"
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_state.h"
-#include "brw_fallback.h"
 
 #include "intel_batchbuffer.h"
 #include "intel_buffer_objects.h"
-#include "intel_tex.h"
 
 static GLuint double_types[5] = {
    0,
index b4e4e8df207f52161fe73d8fab7bf6fccbd0d3af..79691c3a0f9793804dc3cb6ad51ccef7f4ed3b92 100644 (file)
@@ -36,7 +36,6 @@
 #include "swrast/swrast.h"
 #include "tnl/tnl.h"
 #include "brw_context.h"
-#include "brw_fallback.h"
 #include "intel_chipset.h"
 #include "intel_fbo.h"
 #include "intel_regions.h"
index a81b972ef4b12a574c2cc39b8a45ee161d09ada0..dd7b057d62025046d0ea9e161a83653992059233 100644 (file)
@@ -40,7 +40,6 @@
 #include "brw_defines.h"
 #include "brw_context.h"
 #include "brw_eu.h"
-#include "brw_util.h"
 #include "brw_gs.h"
 
 static void brw_gs_alloc_regs( struct brw_gs_compile *c,
index 7d5a944bf7d38d7bb135394281dbdddc76bf849f..d8ad5cecf3fe422fc0ffec9932ef39dfab7f60ef 100644 (file)
@@ -34,7 +34,6 @@
 #include "brw_context.h"
 #include "brw_state.h"
 #include "brw_defines.h"
-#include "main/macros.h"
 
 struct brw_gs_unit_key {
    unsigned int total_grf;
index bac69187c1919e81dde0e9add89738515b8308ca..e3b6fccc49fbd6160f74851ff204c235a1daa4d2 100644 (file)
@@ -37,7 +37,6 @@
 #include "tnl/tnl.h"
 
 #include "brw_context.h"
-#include "brw_util.h"
 #include "brw_wm.h"
 
 static void brwBindProgram( GLcontext *ctx,
index b9b42cd6d553e6fd5aec15e2b2fd25c93c0fd4c7..8ebbd09e436aca5fd50d868429a7dfaf1db03345 100644 (file)
@@ -35,7 +35,6 @@
 #include "brw_state.h"
 #include "brw_defines.h"
 #include "main/macros.h"
-#include "intel_fbo.h"
 
 static void upload_sf_vp(struct brw_context *brw)
 {
index 3f6e16fcb0a5393a27e809431720646be2b0981a..ca93ca75061ad14c3bdf1a3ed187c311394be2ef 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "brw_context.h"
 #include "brw_state.h"
-#include "brw_defines.h"
 
 /* Creates a new VS constant buffer reflecting the current VS program's
  * constants, if needed by the VS program.
index bb7a29381239f2ad3d9ace0266ea12400cacc99f..e08f32c4e27b0ceff8afb235af0cd2f3a3e3d122 100644 (file)
@@ -44,7 +44,6 @@
 #include "brw_state.h"
 #include "brw_draw.h"
 #include "brw_state.h"
-#include "brw_fallback.h"
 #include "brw_vs.h"
 #include "brw_wm.h"
 
index fb24379c90b174d56627782bfc89ada8a78c9aaa..8afd1f4aef3887a6a453bcee0d133d74c1e7d64b 100644 (file)
@@ -30,7 +30,6 @@
   */
              
 #include "brw_context.h"
-#include "brw_util.h"
 #include "brw_wm.h"
 #include "brw_state.h"
 
index 55bee0084c175ae08cdc7329a04d2405d49efcde..72b6e1acb977345757c2858c60360060308c36f8 100644 (file)
@@ -38,7 +38,6 @@
 #include "intel_reg.h"
 #include "intel_regions.h"
 #include "intel_batchbuffer.h"
-#include "intel_chipset.h"
 
 #define FILE_DEBUG_FLAG DEBUG_BLIT
 
index 7c4b79f743a8dca6d79d386cea6b4944bafea626..de75257349541eaa847ceefe2e965da231160201 100644 (file)
 #include "intel_context.h"
 #include "intel_buffers.h"
 #include "intel_fbo.h"
-#include "intel_regions.h"
 #include "intel_batchbuffer.h"
 #include "main/framebuffer.h"
-#include "drirenderbuffer.h"
 
 
 /**
index 956f2339ff06bd0378f8e2ef8a781fc7f5a07201..ca78681538cf4194d32e7b466da43f35dae8d01b 100644 (file)
 
 #include "intel_context.h"
 #include "intel_blit.h"
-#include "intel_chipset.h"
 #include "intel_clear.h"
 #include "intel_fbo.h"
-#include "intel_pixel.h"
 #include "intel_regions.h"
-#include "intel_batchbuffer.h"
 
 #define FILE_DEBUG_FLAG DEBUG_BLIT
 
index d52fe2eef2c405b432a497524310e47774e16557..5f2a473e22d73a53aaec861cb73e2de7bb6a9f57 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "main/glheader.h"
 #include "main/context.h"
-#include "main/arrayobj.h"
 #include "main/extensions.h"
 #include "main/framebuffer.h"
 #include "main/imports.h"
index 5142f3dcd99f0b2b43e0d909c5843bc86b72e3b2..cb088e403298328f5522e5d23d09839bfc5e1d82 100644 (file)
 #include "main/state.h"
 #include "main/bufferobj.h"
 #include "main/context.h"
-#include "main/enable.h"
-#include "main/matrix.h"
-#include "main/texstate.h"
-#include "main/varray.h"
-#include "main/viewport.h"
 #include "swrast/swrast.h"
-#include "shader/arbprogram.h"
-#include "shader/program.h"
 
 #include "intel_context.h"
 #include "intel_pixel.h"
index eeebba94436a0608c861ef52eec4c630bdb24c75..b27766ee6fd48c3b76dfbcb2f35727cac4b00979 100644 (file)
@@ -37,7 +37,6 @@
 #include "main/polygon.h"
 #include "main/state.h"
 #include "main/teximage.h"
-#include "main/texenv.h"
 #include "main/texobj.h"
 #include "main/texstate.h"
 #include "main/texparam.h"
@@ -53,7 +52,6 @@
 #include "intel_batchbuffer.h"
 #include "intel_blit.h"
 #include "intel_regions.h"
-#include "intel_buffer_objects.h"
 #include "intel_buffers.h"
 #include "intel_pixel.h"
 #include "intel_reg.h"
index b870e9315e0ce75f71f18165c1b031eeffad010c..7e82c5b8aa218ef3a359bb21a6d17353b2f3e4db 100644 (file)
 #include "drivers/common/meta.h"
 
 #include "intel_context.h"
-#include "intel_batchbuffer.h"
-#include "intel_blit.h"
 #include "intel_buffers.h"
-#include "intel_regions.h"
 #include "intel_pixel.h"
 #include "intel_fbo.h"
 
index 9c0fdc6067caa6bb2c31d87f67413de097dd5982..7611ba86506b99cf15d3003bf1a3f9607323032e 100644 (file)
@@ -36,7 +36,6 @@
 
 #include "intel_screen.h"
 #include "intel_context.h"
-#include "intel_batchbuffer.h"
 #include "intel_blit.h"
 #include "intel_buffers.h"
 #include "intel_regions.h"
index 61aefa01b8a184b38e76c6536096e72ee469de37..f415589c5da75de961f98d82d894d997ffe31a0a 100644 (file)
@@ -48,7 +48,6 @@
 #include "intel_buffer_objects.h"
 #include "intel_bufmgr.h"
 #include "intel_batchbuffer.h"
-#include "intel_chipset.h"
 
 #define FILE_DEBUG_FLAG DEBUG_REGION
 
index 6c2cb3b57e26b3bb98a165ede15cd2a1cbbe9dfe..fe504166427bae4b06ae415a375213a9f007d4d1 100644 (file)
 #include "intel_buffers.h"
 #include "intel_bufmgr.h"
 #include "intel_chipset.h"
-#include "intel_extensions.h"
 #include "intel_fbo.h"
 #include "intel_regions.h"
 #include "intel_screen.h"
-#include "intel_span.h"
 #include "intel_tex.h"
 
 #include "i915_drm.h"
index aefae53eb20750fe965b6ceed8db290189726347..c5ef909dbf1ce924be9bfd790c2812e14e45eef4 100644 (file)
@@ -35,8 +35,6 @@
 
 #include "intel_screen.h"
 #include "intel_context.h"
-#include "intel_regions.h"
-#include "swrast/swrast.h"
 
 int
 intel_translate_shadow_compare_func(GLenum func)
index d8e71093c47b06441f79d1de3eb1e38f2ec8c0e6..79994b4a6a03d845c21b1db7ce0f3bfd44b3ae39 100644 (file)
@@ -36,7 +36,6 @@
 
 #include "intel_screen.h"
 #include "intel_context.h"
-#include "intel_batchbuffer.h"
 #include "intel_buffers.h"
 #include "intel_mipmap_tree.h"
 #include "intel_regions.h"
index 6f41eafd0ef8b9ac22ef6aec3e214f9e18d8649d..f5d0dabebb64cacf81265c9112a258558786c911 100644 (file)
@@ -7,7 +7,6 @@
 #include "main/convolve.h"
 #include "main/context.h"
 #include "main/formats.h"
-#include "main/image.h"
 #include "main/texcompress.h"
 #include "main/texstore.h"
 #include "main/texgetimage.h"
index c9a24ac3983381e38b9abf680e482fdd2d945603..ed5c5d896b9c200eb8ebb1affbe3f2eceb773fbe 100644 (file)
@@ -2,10 +2,8 @@
 #include "main/macros.h"
 
 #include "intel_context.h"
-#include "intel_batchbuffer.h"
 #include "intel_mipmap_tree.h"
 #include "intel_tex.h"
-#include "intel_chipset.h"
 
 #define FILE_DEBUG_FLAG DEBUG_TEXTURE
 
index f835cb8bd6bf137850120d9465b3ecc2f12c35e3..e7813b63725025620bd5c812b035b1ef303cd706 100644 (file)
@@ -35,7 +35,6 @@
 #include "mga_drm.h"
 #include "mga_xmesa.h"
 #include "main/context.h"
-#include "main/matrix.h"
 #include "main/simple_list.h"
 #include "main/imports.h"
 #include "main/framebuffer.h"
@@ -64,7 +63,6 @@
 #include "utils.h"
 #include "vblank.h"
 
-#include "main/extensions.h"
 #include "drirenderbuffer.h"
 
 #include "GL/internal/dri_interface.h"
index 3b1ea22b60920e4adb7ee6c91a463e1eae484664..2f23c0e51422cad8cb4691f901e780809d72a7d3 100644 (file)
 
 #include "mgacontext.h"
 #include "mgadd.h"
-#include "mgastate.h"
-#include "mgaspan.h"
-#include "mgatex.h"
-#include "mgatris.h"
-#include "mgavb.h"
 #include "mga_xmesa.h"
 #include "utils.h"
 
index 8ce5d802ab83008a867eeae8e0b7738d7eefc1d2..259358eaa3f125099eef358895a5abc210218df6 100644 (file)
 #include "mgacontext.h"
 #include "mgadd.h"
 #include "mgastate.h"
-#include "mgatex.h"
-#include "mgavb.h"
 #include "mgaioctl.h"
-#include "mgatris.h"
 
 #include "vblank.h"
 
index 517c3b8f82c10de29b753028ef8322742f71cda0..8b8fc485d31f46db552b2b5b687991ddfab958de 100644 (file)
@@ -48,7 +48,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "mgacontext.h"
 #include "mgatris.h"
-#include "mgastate.h"
 #include "mgaioctl.h"
 #include "mgavb.h"
 
index 62a9317cd48ab317aa946f2463874e062cc03074..ca3dd4b01391c218db83f5ebd18a3346c4592b70 100644 (file)
 #include "mgacontext.h"
 #include "mgatex.h"
 #include "mgaregs.h"
-#include "mgatris.h"
 #include "mgaioctl.h"
 
-#include "swrast/swrast.h"
-
 #include "xmlpool.h"
 
 /**
index c1bcd4b853147ebc715921ed0a484eb69def25d5..4c58c3bdb04c71c2fdf27d025c8e7365c80d96b6 100644 (file)
@@ -38,7 +38,6 @@
 #include "mgaioctl.h"
 #include "mgatris.h"
 #include "mgavb.h"
-#include "mgastate.h"
 
 
 static void mgaRenderPrimitive( GLcontext *ctx, GLenum prim );
index 1c635b23a65d9967ff1a2ec4a1f08c8291b7b5da..def5109863c374bafe4533c69fbf74124ffdc3c5 100644 (file)
@@ -39,7 +39,6 @@
 #include "main/colormac.h"
 
 #include "tnl/t_context.h"
-#include "swrast_setup/swrast_setup.h"
 #include "swrast/swrast.h"
 
 
index 11405d7caeeba5ab9c44b039e1a097732c87454d..4f225a233dad001cebb5c263ec14de68db5ddef2 100644 (file)
@@ -437,7 +437,7 @@ static GLboolean r200_translate_vertex_program(GLcontext *ctx, struct r200_verte
       (1 << VERT_RESULT_TEX2) | (1 << VERT_RESULT_TEX3) | (1 << VERT_RESULT_TEX4) |
       (1 << VERT_RESULT_TEX5) | (1 << VERT_RESULT_PSIZ))) != 0) {
       if (R200_DEBUG & RADEON_FALLBACKS) {
-        fprintf(stderr, "can't handle vert prog outputs 0x%x\n",
+        fprintf(stderr, "can't handle vert prog outputs 0x%llx\n",
            mesa_vp->Base.OutputsWritten);
       }
       return GL_FALSE;
index e1c33bbb2cfba446c8186f3b5f380d4904840d23..4787bafc66a085a90e0fb101d2f9e5da98a9c6fc 100644 (file)
@@ -39,7 +39,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "main/macros.h"
 #include "main/context.h"
 #include "main/simple_list.h"
-#include "swrast/swrast.h"
 
 #include "drm.h"
 #include "radeon_drm.h"
@@ -50,7 +49,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r300_emit.h"
 #include "radeon_bocs_wrapper.h"
 #include "radeon_mipmap_tree.h"
-#include "r300_state.h"
 #include "radeon_queryobj.h"
 
 /** # of dwords reserved for additional instructions that may need to be written
index 2efdae078e896f5486705032889f54230cc2f64e..eedb7b6ed8679731e12c3b33ccc339c931fd7265 100644 (file)
@@ -40,9 +40,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "main/context.h"
 #include "main/simple_list.h"
 #include "main/imports.h"
-#include "main/matrix.h"
 #include "main/extensions.h"
-#include "main/state.h"
 #include "main/bufferobj.h"
 #include "main/texobj.h"
 
@@ -52,13 +50,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "tnl/tnl.h"
 #include "tnl/t_pipeline.h"
-#include "tnl/t_vp_build.h"
 
 #include "drivers/common/driverfuncs.h"
 #include "drivers/common/meta.h"
 
 #include "r300_context.h"
-#include "radeon_context.h"
 #include "radeon_span.h"
 #include "r300_blit.h"
 #include "r300_cmdbuf.h"
@@ -70,7 +66,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "radeon_buffer_objects.h"
 #include "radeon_queryobj.h"
 
-#include "vblank.h"
 #include "utils.h"
 #include "xmlpool.h"           /* for symbolic values of enum-type options */
 
index 2219821153b2569a172110d98a475ddaf2ba6dfc..813495a0466c5d7df005748dd350c7902d8cd5be 100644 (file)
@@ -29,7 +29,6 @@
 #include "main/glheader.h"
 #include "main/context.h"
 #include "main/state.h"
-#include "main/api_validate.h"
 #include "main/enums.h"
 #include "main/simple_list.h"
 
@@ -47,8 +46,6 @@
 #include "tnl/tnl.h"
 #include "tnl/t_vp_build.h"
 #include "vbo/vbo_context.h"
-#include "swrast/swrast.h"
-#include "swrast_setup/swrast_setup.h"
 
 
 static int getTypeSize(GLenum type)
index 15aeaf051480f40554de4a1958e7309c5eac3b7b..740c9022217207dfe259d12d8475f0db721bfef2 100644 (file)
@@ -39,19 +39,17 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "main/colormac.h"
 #include "main/imports.h"
 #include "main/macros.h"
-#include "main/image.h"
 
 #include "swrast_setup/swrast_setup.h"
-#include "math/m_translate.h"
 #include "tnl/tnl.h"
 #include "tnl/t_context.h"
 
 #include "r300_context.h"
-#include "r300_state.h"
 #include "r300_emit.h"
 #include "r300_render.h"
 #include "r300_swtcl.h"
 
+
 GLuint r300VAPInputCntl0(GLcontext * ctx, GLuint InputsRead)
 {
        /* No idea what this value means. I have seen other values written to
index 2933d31136c400ce8f86b3d2052c27e1fadad3d3..e41aeff91a44a40e47c73ab3f56788865062976d 100644 (file)
 
 #include "r300_fragprog_common.h"
 
-#include "shader/program.h"
 #include "shader/prog_parameter.h"
 #include "shader/prog_print.h"
 
 #include "compiler/radeon_compiler.h"
 
 #include "radeon_mesa_to_rc.h"
-#include "r300_state.h"
 
 
 static GLuint build_dtm(GLuint depthmode)
index 02c94250a8ffd3a1fe53060eb7300b83fadfdb1c..e3e62857840ca0dd571f08add9f0dc98b76e9ea2 100644 (file)
@@ -53,7 +53,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r300_render.h"
 
 #include "main/glheader.h"
-#include "main/state.h"
 #include "main/imports.h"
 #include "main/enums.h"
 #include "main/macros.h"
@@ -65,14 +64,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "swrast_setup/swrast_setup.h"
 #include "vbo/vbo.h"
 #include "vbo/vbo_split.h"
-#include "tnl/tnl.h"
-#include "tnl/t_vp_build.h"
 #include "r300_context.h"
 #include "r300_state.h"
 #include "r300_reg.h"
-#include "r300_tex.h"
 #include "r300_emit.h"
-#include "r300_fragprog_common.h"
 #include "r300_swtcl.h"
 
 /**
index c51285aad9313971aa35ab8156f329864a41465f..017d45a5039ccf01646e78856a79b2d1efafe4cf 100644 (file)
@@ -58,13 +58,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r300_state.h"
 #include "r300_reg.h"
 #include "r300_emit.h"
-#include "r300_tex.h"
 #include "r300_fragprog_common.h"
 #include "r300_render.h"
 #include "r300_vertprog.h"
 
-#include "drirenderbuffer.h"
-
 static void r300BlendColor(GLcontext * ctx, const GLfloat cf[4])
 {
        r300ContextPtr rmesa = R300_CONTEXT(ctx);
index eb5d2d500418c8dc44466ed4ec1fec9e00e4721a..8dd8507395488b07ff074ac642b85c7a9758a7d7 100644 (file)
@@ -41,18 +41,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "main/mipmap.h"
 #include "main/simple_list.h"
 #include "main/texstore.h"
-#include "main/teximage.h"
 #include "main/texobj.h"
 
 #include "texmem.h"
 
 #include "r300_context.h"
-#include "r300_state.h"
 #include "radeon_mipmap_tree.h"
 #include "r300_tex.h"
 
-#include "xmlpool.h"
-
 
 static unsigned int translate_wrap_mode(GLenum wrapmode)
 {
index 78ff54574f623c5b142c0ccde812ec421304b46d..09e046859a47e6e2d0050e2a73d4db2637225c42 100644 (file)
@@ -45,7 +45,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "main/simple_list.h"
 
 #include "r300_context.h"
-#include "r300_state.h"
 #include "radeon_mipmap_tree.h"
 #include "r300_tex.h"
 #include "r300_reg.h"
index aa98a049aa4aad5d64ab00c5997263a3200c6f25..e6fa57d439b4b53fb81383368d8c0a56b04853de 100644 (file)
@@ -34,7 +34,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "shader/program.h"
 #include "shader/programopt.h"
 #include "shader/prog_instruction.h"
-#include "shader/prog_optimize.h"
 #include "shader/prog_parameter.h"
 #include "shader/prog_print.h"
 #include "shader/prog_statevars.h"
index bf46eb8aaba9b6a88b248679dc0e9abe3a6b4c35..cc951a12cbc46691e9f1126085cc0c5442c35c40 100644 (file)
@@ -180,7 +180,6 @@ static int cs_begin(struct radeon_cs_int *cs,
 
     if (cs->cdw + ndw > cs->ndw) {
         uint32_t tmp, *ptr;
-       int num = (ndw > 0x3FF) ? ndw : 0x3FF;
 
         tmp = (cs->cdw + ndw + 0x3ff) & (~0x3ff);
         ptr = (uint32_t*)realloc(cs->packets, 4 * tmp);
index 32ca86de8aef256c48b91c24b5fb754d486eb465..bbf49aec272f43bc9f80568aec8741cf2f3d5de4 100644 (file)
 #include <stdio.h>
 
 #include "main/mm.h"
-#include "swrast/swrast.h"
 
 #include "savagedd.h"
 #include "savagestate.h"
-#include "savagespan.h"
 #include "savagetex.h"
-#include "savagetris.h"
 #include "savagecontext.h"
-#include "main/extensions.h"
 
 #include "utils.h"
 
index d0b64e801a973795ce3f989418f482b856b81234..9e181ce3be9acbc7cdd72e28a20eddbe43d422f7 100644 (file)
 
 #include "savagecontext.h"
 #include "savageioctl.h"
-#include "savage_bci.h"
 #include "savagestate.h"
 #include "savagespan.h"
 
 #include "drm.h"
-#include <sys/ioctl.h>
 #include <sys/timeb.h>
 
 #define DEPTH_SCALE_16 ((1<<16)-1)
index 8221edf38727228bd1e7d95adf0405b2debf8b92..c369bb124c20606ad9e5f3b84273a140b7a50517 100644 (file)
@@ -36,7 +36,6 @@
 #include "tnl/t_context.h"
 
 #include "savagecontext.h"
-#include "savagetris.h"
 #include "savagestate.h"
 #include "savageioctl.h"
 
index 792e166d9c73b7794d0847a522358eca5dd813cb..0913dd1278c293867bfa8b6aae3bdddfdb2c1cdd 100644 (file)
@@ -26,7 +26,6 @@
 #include "savagedd.h"
 #include "savagespan.h"
 #include "savageioctl.h"
-#include "savage_bci.h"
 #include "savage_3d_reg.h"
 #include "swrast/swrast.h"
 
index 97598f599e56f79c478928aa76c2e804bd22c3ea..394be44eac5d425009fd00b7c2f297b4ad66c9a6 100644 (file)
@@ -33,8 +33,6 @@
 #include "main/simple_list.h"
 #include "main/enums.h"
 
-#include "swrast/swrast.h"
-
 #include "savagecontext.h"
 #include "savagetex.h"
 #include "savagetris.h"
index 9a92541ef7ed60a1180c248db5c87a09452d3022..a177a7d2b6001f1808dc885ccabb80aca3423db4 100644 (file)
@@ -52,7 +52,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "savagestate.h"
 #include "savagetex.h"
 #include "savageioctl.h"
-#include "savage_bci.h"
 
 static void savageRasterPrimitive( GLcontext *ctx, GLuint prim );
 static void savageRenderPrimitive( GLcontext *ctx, GLenum prim );
index 65d4c064660784a0b7e184d73262248cb6005c49..52008c7ea32fe326d0aedd0381a61e4d3f3eb379 100644 (file)
 #include "sis_reg.h"
 
 #include "main/context.h"
-#include "main/enums.h"
 #include "main/colormac.h"
 #include "swrast/swrast.h"
 #include "vbo/vbo.h"
 #include "tnl/tnl.h"
 #include "swrast_setup/swrast_setup.h"
 
-#include "tnl/t_pipeline.h"
 
 /* =============================================================
  * Alpha blending
index 0944f4d8b4e243f3cc5425b99b0c5539c53c8acb..400681a04ab8a6fadae54ea6d80f3501a640b0b9 100644 (file)
@@ -43,8 +43,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "sis_alloc.h"
 
 #include "main/imports.h"
-#include "main/matrix.h"
-#include "main/extensions.h"
 #include "utils.h"
 #include "main/framebuffer.h"
 
@@ -55,7 +53,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "vbo/vbo.h"
 
 #include "tnl/tnl.h"
-#include "tnl/t_pipeline.h"
 
 #define need_GL_EXT_fog_coord
 #define need_GL_EXT_secondary_color
index 217d77557f3e5530699d1b7deee60384a87ca6be..fe4ade8592093f3e6ea4c6b6cb5dc9be568dd9a2 100644 (file)
@@ -40,9 +40,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "sis_state.h"
 #include "sis_tris.h"
 
-#include "swrast/swrast.h"
 #include "main/formats.h"
-#include "main/framebuffer.h"
 #include "main/renderbuffer.h"
 
 #include "utils.h"
index 517d5722e6a86285bd70d7736c4b3ec7af1a42de..6c774e010ebd0dc1b5e5d72fcc1c104861afff3a 100644 (file)
@@ -33,7 +33,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "sis_context.h"
 #include "sis_state.h"
-#include "swrast/swrast.h"
 
 #include "main/macros.h"
 
index d38b93ec9b8a7f217fb696f0e3eccf69ecf00623..cb7ed8a08bbcff2e041e2d2697868566c0bf496f 100644 (file)
@@ -39,7 +39,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "sis_context.h"
 #include "sis_dri.h"
 #include "sis_lock.h"
-#include "sis_span.h"
 
 #include "xmlpool.h"
 
index 98e8d02fabe7d80f9e060cea66ea104f6c12ef68..a22195cccebb72f03f4a2582d727126dfcd43c56 100644 (file)
@@ -35,17 +35,13 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "sis_state.h"
 #include "sis_tris.h"
 #include "sis_lock.h"
-#include "sis_tex.h"
 
 #include "main/context.h"
-#include "main/enums.h"
-#include "main/colormac.h"
 #include "swrast/swrast.h"
 #include "vbo/vbo.h"
 #include "tnl/tnl.h"
 #include "swrast_setup/swrast_setup.h"
 
-#include "tnl/t_pipeline.h"
 
 /* =============================================================
  * Alpha blending
index 951c470dadfb174d15f81ac1803775ce2ed37429..31709c3af6e35e58814527feb3194f6df339936d 100644 (file)
@@ -31,7 +31,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "swrast/swrast.h"
 #include "main/imports.h"
 #include "main/texstore.h"
-#include "main/teximage.h"
 #include "main/texobj.h"
 
 #include "sis_context.h"
index 4c22a10cf7e361e9cdda9ef23d595675ad3949c4..7b0eebd066f70f3ff738e88ddd61aedd5909c550 100644 (file)
@@ -38,7 +38,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "main/macros.h"
 
 #include "sis_context.h"
-#include "sis_state.h"
 #include "sis_tex.h"
 #include "sis_tris.h"
 #include "sis_alloc.h"
index 4690274c3c05f8d7f43921ff6a012bdd4e7e5629..4b41d78d82a1d85410211021a8d1960844afbbbd 100644 (file)
@@ -47,7 +47,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "sis_state.h"
 #include "sis_lock.h"
 #include "sis_span.h"
-#include "sis_alloc.h"
 #include "sis_tex.h"
 
 /* 6326 and 300-series shared */
index ed8a331549209d550db6454bb48c5fb3eb5d5211..2cbbeb811415eaeccfa8665d798ed6e4556bdb2f 100644 (file)
 #include "tdfx_context.h"
 #include "tdfx_dd.h"
 #include "tdfx_lock.h"
-#include "tdfx_vb.h"
 #include "tdfx_pixels.h"
 
 #include "utils.h"
 #include "main/context.h"
-#include "main/enums.h"
-#include "main/framebuffer.h"
-#include "swrast/swrast.h"
-#if defined(USE_X86_ASM)
-#include "x86/common_x86_asm.h"
-#endif
 
 
 #define DRIVER_DATE    "20061113"
index 4f84240104ad67a7b96628a725401edaff1adb71..f218e4ee57606e61c32380557cbac2405ba7cdb7 100644 (file)
@@ -38,7 +38,6 @@
 #include "tdfx_state.h"
 #include "tdfx_render.h"
 #include "tdfx_texman.h"
-#include "tdfx_tris.h"
 
 #include "drirenderbuffer.h"
 
index 65f0464f8a5cbd6edf713259823e04d1c0e13ca0..444962741889d593a42a4087b0ef266cb1953ec0 100644 (file)
@@ -38,7 +38,6 @@
 #include "tdfx_context.h"
 #include "tdfx_dd.h"
 #include "tdfx_lock.h"
-#include "tdfx_vb.h"
 #include "tdfx_pixels.h"
 #include "tdfx_render.h"
 
index 4422b5dec46b49a44f2384edf215c6a5fbeecfb7..9f6b35faa28f09fa9ed397a45b1a2bbc1d45f37b 100644 (file)
@@ -36,9 +36,7 @@
 #include "tdfx_dri.h"
 #include "tdfx_context.h"
 #include "tdfx_lock.h"
-#include "tdfx_vb.h"
 #include "tdfx_span.h"
-#include "tdfx_tris.h"
 
 #include "main/framebuffer.h"
 #include "main/renderbuffer.h"
index cdb61a0ce05bfb52e6f1d501222a53cd6f1936da..dcbc7647f294e562e0c275c9d71781c5d7a3d9c8 100644 (file)
@@ -40,8 +40,6 @@
 
 #include "main/mtypes.h"
 #include "main/colormac.h"
-#include "main/texstore.h"
-#include "main/teximage.h"
 
 #include "swrast/swrast.h"
 #include "vbo/vbo.h"
 
 #include "tdfx_context.h"
 #include "tdfx_state.h"
-#include "tdfx_vb.h"
 #include "tdfx_tex.h"
 #include "tdfx_texman.h"
 #include "tdfx_texstate.h"
-#include "tdfx_tris.h"
 #include "tdfx_render.h"
 
 
index 35636ee5efb3e392a0d7733d0db7c4bb5127a0d1..726cc58a10b63625c7c4bad457d8b063c4261ad4 100644 (file)
@@ -35,7 +35,6 @@
  */
 
 #include "tdfx_context.h"
-#include "tdfx_tex.h"
 #include "tdfx_texman.h"
 #include "main/texobj.h"
 #include "main/hash.h"
index 3f737878ed94c8adc30a1d2cc782bf2724fb2c19..6658b4d0c3e9b427455e040a751036423239ed08 100644 (file)
@@ -38,7 +38,6 @@
  */
 
 #include "tdfx_state.h"
-#include "tdfx_tex.h"
 #include "tdfx_texman.h"
 #include "tdfx_texstate.h"
 
index c200ba3255a2a4fcf131f2e29bded178d19a6486..0f3c877a3e7c6b8f924c12f02bc7aad509c6a042 100644 (file)
 #include "main/macros.h"
 #include "main/colormac.h"
 
-#include "math/m_translate.h"
-#include "swrast_setup/swrast_setup.h"
-
 #include "tdfx_context.h"
 #include "tdfx_vb.h"
-#include "tdfx_tris.h"
-#include "tdfx_state.h"
 #include "tdfx_render.h"
 
 static void copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc )
index d293497736bcb34d5a7f3e7ba9a860ffb8b09995..d210f3a2481e5148c63a909ed434aace8a548ab1 100644 (file)
@@ -73,7 +73,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
                print ''
                print '#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))'
                print ''
-               print '#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__)'
+               print '#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)'
                print '#define GLOBL_FN(x) GLOBL x ; .type x, function'
                print '#else'
                print '#define GLOBL_FN(x) GLOBL x'
index b5f4cde7898734be5874f273cd5fcda683bf2dda..523f3c3ab833a6e5aa026f4cc1dd05327e616776 100644 (file)
@@ -37,14 +37,14 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height )
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
+   if (MESA_VERBOSE & VERBOSE_API)
+      _mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height);
+
    if (width < 0 || height < 0) {
       _mesa_error( ctx, GL_INVALID_VALUE, "glScissor" );
       return;
    }
 
-   if (MESA_VERBOSE & VERBOSE_API)
-      _mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height);
-
    _mesa_set_scissor(ctx, x, y, width, height);
 }
 
index 3fd59e1945c2677b2de1cf8bbc3fd3388c7f50a8..5e0c51cff0af3f273a2c922899cf005cd64813eb 100644 (file)
@@ -31,6 +31,7 @@
   */
  
 
+#include "main/macros.h"
 #include "st_context.h"
 #include "pipe/p_context.h"
 #include "st_atom.h"
@@ -52,15 +53,19 @@ update_scissor( struct st_context *st )
    scissor.maxy = fb->Height;
 
    if (st->ctx->Scissor.Enabled) {
-      if ((GLuint)st->ctx->Scissor.X > scissor.minx)
+      /* need to be careful here with xmax or ymax < 0 */
+      GLint xmax = MAX2(0, st->ctx->Scissor.X + st->ctx->Scissor.Width);
+      GLint ymax = MAX2(0, st->ctx->Scissor.Y + st->ctx->Scissor.Height);
+
+      if (st->ctx->Scissor.X > (GLint)scissor.minx)
          scissor.minx = st->ctx->Scissor.X;
-      if ((GLuint)st->ctx->Scissor.Y > scissor.miny)
+      if (st->ctx->Scissor.Y > (GLint)scissor.miny)
          scissor.miny = st->ctx->Scissor.Y;
 
-      if ((GLuint)st->ctx->Scissor.X + st->ctx->Scissor.Width < scissor.maxx)
-         scissor.maxx = st->ctx->Scissor.X + st->ctx->Scissor.Width;
-      if ((GLuint)st->ctx->Scissor.Y + st->ctx->Scissor.Height < scissor.maxy)
-         scissor.maxy = st->ctx->Scissor.Y + st->ctx->Scissor.Height;
+      if (xmax < (GLint) scissor.maxx)
+         scissor.maxx = xmax;
+      if (ymax < (GLint) scissor.maxy)
+         scissor.maxy = ymax;
 
       /* check for null space */
       if (scissor.minx >= scissor.maxx || scissor.miny >= scissor.maxy)
index 524944f73a4ef69bfc8cc39fa526fad6eafa4f7c..de1f6a48ded903a5c048f22d8472303ea2fc155f 100644 (file)
@@ -1735,9 +1735,9 @@ SECTION _DATA public align=16 class=DATA use32 flat
  * If we build with gcc's -fvisibility=hidden flag, we'll need to change
  * the symbol visibility mode to 'default'.
  */
-#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__)
+#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)
 #  define HIDDEN(x) .hidden x
-#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 && !defined(__DJGPP__) && !defined(__MINGW32__)
+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)
 #  pragma GCC visibility push(default)
 #  define HIDDEN(x) .hidden x
 #else
index 2e640ec95dbf181de8b4c8d4f15377be1969b43f..8030fdf90bda5f64cc6cd0524f9799c270af4581 100644 (file)
@@ -46,7 +46,7 @@
 
 #define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))
 
-#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__)
+#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)
 #define GLOBL_FN(x) GLOBL x ; .type x, function
 #else
 #define GLOBL_FN(x) GLOBL x
index 92b1c2d902d6dae5259712054bdaae6a9bc2a0d6..3886a510bbc789743f67988881787c48551dd227 100644 (file)
@@ -31,7 +31,7 @@
  */
 
        .file   "read_rgba_span_x86.S"
-#if !defined(__DJGPP__) && !defined(__MINGW32__) /* this one cries for assyntax.h */
+#if !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__) /* this one cries for assyntax.h */
 /* Kevin F. Quinn 2nd July 2006
  * Replaced data segment constants with text-segment instructions.
  */
@@ -671,7 +671,7 @@ _generic_read_RGBA_span_RGB565_MMX:
        emms
 #endif
        ret
-#endif /* !defined(__DJGPP__) && !defined(__MINGW32__) */
+#endif /* !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__) */
        
 #if defined (__ELF__) && defined (__linux__)
        .section .note.GNU-stack,"",%progbits