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@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>
This commit is contained in:
@@ -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++
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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)
|
||||
|
12
meson.build
12
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.')
|
||||
|
@@ -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',
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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, 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'],
|
||||
|
@@ -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',
|
||||
|
@@ -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',
|
||||
|
@@ -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
|
||||
|
@@ -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,9 +129,6 @@ wgl_screen_create(HDC hDC)
|
||||
#if defined(GALLIUM_LLVMPIPE)
|
||||
"llvmpipe",
|
||||
#endif
|
||||
#if GALLIUM_SWR
|
||||
"swr",
|
||||
#endif
|
||||
#if defined(GALLIUM_SOFTPIPE)
|
||||
"softpipe",
|
||||
#endif
|
||||
@@ -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);
|
||||
|
Reference in New Issue
Block a user