summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
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/i915
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/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i830_state.c10
-rw-r--r--src/mesa/drivers/dri/i915/i915_state.c10
2 files changed, 20 insertions, 0 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;