[Mesa-dev] [PATCH 02/18] i915: Refactor the vendor string out of intelGetString
Ian Romanick
idr at freedesktop.org
Sat Oct 12 00:10:09 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/i915/intel_context.c | 3 ++-
src/mesa/drivers/dri/i915/intel_context.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index d25358b..de3488b 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -62,6 +62,7 @@
int INTEL_DEBUG = (0);
#endif
+const char *const i915_vendor_string = "Intel Open Source Technology Center";
static const GLubyte *
intelGetString(struct gl_context * ctx, GLenum name)
@@ -72,7 +73,7 @@ intelGetString(struct gl_context * ctx, GLenum name)
switch (name) {
case GL_VENDOR:
- return (GLubyte *) "Intel Open Source Technology Center";
+ return (GLubyte *) i915_vendor_string;
break;
case GL_RENDERER:
diff --git a/src/mesa/drivers/dri/i915/intel_context.h b/src/mesa/drivers/dri/i915/intel_context.h
index 6edb189..6b04c49 100644
--- a/src/mesa/drivers/dri/i915/intel_context.h
+++ b/src/mesa/drivers/dri/i915/intel_context.h
@@ -421,6 +421,8 @@ extern int INTEL_DEBUG;
* intel_context.c:
*/
+extern const char *const i915_vendor_string;
+
extern bool intelInitContext(struct intel_context *intel,
int api,
unsigned major_version,
--
1.8.1.4
More information about the mesa-dev
mailing list