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 <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Eric Anholt
2012-08-26 15:15:44 -07:00
parent 628dfe9511
commit b0d23b66cf
5 changed files with 20 additions and 18 deletions
+10
View 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;
+10
View 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;
@@ -569,7 +569,6 @@ intelInitDriverFunctions(struct dd_function_table *functions)
intelInitTextureImageFuncs(functions);
intelInitTextureSubImageFuncs(functions);
intelInitTextureCopyImageFuncs(functions);
intelInitStateFuncs(functions);
intelInitClearFuncs(functions);
intelInitBufferFuncs(functions);
intelInitPixelFuncs(functions);
@@ -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
-16
View 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;
}