i965: add support for force_gl_vendor
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 6 Aug 2020 04:25:42 +0000 (14:25 +1000)
committerMarge Bot <eric+marge@anholt.net>
Sat, 8 Aug 2020 01:05:53 +0000 (01:05 +0000)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3363
Reviewed-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6198>

src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_screen.c

index e8ec66b98f1e13f01f9f9d6603fdbc2ca5a3fd68..d254002c1a2d8a4e6cf5f186e9d771570d8fadb1 100644 (file)
@@ -923,6 +923,11 @@ brw_process_driconf_options(struct brw_context *brw)
    ctx->Const.AllowGLSLCrossStageInterpolationMismatch =
       driQueryOptionb(options, "allow_glsl_cross_stage_interpolation_mismatch");
 
+   char *vendor_str = driQueryOptionstr(options, "force_gl_vendor");
+   /* not an empty string */
+   if (*vendor_str)
+      ctx->Const.VendorOverride = vendor_str;
+
    ctx->Const.dri_config_options_sha1 = ralloc_array(brw, unsigned char, 20);
    driComputeOptionsSha1(&brw->screen->optionCache,
                          ctx->Const.dri_config_options_sha1);
index b72c247bffba5ff2b95e0b8e963c2c5c16ffb0b1..a57adc9f6870f0a7f8f58ef47f475e553fc56229 100644 (file)
@@ -91,6 +91,7 @@ DRI_CONF_BEGIN
       DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION("false")
       DRI_CONF_FORCE_COMPAT_PROFILE("false")
       DRI_CONF_FORCE_GLSL_ABS_SQRT("false")
+      DRI_CONF_FORCE_GL_VENDOR()
 
       DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")
         DRI_CONF_DESC("Perform code generation at shader link time.")