[Mesa-dev] [PATCH 17/17] intel: Remove the last spans code!

Eric Anholt eric at anholt.net
Mon Apr 22 09:14:58 PDT 2013


The remaining bits happen to do nothing that
_swrast_span_render_start()/finish() don't do.
---
 src/mesa/drivers/dri/i915/Makefile.sources     |    1 -
 src/mesa/drivers/dri/i915/i830_context.c       |    2 -
 src/mesa/drivers/dri/i915/i915_context.c       |    3 -
 src/mesa/drivers/dri/i915/intel_tris.c         |   13 ++--
 src/mesa/drivers/dri/i965/Makefile.sources     |    1 -
 src/mesa/drivers/dri/i965/brw_context.c        |    3 -
 src/mesa/drivers/dri/intel/intel_fbo.c         |    1 -
 src/mesa/drivers/dri/intel/intel_mipmap_tree.c |    1 -
 src/mesa/drivers/dri/intel/intel_span.c        |   89 ------------------------
 src/mesa/drivers/dri/intel/intel_span.h        |   39 -----------
 src/mesa/drivers/dri/intel/intel_tex_image.c   |    1 -
 11 files changed, 6 insertions(+), 148 deletions(-)
 delete mode 100644 src/mesa/drivers/dri/intel/intel_span.c
 delete mode 100644 src/mesa/drivers/dri/intel/intel_span.h

diff --git a/src/mesa/drivers/dri/i915/Makefile.sources b/src/mesa/drivers/dri/i915/Makefile.sources
index 183a1da..fc5a941 100644
--- a/src/mesa/drivers/dri/i915/Makefile.sources
+++ b/src/mesa/drivers/dri/i915/Makefile.sources
@@ -41,7 +41,6 @@ i915_FILES = \
 	i915_vtbl.c \
 	intel_context.c \
 	intel_screen.c \
-	intel_span.c \
 	intel_state.c \
 	intel_syncobj.c \
 	intel_tris.c \
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index 524e7cb..1b33a2d 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -34,7 +34,6 @@
 #include "tnl/t_vertex.h"
 #include "tnl/t_context.h"
 #include "tnl/t_pipeline.h"
-#include "intel_span.h"
 #include "intel_tris.h"
 #include "../glsl/ralloc.h"
 
@@ -87,7 +86,6 @@ i830CreateContext(int api,
    _math_matrix_ctr(&intel->ViewportMatrix);
 
    /* Initialize swrast, tnl driver tables: */
-   intelInitSpanFuncs(ctx);
    intelInitTriFuncs(ctx);
 
    /* Install the customized pipeline: */
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 133f339..609317c 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -44,8 +44,6 @@
 #include "i915_reg.h"
 #include "i915_program.h"
 
-#include "intel_span.h"
-
 /***************************************
  * Mesa's Driver Functions
  ***************************************/
@@ -181,7 +179,6 @@ i915CreateContext(int api,
    _math_matrix_ctr(&intel->ViewportMatrix);
 
    /* Initialize swrast, tnl driver tables: */
-   intelInitSpanFuncs(ctx);
    intelInitTriFuncs(ctx);
 
    /* Install the customized pipeline: */
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 30eb6ac..7c60d84 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -52,7 +52,6 @@
 #include "intel_batchbuffer.h"
 #include "intel_buffers.h"
 #include "intel_reg.h"
-#include "intel_span.h"
 #include "i830_context.h"
 #include "i830_reg.h"
 #include "i915_context.h"
@@ -808,9 +807,9 @@ intel_fallback_tri(struct intel_context *intel,
    _swsetup_Translate(ctx, v0, &v[0]);
    _swsetup_Translate(ctx, v1, &v[1]);
    _swsetup_Translate(ctx, v2, &v[2]);
-   intelSpanRenderStart(ctx);
+   _swrast_render_start(ctx);
    _swrast_Triangle(ctx, &v[0], &v[1], &v[2]);
-   intelSpanRenderFinish(ctx);
+   _swrast_render_finish(ctx);
 }
 
 
@@ -828,9 +827,9 @@ intel_fallback_line(struct intel_context *intel,
 
    _swsetup_Translate(ctx, v0, &v[0]);
    _swsetup_Translate(ctx, v1, &v[1]);
-   intelSpanRenderStart(ctx);
+   _swrast_render_start(ctx);
    _swrast_Line(ctx, &v[0], &v[1]);
-   intelSpanRenderFinish(ctx);
+   _swrast_render_finish(ctx);
 }
 
 static void
@@ -846,9 +845,9 @@ intel_fallback_point(struct intel_context *intel,
    INTEL_FIREVERTICES(intel);
 
    _swsetup_Translate(ctx, v0, &v[0]);
-   intelSpanRenderStart(ctx);
+   _swrast_render_start(ctx);
    _swrast_Point(ctx, &v[0]);
-   intelSpanRenderFinish(ctx);
+   _swrast_render_finish(ctx);
 }
 
 
diff --git a/src/mesa/drivers/dri/i965/Makefile.sources b/src/mesa/drivers/dri/i965/Makefile.sources
index be8d630..4e21824 100644
--- a/src/mesa/drivers/dri/i965/Makefile.sources
+++ b/src/mesa/drivers/dri/i965/Makefile.sources
@@ -14,7 +14,6 @@ i965_FILES = \
 	intel_regions.c \
 	intel_resolve_map.c \
 	intel_screen.c \
-	intel_span.c \
 	intel_pixel.c \
 	intel_pixel_bitmap.c \
 	intel_pixel_copy.c \
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index ceaf325..dd7102d 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -47,7 +47,6 @@
 #include "intel_fbo.h"
 #include "intel_mipmap_tree.h"
 #include "intel_regions.h"
-#include "intel_span.h"
 #include "intel_tex.h"
 #include "intel_tex_obj.h"
 
@@ -147,8 +146,6 @@ brwCreateContext(int api,
    brw_init_surface_formats(brw);
 
    /* Initialize swrast, tnl driver tables: */
-   intelInitSpanFuncs(ctx);
-
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    if (tnl)
       tnl->Driver.RunPipeline = _tnl_run_pipeline;
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 21c30f8..9fcee14 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -48,7 +48,6 @@
 #include "intel_mipmap_tree.h"
 #include "intel_regions.h"
 #include "intel_tex.h"
-#include "intel_span.h"
 #ifndef I915
 #include "brw_context.h"
 #endif
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 126970e..326731c 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -34,7 +34,6 @@
 #include "intel_mipmap_tree.h"
 #include "intel_regions.h"
 #include "intel_resolve_map.h"
-#include "intel_span.h"
 #include "intel_tex_layout.h"
 #include "intel_tex.h"
 #include "intel_blit.h"
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
deleted file mode 100644
index 940f3c2..0000000
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/**************************************************************************
- * 
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
- * Copyright 2011 Intel Corporation
- * 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, 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.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * 
- * Authors:
- *     Chad Versace <chad at chad-versace.us>
- *
- **************************************************************************/
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "main/glheader.h"
-#include "main/macros.h"
-#include "main/mtypes.h"
-#include "main/colormac.h"
-#include "main/renderbuffer.h"
-
-#include "intel_buffers.h"
-#include "intel_fbo.h"
-#include "intel_mipmap_tree.h"
-#include "intel_screen.h"
-#include "intel_span.h"
-#include "intel_regions.h"
-#include "intel_tex.h"
-
-#include "swrast/swrast.h"
-#include "swrast/s_renderbuffer.h"
-
-/**
- * Prepare for software rendering.  Map current read/draw framebuffers'
- * renderbuffers and all currently bound texture objects.
- */
-void
-intelSpanRenderStart(struct gl_context * ctx)
-{
-   struct intel_context *intel = intel_context(ctx);
-
-   intel_flush(ctx);
-   intel_prepare_render(intel);
-   intel_flush(ctx);
-
-   _swrast_map_textures(ctx);
-   _swrast_map_renderbuffers(ctx);
-}
-
-/**
- * Called when done software rendering.  Unmap the buffers we mapped in
- * the above function.
- */
-void
-intelSpanRenderFinish(struct gl_context * ctx)
-{
-   _swrast_flush(ctx);
-   _swrast_unmap_textures(ctx);
-   _swrast_unmap_renderbuffers(ctx);
-}
-
-
-void
-intelInitSpanFuncs(struct gl_context * ctx)
-{
-   struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
-   if (swdd) {
-      swdd->SpanRenderStart = intelSpanRenderStart;
-      swdd->SpanRenderFinish = intelSpanRenderFinish;
-   }
-}
diff --git a/src/mesa/drivers/dri/intel/intel_span.h b/src/mesa/drivers/dri/intel/intel_span.h
deleted file mode 100644
index ba49df9..0000000
--- a/src/mesa/drivers/dri/intel/intel_span.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/**************************************************************************
- * 
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
- * 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, 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.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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.
- * 
- **************************************************************************/
-
-#ifndef _INTEL_SPAN_H
-#define _INTEL_SPAN_H
-
-#include "main/formats.h"
-#include <stdbool.h>
-
-extern void intelInitSpanFuncs(struct gl_context * ctx);
-
-extern void intelSpanRenderFinish(struct gl_context * ctx);
-extern void intelSpanRenderStart(struct gl_context * ctx);
-
-#endif
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index bedc1fa..4e307f8 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -21,7 +21,6 @@
 #include "intel_tex.h"
 #include "intel_blit.h"
 #include "intel_fbo.h"
-#include "intel_span.h"
 
 #ifndef I915
 #include "brw_context.h"
-- 
1.7.10.4



More information about the mesa-dev mailing list