summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-06-29 17:31:57 +0200
committerNicolai Hähnle <[email protected]>2017-08-02 09:50:58 +0200
commit0f8c5de8690e7c87aa2e24383065efaca7e6fe78 (patch)
tree8d5016c420b51feca47957d001c17d78731d971d /src/gallium/auxiliary
parent1e334a396c3bfac6d2ea2871db9bf5e9abc42934 (diff)
radeonsi: prepare for driver-specific driconf options
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c2
-rw-r--r--src/gallium/auxiliary/target-helpers/drm_helper.h25
-rw-r--r--src/gallium/auxiliary/target-helpers/drm_helper_public.h2
3 files changed, 28 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
index d8d3878bcd5..69a02838cc3 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
@@ -88,7 +88,7 @@ static const struct drm_driver_descriptor driver_descriptors[] = {
{
.driver_name = "radeonsi",
.create_screen = pipe_radeonsi_create_screen,
- .configuration = pipe_default_configuration_query,
+ .configuration = pipe_radeonsi_configuration_query,
},
{
.driver_name = "vmwgfx",
diff --git a/src/gallium/auxiliary/target-helpers/drm_helper.h b/src/gallium/auxiliary/target-helpers/drm_helper.h
index a4fcde385f2..95b4a27111c 100644
--- a/src/gallium/auxiliary/target-helpers/drm_helper.h
+++ b/src/gallium/auxiliary/target-helpers/drm_helper.h
@@ -5,6 +5,7 @@
#include "target-helpers/inline_debug_helper.h"
#include "target-helpers/drm_helper_public.h"
#include "state_tracker/drm_driver.h"
+#include "util/xmlpool.h"
static const struct drm_conf_ret throttle_ret = {
.type = DRM_CONF_INT,
@@ -175,6 +176,24 @@ pipe_radeonsi_create_screen(int fd, const struct pipe_screen_config *config)
return rw ? debug_screen_wrap(rw->screen) : NULL;
}
+const struct drm_conf_ret *
+pipe_radeonsi_configuration_query(enum drm_conf conf)
+{
+ static const struct drm_conf_ret xml_options_ret = {
+ .type = DRM_CONF_POINTER,
+ .val.val_pointer =
+#include "radeonsi/si_driinfo.h"
+ };
+
+ switch (conf) {
+ case DRM_CONF_XML_OPTIONS:
+ return &xml_options_ret;
+ default:
+ break;
+ }
+ return pipe_default_configuration_query(conf);
+}
+
#else
struct pipe_screen *
@@ -184,6 +203,12 @@ pipe_radeonsi_create_screen(int fd, const struct pipe_screen_config *config)
return NULL;
}
+const struct drm_conf_ret *
+pipe_radeonsi_configuration_query(enum drm_conf conf)
+{
+ return NULL;
+}
+
#endif
#ifdef GALLIUM_VMWGFX
diff --git a/src/gallium/auxiliary/target-helpers/drm_helper_public.h b/src/gallium/auxiliary/target-helpers/drm_helper_public.h
index c540d7c58a6..46819131bda 100644
--- a/src/gallium/auxiliary/target-helpers/drm_helper_public.h
+++ b/src/gallium/auxiliary/target-helpers/drm_helper_public.h
@@ -24,6 +24,8 @@ pipe_r600_create_screen(int fd, const struct pipe_screen_config *config);
struct pipe_screen *
pipe_radeonsi_create_screen(int fd, const struct pipe_screen_config *config);
+const struct drm_conf_ret *
+pipe_radeonsi_configuration_query(enum drm_conf conf);
struct pipe_screen *
pipe_vmwgfx_create_screen(int fd, const struct pipe_screen_config *config);