diff options
Diffstat (limited to 'src/gallium/state_trackers/xa')
-rw-r--r-- | src/gallium/state_trackers/xa/Makefile.am | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/xa/xa_priv.h | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/xa/xa_tracker.c | 7 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/xa/Makefile.am b/src/gallium/state_trackers/xa/Makefile.am index 7d0b366e639..72486b9816c 100644 --- a/src/gallium/state_trackers/xa/Makefile.am +++ b/src/gallium/state_trackers/xa/Makefile.am @@ -29,6 +29,9 @@ AM_CFLAGS = \ $(VISIBILITY_CFLAGS) AM_CPPFLAGS = \ + $(GALLIUM_PIPE_LOADER_DEFINES) \ + -DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \ + -I$(top_srcdir)/src/gallium/targets/xa \ -I$(top_srcdir)/src/gallium/ \ -I$(top_srcdir)/src/gallium/winsys \ -I$(top_srcdir)/src/gallium/drivers diff --git a/src/gallium/state_trackers/xa/xa_priv.h b/src/gallium/state_trackers/xa/xa_priv.h index ee182e79222..b99c2144eb4 100644 --- a/src/gallium/state_trackers/xa/xa_priv.h +++ b/src/gallium/state_trackers/xa/xa_priv.h @@ -74,6 +74,7 @@ struct xa_tracker { unsigned int format_map[XA_LAST_SURFACE_TYPE][2]; int d_depth_bits_last; int ds_depth_bits_last; + struct pipe_loader_device *dev; struct pipe_screen *screen; struct xa_context *default_ctx; }; diff --git a/src/gallium/state_trackers/xa/xa_tracker.c b/src/gallium/state_trackers/xa/xa_tracker.c index cda6501fcd4..d3601c6bfd3 100644 --- a/src/gallium/state_trackers/xa/xa_tracker.c +++ b/src/gallium/state_trackers/xa/xa_tracker.c @@ -30,6 +30,7 @@ #include "xa_priv.h" #include "pipe/p_state.h" #include "pipe/p_format.h" +#include "pipe-loader/pipe_loader.h" #include "state_tracker/drm_driver.h" #include "util/u_inlines.h" @@ -143,7 +144,8 @@ xa_tracker_create(int drm_fd) if (!xa) return NULL; - xa->screen = driver_descriptor.create_screen(drm_fd); + if (pipe_loader_drm_probe_fd(&xa->dev, drm_fd, false)) + xa->screen = pipe_loader_create_screen(xa->dev, PIPE_SEARCH_DIR); if (!xa->screen) goto out_no_screen; @@ -190,6 +192,8 @@ xa_tracker_create(int drm_fd) out_no_pipe: xa->screen->destroy(xa->screen); out_no_screen: + if (xa->dev) + pipe_loader_release(&xa->dev, 1); free(xa); return NULL; } @@ -200,6 +204,7 @@ xa_tracker_destroy(struct xa_tracker *xa) free(xa->supported_formats); xa_context_destroy(xa->default_ctx); xa->screen->destroy(xa->screen); + pipe_loader_release(&xa->dev, 1); free(xa); } |