aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c34
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h2
2 files changed, 23 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 7adf07289d7..700230b4932 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -96,29 +96,37 @@ brw_query_samples_for_format(struct gl_context *ctx, GLenum target,
const char *const brw_vendor_string = "Intel Open Source Technology Center";
+const char *
+brw_get_renderer_string(unsigned deviceID)
+{
+ const char *chipset;
+ static char buffer[128];
+
+ switch (deviceID) {
+#undef CHIPSET
+#define CHIPSET(id, symbol, str) case id: chipset = str; break;
+#include "pci_ids/i965_pci_ids.h"
+ default:
+ chipset = "Unknown Intel Chipset";
+ break;
+ }
+
+ (void) driGetRendererString(buffer, chipset, 0);
+ return buffer;
+}
+
static const GLubyte *
intelGetString(struct gl_context * ctx, GLenum name)
{
const struct brw_context *const brw = brw_context(ctx);
- const char *chipset;
- static char buffer[128];
switch (name) {
case GL_VENDOR:
return (GLubyte *) brw_vendor_string;
case GL_RENDERER:
- switch (brw->intelScreen->deviceID) {
-#undef CHIPSET
-#define CHIPSET(id, family, str) case id: chipset = str; break;
-#include "pci_ids/i965_pci_ids.h"
- default:
- chipset = "Unknown Intel Chipset";
- break;
- }
-
- (void) driGetRendererString(buffer, chipset, 0);
- return (GLubyte *) buffer;
+ return
+ (GLubyte *) brw_get_renderer_string(brw->intelScreen->deviceID);
default:
return NULL;
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 6b15c483b4f..8b1cbb34d7b 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1463,6 +1463,8 @@ extern void intelInitClearFuncs(struct dd_function_table *functions);
*/
extern const char *const brw_vendor_string;
+extern const char *brw_get_renderer_string(unsigned deviceID);
+
extern void intelFinish(struct gl_context * ctx);
enum {