summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-08-26 15:15:44 -0700
committerEric Anholt <[email protected]>2012-08-28 11:43:04 -0700
commitb0d23b66cf2514949650bdfa9c918ab2fb1d8986 (patch)
tree3ef0e5d4d8ed4777ef5928eb200d529d397356b9 /src/mesa/drivers/dri
parent628dfe9511c15cc265b103e4752e3ee31b04602b (diff)
intel: Move RenderMode fallback func to i915 driver.
The Fallback field of the context struct doesn't work that way on i965, and it's the only caller of FALLBACK() in the driver. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i915/i830_state.c10
-rw-r--r--src/mesa/drivers/dri/i915/i915_state.c10
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c1
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h1
-rw-r--r--src/mesa/drivers/dri/intel/intel_state.c16
5 files changed, 20 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index 647ba62c03c..cedc58a2d1c 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -1101,6 +1101,15 @@ i830_update_provoking_vertex(struct gl_context * ctx)
}
}
+/* Fallback to swrast for select and feedback.
+ */
+static void
+i830RenderMode(struct gl_context *ctx, GLenum mode)
+{
+ struct intel_context *intel = intel_context(ctx);
+ FALLBACK(intel, INTEL_FALLBACK_RENDERMODE, (mode != GL_RENDER));
+}
+
void
i830InitStateFuncs(struct dd_function_table *functions)
{
@@ -1120,6 +1129,7 @@ i830InitStateFuncs(struct dd_function_table *functions)
functions->LogicOpcode = i830LogicOp;
functions->PointSize = i830PointSize;
functions->PolygonStipple = i830PolygonStipple;
+ functions->RenderMode = i830RenderMode;
functions->Scissor = i830Scissor;
functions->ShadeModel = i830ShadeModel;
functions->StencilFuncSeparate = i830StencilFuncSeparate;
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index 3ab75a9739c..b4557570202 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -1054,6 +1054,15 @@ i915_update_provoking_vertex(struct gl_context * ctx)
}
}
+/* Fallback to swrast for select and feedback.
+ */
+static void
+i915RenderMode(struct gl_context *ctx, GLenum mode)
+{
+ struct intel_context *intel = intel_context(ctx);
+ FALLBACK(intel, INTEL_FALLBACK_RENDERMODE, (mode != GL_RENDER));
+}
+
void
i915InitStateFunctions(struct dd_function_table *functions)
{
@@ -1074,6 +1083,7 @@ i915InitStateFunctions(struct dd_function_table *functions)
functions->PointSize = i915PointSize;
functions->PointParameterfv = i915PointParameterfv;
functions->PolygonStipple = i915PolygonStipple;
+ functions->RenderMode = i915RenderMode;
functions->Scissor = i915Scissor;
functions->ShadeModel = i915ShadeModel;
functions->StencilFuncSeparate = i915StencilFuncSeparate;
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 4b7131b876d..233172f1aef 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -569,7 +569,6 @@ intelInitDriverFunctions(struct dd_function_table *functions)
intelInitTextureImageFuncs(functions);
intelInitTextureSubImageFuncs(functions);
intelInitTextureCopyImageFuncs(functions);
- intelInitStateFuncs(functions);
intelInitClearFuncs(functions);
intelInitBufferFuncs(functions);
intelInitPixelFuncs(functions);
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index ce8cf48eee6..d16101d7c17 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -511,7 +511,6 @@ void intel_init_syncobj_functions(struct dd_function_table *functions);
/* ================================================================
* intel_state.c:
*/
-extern void intelInitStateFuncs(struct dd_function_table *functions);
#define COMPAREFUNC_ALWAYS 0
#define COMPAREFUNC_NEVER 0x1
diff --git a/src/mesa/drivers/dri/intel/intel_state.c b/src/mesa/drivers/dri/intel/intel_state.c
index 80598b7ef64..6a817cdf3f6 100644
--- a/src/mesa/drivers/dri/intel/intel_state.c
+++ b/src/mesa/drivers/dri/intel/intel_state.c
@@ -193,19 +193,3 @@ intel_translate_logic_op(GLenum opcode)
return LOGICOP_SET;
}
}
-
-/* Fallback to swrast for select and feedback.
- */
-static void
-intelRenderMode(struct gl_context *ctx, GLenum mode)
-{
- struct intel_context *intel = intel_context(ctx);
- FALLBACK(intel, INTEL_FALLBACK_RENDERMODE, (mode != GL_RENDER));
-}
-
-
-void
-intelInitStateFuncs(struct dd_function_table *functions)
-{
- functions->RenderMode = intelRenderMode;
-}