aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2008-02-22 18:06:19 -0500
committerKristian Høgsberg <[email protected]>2008-02-22 21:44:00 -0500
commitdd1d66fc4ab5d7064113a2017a431c3461598b91 (patch)
treee09343282afaeddb69547133097a435981239b56 /src/mesa/drivers/dri/i915
parentc99fa92ff84e927c82e1231d96921fda9a2b0852 (diff)
intel: Merge intel_context.c from i915 and i965.
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.c14
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c12
-rw-r--r--src/mesa/drivers/dri/i915/intel_render.c20
3 files changed, 45 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index 2ff8621c42f..240c57c9ad3 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -32,7 +32,11 @@
#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"
/***************************************
* Mesa's Driver Functions
@@ -48,10 +52,12 @@ static void
i830InitDriverFunctions(struct dd_function_table *functions)
{
intelInitDriverFunctions(functions);
+ intelInitPixelFuncs(functions);
i830InitStateFuncs(functions);
i830InitTextureFuncs(functions);
}
+extern const struct tnl_pipeline_stage *intel_pipeline[];
GLboolean
i830CreateContext(const __GLcontextModes * mesaVis,
@@ -74,6 +80,14 @@ i830CreateContext(const __GLcontextModes * mesaVis,
return GL_FALSE;
}
+ /* Initialize swrast, tnl driver tables: */
+ intelInitSpanFuncs(ctx);
+ intelInitTriFuncs(ctx);
+
+ /* Install the customized pipeline: */
+ _tnl_destroy_pipeline(ctx);
+ _tnl_install_pipeline(ctx, intel_pipeline);
+
intel->ctx.Const.MaxTextureUnits = I830_TEX_UNITS;
intel->ctx.Const.MaxTextureImageUnits = I830_TEX_UNITS;
intel->ctx.Const.MaxTextureCoordUnits = I830_TEX_UNITS;
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 49e30141e43..991009e6f65 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -42,6 +42,8 @@
#include "intel_regions.h"
#include "intel_batchbuffer.h"
+#include "intel_tris.h"
+#include "intel_span.h"
/***************************************
* Mesa's Driver Functions
@@ -91,6 +93,7 @@ static void
i915InitDriverFunctions(struct dd_function_table *functions)
{
intelInitDriverFunctions(functions);
+ intelInitPixelFuncs(functions);
i915InitStateFunctions(functions);
i915InitTextureFuncs(functions);
i915InitFragProgFuncs(functions);
@@ -98,6 +101,7 @@ i915InitDriverFunctions(struct dd_function_table *functions)
}
+extern const struct tnl_pipeline_stage *intel_pipeline[];
GLboolean
i915CreateContext(const __GLcontextModes * mesaVis,
@@ -127,6 +131,14 @@ i915CreateContext(const __GLcontextModes * mesaVis,
return GL_FALSE;
}
+ /* Initialize swrast, tnl driver tables: */
+ intelInitSpanFuncs(ctx);
+ intelInitTriFuncs(ctx);
+
+ /* Install the customized pipeline: */
+ _tnl_destroy_pipeline(ctx);
+ _tnl_install_pipeline(ctx, intel_pipeline);
+
ctx->Const.MaxTextureUnits = I915_TEX_UNITS;
ctx->Const.MaxTextureImageUnits = I915_TEX_UNITS;
ctx->Const.MaxTextureCoordUnits = I915_TEX_UNITS;
diff --git a/src/mesa/drivers/dri/i915/intel_render.c b/src/mesa/drivers/dri/i915/intel_render.c
index bcf50324b13..5e6500cfa1b 100644
--- a/src/mesa/drivers/dri/i915/intel_render.c
+++ b/src/mesa/drivers/dri/i915/intel_render.c
@@ -39,6 +39,7 @@
#include "tnl/t_context.h"
#include "tnl/t_vertex.h"
+#include "tnl/t_pipeline.h"
#include "intel_screen.h"
#include "intel_context.h"
@@ -234,7 +235,7 @@ intel_run_render(GLcontext * ctx, struct tnl_pipeline_stage *stage)
return GL_FALSE; /* finished the pipe */
}
-const struct tnl_pipeline_stage _intel_render_stage = {
+static const struct tnl_pipeline_stage _intel_render_stage = {
"intel render",
NULL,
NULL,
@@ -242,3 +243,20 @@ const struct tnl_pipeline_stage _intel_render_stage = {
NULL,
intel_run_render /* run */
};
+
+const struct tnl_pipeline_stage *intel_pipeline[] = {
+ &_tnl_vertex_transform_stage,
+ &_tnl_vertex_cull_stage,
+ &_tnl_normal_transform_stage,
+ &_tnl_lighting_stage,
+ &_tnl_fog_coordinate_stage,
+ &_tnl_texgen_stage,
+ &_tnl_texture_transform_stage,
+ &_tnl_point_attenuation_stage,
+ &_tnl_vertex_program_stage,
+#if 1
+ &_intel_render_stage, /* ADD: unclipped rastersetup-to-dma */
+#endif
+ &_tnl_render_stage,
+ 0,
+};