diff options
author | Axel Davy <[email protected]> | 2014-06-08 19:47:48 -0400 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2014-07-01 13:07:40 +1000 |
commit | 3ecd9e1a93817180fa5b280e5fe11c903cca38ba (patch) | |
tree | f650a9e9d722667c24625d787d7738bdf9a08bb0 /src/mesa/drivers/dri | |
parent | 7ab925a6aafca106e7682dfc21e7c9351380809e (diff) |
loader: Use drirc device_id parameter in complement to DRI_PRIME
DRI_PRIME is not very handy, because you have to launch the executable
with it set, which is not always easy to do.
By using drirc, the user specifies the target executable
and the device to use. After that the program will be launched everytime
on the target device.
For example if .drirc contains:
<driconf>
<device driver="loader">
<application name="Glmark2" executable="glmark2">
<option name="device_id" value="pci-0000_01_00_0" />
</application>
</device>
</driconf>
Then glmark2 will use if possible the render-node of
ID_PATH_TAG pci-0000_01_00_0.
v2: Fix compilation issue
v3: Add "-lm" and rebase.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/common/xmlpool/t_options.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/xmlpool/t_options.h b/src/mesa/drivers/dri/common/xmlpool/t_options.h index 3bf804a171c..fc9e10461c5 100644 --- a/src/mesa/drivers/dri/common/xmlpool/t_options.h +++ b/src/mesa/drivers/dri/common/xmlpool/t_options.h @@ -321,3 +321,17 @@ DRI_CONF_SECTION_BEGIN \ DRI_CONF_OPT_BEGIN_B(always_have_depth_buffer, def) \ DRI_CONF_DESC(en,gettext("Create all visuals with a depth buffer")) \ DRI_CONF_OPT_END + + + +/** + * \brief Initialization configuration options + */ +#define DRI_CONF_SECTION_INITIALIZATION \ +DRI_CONF_SECTION_BEGIN \ + DRI_CONF_DESC(en,gettext("Initialization")) + +#define DRI_CONF_DEVICE_ID_PATH_TAG(def) \ +DRI_CONF_OPT_BEGIN(device_id, string, def) \ + DRI_CONF_DESC(en,gettext("Define the graphic device to use if possible")) \ +DRI_CONF_OPT_END |