On Friday, October 24, 2014 07:38:10 PM Ian Romanick wrote: > On 10/23/2014 09:35 AM, Ian Romanick wrote: > > From: Ian Romanick <ian.d.roman...@intel.com> > > > > It was identical to the default implementation in _mesa_new_shader. > > > > Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> > > --- > > src/mesa/drivers/dri/i965/brw_program.c | 1 - > > src/mesa/drivers/dri/i965/brw_shader.cpp | 16 ---------------- > > src/mesa/drivers/dri/i965/brw_wm.h | 1 - > > 3 files changed, 18 deletions(-) > > > > diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c > > index e56ece0..3de96ae 100644 > > --- a/src/mesa/drivers/dri/i965/brw_program.c > > +++ b/src/mesa/drivers/dri/i965/brw_program.c > > @@ -236,7 +236,6 @@ void brwInitFragProgFuncs( struct dd_function_table *functions ) > > functions->IsProgramNative = brwIsProgramNative; > > functions->ProgramStringNotify = brwProgramStringNotify; > > > > - functions->NewShader = brw_new_shader; > > functions->LinkShader = brw_link_shader; > > } > > > > diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp > > index 21dcf2d..56d7f3f 100644 > > --- a/src/mesa/drivers/dri/i965/brw_shader.cpp > > +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp > > @@ -33,22 +33,6 @@ extern "C" { > > #include "glsl/glsl_parser_extras.h" > > #include "main/shaderapi.h" > > > > -struct gl_shader * > > -brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type) > > -{ > > - struct brw_shader *shader; > > - > > - shader = rzalloc(NULL, struct brw_shader); > > Certainly NOT identical to _mesa_new_shader. Surprisingly, only ONE > piglit test failed (khr_debug-push-pop-group_gl) as a result.
Youch. Yeah, that allocates a different structure. If you ran with INTEL_DEBUG=perf, it would probably crash a lot. Moving compiled_once to struct gl_shader and hooking it up elsewhere might not be crazy. Presumably other drivers want to detect state-based recompiles and issue performance warnings as well. Then we could just use gl_shader again.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev