[Mesa-dev] [PATCH 03/18] i965: Refactor the vendor string out of intelGetString
Ian Romanick
idr at freedesktop.org
Sat Oct 12 00:10:10 CEST 2013
From: Ian Romanick <ian.d.romanick at intel.com>
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 at intel.com>
---
src/mesa/drivers/dri/i965/intel_context.c | 3 ++-
src/mesa/drivers/dri/i965/intel_context.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c
index 850d9a0..cd69f00 100644
--- a/src/mesa/drivers/dri/i965/intel_context.c
+++ b/src/mesa/drivers/dri/i965/intel_context.c
@@ -59,6 +59,7 @@
int INTEL_DEBUG = (0);
#endif
+const char *const brw_vendor_string = "Intel Open Source Technology Center";
static const GLubyte *
intelGetString(struct gl_context * ctx, GLenum name)
@@ -69,7 +70,7 @@ intelGetString(struct gl_context * ctx, GLenum name)
switch (name) {
case GL_VENDOR:
- return (GLubyte *) "Intel Open Source Technology Center";
+ return (GLubyte *) brw_vendor_string;
break;
case GL_RENDERER:
diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h
index f35dafa..a66483a 100644
--- a/src/mesa/drivers/dri/i965/intel_context.h
+++ b/src/mesa/drivers/dri/i965/intel_context.h
@@ -239,6 +239,8 @@ extern int INTEL_DEBUG;
* intel_context.c:
*/
+extern const char *const brw_vendor_string;
+
extern bool intelInitContext(struct brw_context *brw,
int api,
unsigned major_version,
--
1.8.1.4
More information about the mesa-dev
mailing list