From: Roland Scheidegger Date: Sun, 29 Jul 2007 16:31:36 +0000 (+0200) Subject: fix fallback crashes when driver can't handle frag prog for i915 driver too (untested) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10f5a6ac85fb5f78069b7314e40a2a23e2636192;p=mesa.git fix fallback crashes when driver can't handle frag prog for i915 driver too (untested) --- diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c index d40cf705a35..cf1d0b0c1e3 100644 --- a/src/mesa/drivers/dri/i915/i830_vtbl.c +++ b/src/mesa/drivers/dri/i915/i830_vtbl.c @@ -59,6 +59,11 @@ do { \ #define VRTX_TEX_SET_FMT(n, x) ((x)<<((n)*2)) #define TEXBIND_SET(n, x) ((x)<<((n)*4)) + static void +i830_render_prevalidate(struct intel_context *intel) +{ +} + static void i830_render_start( intelContextPtr intel ) { GLcontext *ctx = &intel->ctx; @@ -531,4 +536,5 @@ void i830InitVtbl( i830ContextPtr i830 ) i830->intel.vtbl.update_texture_state = i830UpdateTextureState; i830->intel.vtbl.emit_flush = i830_emit_flush; i830->intel.vtbl.render_start = i830_render_start; + i830->intel.vtbl.render_prevalidate = i830_render_prevalidate; } diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index cc8a605e505..4ad95cf4e36 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -41,7 +41,8 @@ #include "i915_reg.h" #include "i915_context.h" -static void i915_render_start( intelContextPtr intel ) +static void +i915_render_prevalidate(struct intel_context *intel) { GLcontext *ctx = &intel->ctx; i915ContextPtr i915 = I915_CONTEXT(intel); @@ -54,6 +55,10 @@ static void i915_render_start( intelContextPtr intel ) } } +static void i915_render_start( intelContextPtr intel ) +{ +} + static void i915_reduced_primitive_state( intelContextPtr intel, GLenum rprim ) @@ -454,6 +459,7 @@ void i915InitVtbl( i915ContextPtr i915 ) i915->intel.vtbl.lost_hardware = i915_lost_hardware; i915->intel.vtbl.reduced_primitive_state = i915_reduced_primitive_state; i915->intel.vtbl.render_start = i915_render_start; + i915->intel.vtbl.render_prevalidate = i915_render_prevalidate; i915->intel.vtbl.set_color_region = i915_set_color_region; i915->intel.vtbl.set_z_region = i915_set_z_region; i915->intel.vtbl.update_color_z_regions = i915_update_color_z_regions; diff --git a/src/mesa/drivers/dri/i915/intel_context.h b/src/mesa/drivers/dri/i915/intel_context.h index 3b50107d73f..914533d11be 100644 --- a/src/mesa/drivers/dri/i915/intel_context.h +++ b/src/mesa/drivers/dri/i915/intel_context.h @@ -112,6 +112,7 @@ struct intel_context void (*update_texture_state)( intelContextPtr intel ); void (*render_start)( intelContextPtr intel ); + void (*render_prevalidate) (struct intel_context * intel); void (*set_color_region)( intelContextPtr intel, const intelRegion *reg ); void (*set_z_region)( intelContextPtr intel, const intelRegion *reg ); void (*update_color_z_regions)(intelContextPtr intel, diff --git a/src/mesa/drivers/dri/i915/intel_render.c b/src/mesa/drivers/dri/i915/intel_render.c index d9438ba0fd8..7bc02ba8073 100644 --- a/src/mesa/drivers/dri/i915/intel_render.c +++ b/src/mesa/drivers/dri/i915/intel_render.c @@ -199,6 +199,8 @@ static GLboolean intel_run_render( GLcontext *ctx, struct vertex_buffer *VB = &tnl->vb; GLuint i; + intel->vtbl.render_prevalidate( intel ); + /* Don't handle clipping or indexed vertices. */ if (intel->RenderIndex != 0 || diff --git a/src/mesa/drivers/dri/i915tex/i915_context.h b/src/mesa/drivers/dri/i915tex/i915_context.h index d2713e88f96..3a41d66c148 100644 --- a/src/mesa/drivers/dri/i915tex/i915_context.h +++ b/src/mesa/drivers/dri/i915tex/i915_context.h @@ -308,12 +308,6 @@ extern GLboolean i915CreateContext(const __GLcontextModes * mesaVis, void *sharedContextPrivate); -/*====================================================================== - * i915_texprog.c - */ -extern void i915ValidateTextureProgram(struct i915_context *i915); - - /*====================================================================== * i915_debug.c */