diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/getstring.c | 4 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 2 |
3 files changed, 8 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; }; diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index abc816ed0d4..b31869e059e 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -1153,6 +1153,8 @@ void st_init_extensions(struct pipe_screen *screen, consts->GLSLZeroInit = options->glsl_zero_init; + consts->VendorOverride = options->force_gl_vendor; + consts->UniformBooleanTrue = consts->NativeIntegers ? ~0U : fui(1.0f); /* Below are the cases which cannot be moved into tables easily. */ |