Mesa (main): gallium/swr: Remove common code and build options
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Dec 7 00:05:02 UTC 2021
Module: Mesa
Branch: main
Commit: e2de00876a7033b6923f912af8d2b0bbd100e113
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e2de00876a7033b6923f912af8d2b0bbd100e113
Author: Jan Zielinski <jan.zielinski at intel.com>
Date: Wed Jun 9 14:16:23 2021 +0200
gallium/swr: Remove common code and build options
This commit removes all OpenSWR references from common Mesa code
and build system.
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>
---
.gitlab-ci.yml | 4 ++--
android/Android.mk | 4 +---
android/mesa3d_cross.mk | 3 +--
meson.build | 12 +++--------
meson_options.txt | 15 +------------
.../auxiliary/target-helpers/inline_sw_helper.h | 12 -----------
src/gallium/auxiliary/target-helpers/sw_helper.h | 14 +-----------
src/gallium/meson.build | 5 -----
src/gallium/targets/dri/meson.build | 4 ++--
src/gallium/targets/libgl-xlib/meson.build | 2 +-
src/gallium/targets/osmesa/meson.build | 3 +--
src/gallium/targets/pipe-loader/meson.build | 2 +-
src/gallium/targets/wgl/wgl.c | 25 +---------------------
13 files changed, 15 insertions(+), 90 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f8a4c577d46..6b7024cc8f5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -773,7 +773,7 @@ debian-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,crocus"
+ GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
VULKAN_DRIVERS: swrast
EXTRA_OPTION: >
-D osmesa=true
@@ -1038,7 +1038,7 @@ debian-clang:
-Wno-error=unused-variable
DRI_LOADERS: >
-D glvnd=true
- GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swr,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
+ GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,swrast,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio-experimental
CC: clang
CXX: clang++
diff --git a/android/Android.mk b/android/Android.mk
index 846907d553f..430b01a26b6 100644
--- a/android/Android.mk
+++ b/android/Android.mk
@@ -44,7 +44,7 @@ LOCAL_HEADER_LIBRARIES := libnativebase_headers hwvulkan_headers libbacktrace_he
MESON_GEN_PKGCONFIGS := backtrace cutils expat hardware libdrm:$(LIBDRM_VERSION) nativewindow sync zlib:1.2.11 libelf
LOCAL_CFLAGS += $(BOARD_MESA3D_CFLAGS)
-ifneq ($(filter swr swrast,$(BOARD_MESA3D_GALLIUM_DRIVERS) $(BOARD_MESA3D_VULKAN_DRIVERS)),)
+ifneq ($(filter swrast,$(BOARD_MESA3D_GALLIUM_DRIVERS) $(BOARD_MESA3D_VULKAN_DRIVERS)),)
ifeq ($(BOARD_MESA3D_FORCE_SOFTPIPE),)
MESON_GEN_LLVM_STUB := true
endif
@@ -85,8 +85,6 @@ endif
ifneq ($(MESON_GEN_LLVM_STUB),)
MESON_LLVM_VERSION := 12.0.0
-# Required for swr gallium target
-MESON_LLVM_IRBUILDER_PATH := external/llvm-project/llvm/include/llvm/IR/IRBuilder.h
LOCAL_SHARED_LIBRARIES += libLLVM12
endif
diff --git a/android/mesa3d_cross.mk b/android/mesa3d_cross.mk
index e211cb8f269..b3cc09496a0 100644
--- a/android/mesa3d_cross.mk
+++ b/android/mesa3d_cross.mk
@@ -257,8 +257,7 @@ ifneq ($(MESON_GEN_LLVM_STUB),)
mkdir -p $(dir $@)/subprojects/llvm/
echo -e "project('llvm', 'cpp', version : '$(MESON_LLVM_VERSION)')\n" \
"dep_llvm = declare_dependency()\n" \
- "has_rtti = false\n" \
- "irbuilder_h = files('$(AOSP_ABSOLUTE_PATH)/$(MESON_LLVM_IRBUILDER_PATH)')" > $(dir $@)/subprojects/llvm/meson.build
+ "has_rtti = false\n" > $(dir $@)/subprojects/llvm/meson.build
endif
$(MESON_GEN_NINJA)
$(MESON_BUILD)
diff --git a/meson.build b/meson.build
index 8b8ffc95aab..53ec2c2ef95 100644
--- a/meson.build
+++ b/meson.build
@@ -66,7 +66,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')
@@ -225,7 +224,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')
@@ -1643,8 +1641,6 @@ elif with_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
@@ -1691,8 +1687,8 @@ 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_gallium_opencl or with_clc or _llvm == 'enabled'
+ with_amd_vk or with_gallium_radeonsi or with_gallium_opencl or with_clc
+ or _llvm == 'enabled'
),
static : not _shared_llvm,
method : _llvm_method,
@@ -1710,8 +1706,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
if cc.get_id() != 'msvc'
@@ -1745,7 +1739,7 @@ if with_llvm
endif
elif with_amd_vk and with_aco_tests
error('ACO tests require LLVM, but LLVM is disabled.')
-elif with_gallium_radeonsi or with_gallium_swr or with_swrast_vk
+elif with_gallium_radeonsi or with_swrast_vk
error('The following drivers require LLVM: RadeonSI, SWR, 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.')
diff --git a/meson_options.txt b/meson_options.txt
index 5278e1760ac..00205d10409 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -75,7 +75,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', 'crocus'
+ 'panfrost', 'iris', 'lima', 'zink', 'd3d12', 'asahi', 'crocus'
],
description : 'List of gallium drivers to build. If this is set to auto all drivers applicable to the target OS/architecture will be built'
)
@@ -412,19 +412,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',
diff --git a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
index 4fb74993d0b..73e8551aa60 100644
--- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
@@ -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_vk(struct sw_winsys *winsys, bool sw_vk)
#if defined(GALLIUM_SOFTPIPE)
(sw_vk ? "" : "softpipe"),
#endif
-#if defined(GALLIUM_SWR)
- (sw_vk ? "" : "swr"),
-#endif
#if defined(GALLIUM_ZINK)
(sw_vk || only_sw) ? "" : "zink",
#endif
diff --git a/src/gallium/auxiliary/target-helpers/sw_helper.h b/src/gallium/auxiliary/target-helpers/sw_helper.h
index 059ae2d4422..eed5eeab0dc 100644
--- a/src/gallium/auxiliary/target-helpers/sw_helper.h
+++ b/src/gallium/auxiliary/target-helpers/sw_helper.h
@@ -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);
@@ -106,9 +97,6 @@ sw_screen_create_vk(struct sw_winsys *winsys, bool sw_vk)
#if defined(GALLIUM_SOFTPIPE)
sw_vk ? "" : "softpipe",
#endif
-#if defined(GALLIUM_SWR)
- sw_vk ? "" : "swr",
-#endif
#if defined(GALLIUM_ZINK)
(sw_vk || only_sw) ? "" : "zink",
#endif
diff --git a/src/gallium/meson.build b/src/gallium/meson.build
index 4da81ddd673..a678dc02705 100644
--- a/src/gallium/meson.build
+++ b/src/gallium/meson.build
@@ -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
diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build
index 948a1b313bd..2d232e51b3c 100644
--- a/src/gallium/targets/dri/meson.build
+++ b/src/gallium/targets/dri/meson.build
@@ -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, driver_crocus
],
# Will be deleted during installation, see install_megadrivers.py
@@ -93,7 +93,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'],
diff --git a/src/gallium/targets/libgl-xlib/meson.build b/src/gallium/targets/libgl-xlib/meson.build
index 0c38586c943..f22c6eefdfb 100644
--- a/src/gallium/targets/libgl-xlib/meson.build
+++ b/src/gallium/targets/libgl-xlib/meson.build
@@ -52,7 +52,7 @@ libgl = shared_library(
libxlib, libws_xlib, libglapi_static,
libgallium, libmesa, 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',
diff --git a/src/gallium/targets/osmesa/meson.build b/src/gallium/targets/osmesa/meson.build
index b29e3ff0340..38fcaca13b9 100644
--- a/src/gallium/targets/osmesa/meson.build
+++ b/src/gallium/targets/osmesa/meson.build
@@ -54,8 +54,7 @@ libosmesa = shared_library(
libmesa, 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',
diff --git a/src/gallium/targets/pipe-loader/meson.build b/src/gallium/targets/pipe-loader/meson.build
index 5e0ce239384..1d38c1a5b1b 100644
--- a/src/gallium/targets/pipe-loader/meson.build
+++ b/src/gallium/targets/pipe-loader/meson.build
@@ -67,7 +67,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
diff --git a/src/gallium/targets/wgl/wgl.c b/src/gallium/targets/wgl/wgl.c
index db8f59813b5..6d976c36654 100644
--- a/src/gallium/targets/wgl/wgl.c
+++ b/src/gallium/targets/wgl/wgl.c
@@ -56,9 +56,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
@@ -70,9 +67,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
@@ -94,13 +88,6 @@ wgl_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);
@@ -142,14 +129,11 @@ wgl_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.
*/
@@ -196,13 +180,6 @@ wgl_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);
More information about the mesa-commit
mailing list