Commit 5e3a8b4c authored by Jan Zielinski's avatar Jan Zielinski
Browse files

Remove common code and build options

parent ce6a3512
Pipeline #335392 waiting for manual action with stages
......@@ -732,7 +732,7 @@ meson-gallium:
-D gallium-xa=enabled
-D gallium-nine=true
-D gallium-opencl=disabled
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi"
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi"
VULKAN_DRIVERS: swrast
EXTRA_OPTION: >
-D osmesa=true
......@@ -951,7 +951,7 @@ meson-clang:
DRI_LOADERS: >
-D glvnd=true
DRI_DRIVERS: "auto"
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12"
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12"
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental
CC: clang
CXX: clang++
......
......@@ -40,7 +40,7 @@ LOCAL_STATIC_LIBRARIES := libexpat libarect libelf
LOCAL_HEADER_LIBRARIES := libnativebase_headers hwvulkan_headers libbacktrace_headers
MESON_GEN_PKGCONFIGS := backtrace cutils expat hardware libdrm:2.4.105 nativewindow sync zlib:1.2.11 libelf
ifneq ($(filter swr swrast,$(BOARD_MESA3D_GALLIUM_DRIVERS) $(BOARD_MESA3D_VULKAN_DRIVERS)),)
ifneq ($(filter swrast,$(BOARD_MESA3D_GALLIUM_DRIVERS) $(BOARD_MESA3D_VULKAN_DRIVERS)),)
MESON_GEN_LLVM_STUB := true
endif
......
......@@ -58,7 +58,6 @@ with_aco_tests = get_option('build-aco-tests')
with_glx_read_only_text = get_option('glx-read-only-text')
with_glx_direct = get_option('glx-direct')
with_osmesa = get_option('osmesa')
with_swr_arches = get_option('swr-arches')
with_vulkan_overlay_layer = get_option('vulkan-layers').contains('overlay')
with_vulkan_device_select_layer = get_option('vulkan-layers').contains('device-select')
with_tools = get_option('tools')
......@@ -235,7 +234,6 @@ with_gallium_iris = gallium_drivers.contains('iris')
with_gallium_i915 = gallium_drivers.contains('i915')
with_gallium_svga = gallium_drivers.contains('svga')
with_gallium_virgl = gallium_drivers.contains('virgl')
with_gallium_swr = gallium_drivers.contains('swr')
with_gallium_lima = gallium_drivers.contains('lima')
with_gallium_zink = gallium_drivers.contains('zink')
with_gallium_d3d12 = gallium_drivers.contains('d3d12')
......@@ -588,7 +586,7 @@ dep_dxheaders = null_dep
if with_gallium_d3d12 or with_microsoft_clc
dep_dxheaders = dependency('DirectX-Headers', fallback : ['DirectX-Headers', 'dep_dxheaders'],
required : with_gallium_d3d12
)
)
endif
if with_vulkan_overlay_layer or with_aco_tests
......@@ -1564,8 +1562,6 @@ elif with_microsoft_clc
_llvm_version = '>= 10.0.0'
elif with_gallium_opencl
_llvm_version = '>= 8.0.0'
elif with_gallium_swr
_llvm_version = '>= 6.0.0'
else
_llvm_version = '>= 3.9.0'
endif
......@@ -1612,7 +1608,7 @@ if _llvm != 'disabled'
modules : llvm_modules,
optional_modules : llvm_optional_modules,
required : (
with_amd_vk or with_gallium_radeonsi or with_gallium_swr or
with_amd_vk or with_gallium_radeonsi or
with_gallium_opencl or with_microsoft_clc or _llvm == 'enabled'
),
static : not _shared_llvm,
......@@ -1631,8 +1627,6 @@ if with_llvm
pre_args += '-DDRAW_LLVM_AVAILABLE'
elif with_swrast_vk
error('Lavapipe requires LLVM draw support.')
elif with_gallium_swr
error('SWR requires LLVM draw support.')
endif
# LLVM can be built without rtti, turning off rtti changes the ABI of C++
......@@ -1668,8 +1662,8 @@ if with_llvm
language : ['c', 'cpp'],
)
endif
elif with_amd_vk or with_gallium_radeonsi or with_gallium_swr or with_swrast_vk
error('The following drivers require LLVM: Radv, RadeonSI, SWR, Lavapipe. One of these is enabled, but LLVM is disabled.')
elif with_amd_vk or with_gallium_radeonsi or with_swrast_vk
error('The following drivers require LLVM: Radv, RadeonSI, Lavapipe. One of these is enabled, but LLVM is disabled.')
elif with_gallium_opencl
error('The OpenCL "Clover" state tracker requires LLVM, but LLVM is disabled.')
elif with_microsoft_clc
......
......@@ -67,7 +67,7 @@ option(
choices : [
'auto', 'kmsro', 'radeonsi', 'r300', 'r600', 'nouveau', 'freedreno',
'swrast', 'v3d', 'vc4', 'etnaviv', 'tegra', 'i915', 'svga', 'virgl',
'swr', 'panfrost', 'iris', 'lima', 'zink', 'd3d12', 'asahi'
'panfrost', 'iris', 'lima', 'zink', 'd3d12', 'asahi'
],
description : 'List of gallium drivers to build. If this is set to auto all drivers applicable to the target OS/architecture will be built'
)
......@@ -392,19 +392,6 @@ option(
choices : ['8', '16', '32'],
description : 'Number of channel bits for OSMesa.'
)
option(
'swr-arches',
type : 'array',
value : ['avx', 'avx2'],
choices : ['avx', 'avx2', 'knl', 'skx'],
description : 'Architectures to build SWR support for.',
)
option(
'shared-swr',
type : 'boolean',
value : true,
description : 'Whether to link SWR shared or statically.',
)
option(
'tools',
......
......@@ -8,10 +8,6 @@
#include "frontend/sw_winsys.h"
#include "target-helpers/inline_debug_helper.h"
#ifdef GALLIUM_SWR
#include "swr/swr_public.h"
#endif
/* Helper function to choose and instantiate one of the software rasterizers:
* llvmpipe, softpipe.
*/
......@@ -60,11 +56,6 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver)
screen = softpipe_create_screen(winsys);
#endif
#if defined(GALLIUM_SWR)
if (screen == NULL && strcmp(driver, "swr") == 0)
screen = swr_create_screen(winsys);
#endif
#if defined(GALLIUM_ZINK)
if (screen == NULL && strcmp(driver, "zink") == 0)
screen = zink_create_screen(winsys);
......@@ -102,9 +93,6 @@ sw_screen_create(struct sw_winsys *winsys)
#if defined(GALLIUM_SOFTPIPE)
"softpipe",
#endif
#if defined(GALLIUM_SWR)
"swr",
#endif
#if defined(GALLIUM_ZINK)
only_sw ? "" : "zink",
#endif
......
......@@ -10,7 +10,7 @@
/* Helper function to choose and instantiate one of the software rasterizers:
* llvmpipe, softpipe, swr.
* llvmpipe, softpipe.
*/
#ifdef GALLIUM_ZINK
......@@ -33,10 +33,6 @@
#include "llvmpipe/lp_public.h"
#endif
#ifdef GALLIUM_SWR
#include "swr/swr_public.h"
#endif
#ifdef GALLIUM_VIRGL
#include "virgl/virgl_public.h"
#include "virgl/vtest/virgl_vtest_public.h"
......@@ -65,11 +61,6 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver)
screen = softpipe_create_screen(winsys);
#endif
#if defined(GALLIUM_SWR)
if (screen == NULL && strcmp(driver, "swr") == 0)
screen = swr_create_screen(winsys);
#endif
#if defined(GALLIUM_ZINK)
if (screen == NULL && strcmp(driver, "zink") == 0)
screen = zink_create_screen(winsys);
......@@ -107,9 +98,6 @@ sw_screen_create(struct sw_winsys *winsys)
#if defined(GALLIUM_SOFTPIPE)
"softpipe",
#endif
#if defined(GALLIUM_SWR)
"swr",
#endif
#if defined(GALLIUM_ZINK)
only_sw ? "" : "zink",
#endif
......
......@@ -45,11 +45,6 @@ subdir('winsys/sw/wrapper')
if with_platform_haiku
subdir('winsys/sw/hgl')
endif
if with_gallium_swr
subdir('drivers/swr')
else
driver_swr = declare_dependency()
endif
if with_gallium_softpipe
subdir('drivers/softpipe')
if draw_with_llvm
......
......@@ -57,7 +57,7 @@ libgallium_dri = shared_library(
driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
driver_kmsro, driver_v3d, driver_vc4, driver_freedreno, driver_etnaviv,
driver_tegra, driver_i915, driver_svga, driver_virgl,
driver_swr, driver_panfrost, driver_iris, driver_lima, driver_zink, driver_d3d12,
driver_panfrost, driver_iris, driver_lima, driver_zink, driver_d3d12,
driver_asahi
],
# Will be deleted during installation, see install_megadrivers.py
......@@ -91,7 +91,7 @@ foreach d : [[with_gallium_kmsro, [
[with_gallium_radeonsi, 'radeonsi_dri.so'],
[with_gallium_nouveau, 'nouveau_dri.so'],
[with_gallium_freedreno, ['msm_dri.so', 'kgsl_dri.so']],
[with_gallium_softpipe or with_gallium_swr, 'swrast_dri.so'],
[with_gallium_softpipe, 'swrast_dri.so'],
[with_gallium_softpipe and with_gallium_drisw_kms, 'kms_swrast_dri.so'],
[with_gallium_v3d, 'v3d_dri.so'],
[with_gallium_vc4, 'vc4_dri.so'],
......
......@@ -55,9 +55,6 @@
#include "llvmpipe/lp_public.h"
#endif
#ifdef GALLIUM_SWR
#include "swr/swr_public.h"
#endif
#ifdef GALLIUM_D3D12
#include "d3d12/wgl/d3d12_wgl_public.h"
#endif
......@@ -69,9 +66,6 @@
#ifdef GALLIUM_LLVMPIPE
static boolean use_llvmpipe = FALSE;
#endif
#ifdef GALLIUM_SWR
static boolean use_swr = FALSE;
#endif
#ifdef GALLIUM_D3D12
static boolean use_d3d12 = FALSE;
#endif
......@@ -91,13 +85,6 @@ gdi_screen_create_by_name(HDC hDC, const char* driver, struct sw_winsys *winsys)
use_llvmpipe = TRUE;
}
#endif
#ifdef GALLIUM_SWR
if (strcmp(driver, "swr") == 0) {
screen = swr_create_screen(winsys);
if (screen)
use_swr = TRUE;
}
#endif
#ifdef GALLIUM_D3D12
if (strcmp(driver, "d3d12") == 0) {
screen = d3d12_wgl_create_screen(winsys, hDC);
......@@ -139,14 +126,11 @@ gdi_screen_create(HDC hDC)
#if defined(GALLIUM_LLVMPIPE)
"llvmpipe",
#endif
#if GALLIUM_SWR
"swr",
#endif
#if defined(GALLIUM_SOFTPIPE)
"softpipe",
#endif
};
/* If the default driver screen creation fails, fall back to the next option in the
* sorted list. Don't do this if GALLIUM_DRIVER is specified.
*/
......@@ -191,13 +175,6 @@ gdi_present(struct pipe_screen *screen,
}
#endif
#ifdef GALLIUM_SWR
if (use_swr) {
swr_gdi_swap(screen, ctx, res, hDC);
return;
}
#endif
#ifdef GALLIUM_D3D12
if (use_d3d12) {
d3d12_wgl_present(screen, ctx, res, hDC);
......
......@@ -38,7 +38,7 @@ libopengl32 = shared_library(
libgallium, libglsl, libmesa_gallium, libwsgdi, libglapi_static, libglapi
],
dependencies : [
dep_ws2_32, idep_nir, idep_mesautil, driver_swrast, driver_swr,
dep_ws2_32, idep_nir, idep_mesautil, driver_swrast,
driver_d3d12, driver_zink, winsys_d3d12_wgl
],
link_args : opengl32_link_args,
......
......@@ -52,7 +52,7 @@ libgl = shared_library(
libxlib, libws_xlib, libglapi_static,
libgallium, libmesa_gallium, gallium_xlib_link_with,
],
dependencies : [dep_x11, dep_thread, dep_clock, dep_unwind, driver_swrast, driver_swr, driver_virgl, driver_asahi],
dependencies : [dep_x11, dep_thread, dep_clock, dep_unwind, driver_swrast, driver_virgl, driver_asahi],
install : true,
version : '1.5.0',
darwin_versions: '4.0.0',
......
......@@ -54,8 +54,7 @@ libosmesa = shared_library(
libmesa_gallium, libgallium, libws_null, osmesa_link_with,
],
dependencies : [
dep_ws2_32, dep_selinux, dep_thread, dep_clock, dep_unwind,
driver_swrast, driver_swr,
dep_ws2_32, dep_selinux, dep_thread, dep_clock, dep_unwind, driver_swrast
],
name_prefix : host_machine.system() == 'windows' ? '' : 'lib', # otherwise mingw will create libosmesa.dll
soversion : host_machine.system() == 'windows' ? '' : '8',
......
......@@ -66,7 +66,7 @@ pipe_loaders = [
[with_gallium_freedreno, 'msm', driver_freedreno, []],
[with_gallium_kmsro, 'kmsro', _kmsro_targets, []],
[with_gallium_svga, 'vmwgfx', driver_svga, []],
[with_gallium_softpipe, 'swrast', [driver_swrast, driver_swr], [libwsw, libws_null]],
[with_gallium_softpipe, 'swrast', driver_swrast, [libwsw, libws_null]],
]
foreach x : pipe_loaders
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment