intel: Move RenderMode fallback func to i915 driver.
authorEric Anholt <eric@anholt.net>
Sun, 26 Aug 2012 22:15:44 +0000 (15:15 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 28 Aug 2012 18:43:04 +0000 (11:43 -0700)
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 <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i915/i830_state.c
src/mesa/drivers/dri/i915/i915_state.c
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_context.h
src/mesa/drivers/dri/intel/intel_state.c

index 647ba62c03c409b121516123faf8d0b3af4004a7..cedc58a2d1cb31956335dd121c6d11a09ccf20c4 100644 (file)
@@ -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;
index 3ab75a9739c7f024cf20bd1094b28d4d7d0113a2..b4557570202ce96702a424b26d5a7e86f2946bc2 100644 (file)
@@ -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;
index 4b7131b876d40f761a96ba62468d61dd759ee662..233172f1aef90d0832bbbf5773ddf8426db8446f 100644 (file)
@@ -569,7 +569,6 @@ intelInitDriverFunctions(struct dd_function_table *functions)
    intelInitTextureImageFuncs(functions);
    intelInitTextureSubImageFuncs(functions);
    intelInitTextureCopyImageFuncs(functions);
-   intelInitStateFuncs(functions);
    intelInitClearFuncs(functions);
    intelInitBufferFuncs(functions);
    intelInitPixelFuncs(functions);
index ce8cf48eee6c616318ba084bfabfe303b2c721a7..d16101d7c17e1b428e799971eb96b7c224885df6 100644 (file)
@@ -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
index 80598b7ef642d661271231c7cd895e1080255156..6a817cdf3f6d263c08d6580824cfe873df6a554b 100644 (file)
@@ -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;
-}