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 <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Ian Romanick
2013-10-11 12:16:39 -07:00
parent 135b7e7260
commit 18291251ec
2 changed files with 5 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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 {