From: Ian Romanick Date: Fri, 11 Oct 2013 19:16:39 +0000 (-0700) Subject: i965: Refactor the vendor string out of intelGetString X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18291251ec3e17967b9df89815c9d2dc92bf41dc;p=mesa.git i965: Refactor the vendor string out of intelGetString This will soon be used in intel_screen.c from a function that doesn't have a gl_context. Signed-off-by: Ian Romanick Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 5321f876478..7adf07289d7 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -94,6 +94,8 @@ brw_query_samples_for_format(struct gl_context *ctx, GLenum target, } } +const char *const brw_vendor_string = "Intel Open Source Technology Center"; + static const GLubyte * intelGetString(struct gl_context * ctx, GLenum name) { @@ -103,8 +105,7 @@ intelGetString(struct gl_context * ctx, GLenum name) switch (name) { case GL_VENDOR: - return (GLubyte *) "Intel Open Source Technology Center"; - break; + return (GLubyte *) brw_vendor_string; case GL_RENDERER: switch (brw->intelScreen->deviceID) { diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 66c74f73cfa..6b15c483b4f 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -1461,6 +1461,8 @@ extern void intelInitClearFuncs(struct dd_function_table *functions); /*====================================================================== * brw_context.c */ +extern const char *const brw_vendor_string; + extern void intelFinish(struct gl_context * ctx); enum {