summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_loader.cpp
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-06-29 14:37:07 -0500
committerTim Rowley <[email protected]>2017-07-11 13:38:20 -0500
commitf50aa21456d82c8cb6fbaa565835f1acc1720a5d (patch)
tree1d646268c57b3c42bdeee271d3243964fc6e45ab /src/gallium/drivers/swr/swr_loader.cpp
parent50cd222116b40e4df2462cb25a92960d557c9144 (diff)
swr: build driver proper separate from rasterizer
swr used to build and link the rasterizer to the driver, and to support multiple architectures we needed to have multiple versions of the driver/rasterizer combination, which needed to link in much of mesa. Changing to having one instance of the driver and just building architecture specific versions of the rasterizer gives a large reduction in disk space. libGL.so 6464 Kb -> 7000 Kb libswrAVX.so 10068 Kb -> 5432 Kb libswrAVX2.so 9828 Kb -> 5200 Kb Total 26360 Kb -> 17632 Kb Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_loader.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_loader.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gallium/drivers/swr/swr_loader.cpp b/src/gallium/drivers/swr/swr_loader.cpp
index 4d71a671044..d56fb0e59fb 100644
--- a/src/gallium/drivers/swr/swr_loader.cpp
+++ b/src/gallium/drivers/swr/swr_loader.cpp
@@ -24,13 +24,10 @@
#include "util/u_cpu_detect.h"
#include "util/u_dl.h"
#include "swr_public.h"
-
-#include "pipe/p_screen.h"
+#include "swr_screen.h"
#include <stdio.h>
-typedef pipe_screen *(*screen_create_proc)(struct sw_winsys *winsys);
-
struct pipe_screen *
swr_create_screen(struct sw_winsys *winsys)
{
@@ -57,16 +54,17 @@ swr_create_screen(struct sw_winsys *winsys)
exit(-1);
}
- util_dl_proc pScreenProc = util_dl_get_proc_address(pLibrary, "swr_create_screen_internal");
+ util_dl_proc pApiProc = util_dl_get_proc_address(pLibrary, "SwrGetInterface");
- if (!pScreenProc) {
+ if (!pApiProc) {
fprintf(stderr, "SWR library search failure: %s\n", util_dl_error());
exit(-1);
}
- screen_create_proc pScreenCreate = (screen_create_proc)pScreenProc;
+ struct pipe_screen *screen = swr_create_screen_internal(winsys);
+ swr_screen(screen)->pfnSwrGetInterface = (PFNSwrGetInterface)pApiProc;
- return pScreenCreate(winsys);
+ return screen;
}