+ options->allow_glsl_builtin_variable_redeclaration =
+ driQueryOptionb(optionCache, "allow_glsl_builtin_variable_redeclaration");
+ options->allow_higher_compat_version =
+ driQueryOptionb(optionCache, "allow_higher_compat_version");
+ options->glsl_zero_init = driQueryOptionb(optionCache, "glsl_zero_init");
+ options->force_glsl_abs_sqrt =
+ driQueryOptionb(optionCache, "force_glsl_abs_sqrt");
+ options->allow_glsl_cross_stage_interpolation_mismatch =
+ driQueryOptionb(optionCache, "allow_glsl_cross_stage_interpolation_mismatch");
+
+ driComputeOptionsSha1(optionCache, options->config_options_sha1);
+}
+
+static unsigned
+dri_loader_get_cap(struct dri_screen *screen, enum dri_loader_cap cap)
+{
+ const __DRIdri2LoaderExtension *dri2_loader = screen->sPriv->dri2.loader;
+ const __DRIimageLoaderExtension *image_loader = screen->sPriv->image.loader;
+
+ if (dri2_loader && dri2_loader->base.version >= 4 &&
+ dri2_loader->getCapability)
+ return dri2_loader->getCapability(screen->sPriv->loaderPrivate, cap);
+
+ if (image_loader && image_loader->base.version >= 2 &&
+ image_loader->getCapability)
+ return image_loader->getCapability(screen->sPriv->loaderPrivate, cap);
+
+ return 0;