diff options
author | Timothy Arceri <[email protected]> | 2019-08-02 15:13:59 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-08-07 10:12:49 +1000 |
commit | dca119f12c291d7665d72464c92a8bf4328ef38e (patch) | |
tree | 4c2d81ab1b55694930ad0d427cb7d1c7e76e2b6e /src/mesa/main | |
parent | c95e2a1c6ba40f017ca451e862a794d45ddb62cf (diff) |
mesa/gallium: add dric option to allow overriding GL vendor string
Will be used in the following patch.
Reviewed-by: Marek Olšák <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93551
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/getstring.c | 4 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index bd02b9db0b0..4db08f15e28 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -124,6 +124,10 @@ _mesa_GetString( GLenum name ) ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL); + if (ctx->Const.VendorOverride && name == GL_VENDOR) { + return (const GLubyte *) ctx->Const.VendorOverride; + } + /* this is a required driver function */ assert(ctx->Driver.GetString); { diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 30fe50affc0..569e793ca27 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4135,6 +4135,8 @@ struct gl_constants /** GL_ARB_spirv_extensions */ struct spirv_supported_extensions *SpirVExtensions; + + char *VendorOverride; }; |