[Mesa-dev] [PATCH 2/6] intel/common: Add gen_get_pci_device_id_override
Jordan Justen
jordan.l.justen at intel.com
Mon Feb 12 19:35:11 UTC 2018
On 2018-02-12 11:01:01, Scott D Phillips wrote:
> Jordan Justen <jordan.l.justen at intel.com> writes:
>
> > +/**
> > + * Get the overridden PCI ID for the device. This is set with the
> > + * INTEL_DEVID_OVERRIDE environment variable.
> > + *
> > + * Returns -1 if the override is not set.
> > + */
> > +int
> > +gen_get_pci_device_id_override(void)
> > +{
> > + if (geteuid() == getuid()) {
> > + const char *devid_override = getenv("INTEL_DEVID_OVERRIDE");
> > + if (devid_override)
> > + return parse_devid_override(devid_override);
> > + }
> > +
> > + return -1;
>
> Would it maybe make sense to always return -1 ifndef DEBUG or something?
> Is this useful functionality to the world at large?
I don't know if it is useful for release builds, but currently it is
not limited to debug builds in the GL driver.
-Jordan
More information about the mesa-dev
mailing list