static const GLubyte * intelGetString(struct gl_context * ctx, GLenum name) { const struct brw_context *const brw = brw_context(ctx); switch (name) { case GL_VENDOR: return (GLubyte *) brw_vendor_string; case GL_RENDERER: return (GLubyte *) brw_get_renderer_string(brw->intelScreen->deviceID); default: return NULL; } }
static int brw_query_renderer_string(__DRIscreen *psp, int param, const char **value) { const struct intel_screen *intelScreen = (struct intel_screen *) psp->driverPrivate; switch (param) { case __DRI2_RENDERER_VENDOR_ID: value[0] = brw_vendor_string; return 0; case __DRI2_RENDERER_DEVICE_ID: value[0] = brw_get_renderer_string(intelScreen->deviceID); return 0; default: break; } return -1; }