summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-10-11 12:16:39 -0700
committerIan Romanick <[email protected]>2013-11-07 18:08:15 -0800
commit18291251ec3e17967b9df89815c9d2dc92bf41dc (patch)
tree296786f377dea957ea4b853b22fd31444299f27f /src/mesa/drivers/dri
parent135b7e72601ab0c3923cafedcd30bb505e54f624 (diff)
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h2
2 files changed, 5 insertions, 2 deletions
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 {