mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 07:58:07 +02:00
targets/dri-vmwgfx: Convert to static/shared pipe-drivers
Convert the final hardware driver to a single dri provider which includes all the pipe-drivers. Update the scons build and drop the unused vmw_powf.c. Cc: José Fonseca <jfonseca@vmware.com> Cc: Brian Paul <brianp@vmware.com> Cc: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
This commit is contained in:
parent
100e654b25
commit
37b7a76266
9 changed files with 19 additions and 130 deletions
|
|
@ -1919,7 +1919,7 @@ if test -n "$with_gallium_drivers"; then
|
|||
HAVE_GALLIUM_SVGA=yes
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga softpipe"
|
||||
gallium_require_drm_loader
|
||||
gallium_check_st "svga/drm" "dri-vmwgfx" "xa/vmwgfx"
|
||||
gallium_check_st "svga/drm" "dri/vmwgfx" "xa/vmwgfx"
|
||||
;;
|
||||
xi915)
|
||||
HAVE_GALLIUM_I915=yes
|
||||
|
|
@ -2209,7 +2209,6 @@ AC_CONFIG_FILES([Makefile
|
|||
src/gallium/state_trackers/xvmc/Makefile
|
||||
src/gallium/targets/Makefile
|
||||
src/gallium/targets/dri-swrast/Makefile
|
||||
src/gallium/targets/dri-vmwgfx/Makefile
|
||||
src/gallium/targets/dri/Makefile
|
||||
src/gallium/targets/egl-static/Makefile
|
||||
src/gallium/targets/gbm/Makefile
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ if not env['embedded']:
|
|||
if env['dri']:
|
||||
SConscript([
|
||||
'targets/dri-swrast/SConscript',
|
||||
'targets/dri-vmwgfx/SConscript',
|
||||
'targets/dri/SConscript',
|
||||
])
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ env.Append(CPPPATH = [
|
|||
xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h
|
||||
])
|
||||
|
||||
env.Append(CPPDEFINES = [('SPLIT_TARGETS', '1')])
|
||||
env.Append(CPPDEFINES = [('GALLIUM_STATIC_TARGETS', '1')])
|
||||
|
||||
st_dri = env.ConvenienceLibrary(
|
||||
target = 'st_dri',
|
||||
|
|
|
|||
|
|
@ -58,12 +58,6 @@ if HAVE_CLOVER
|
|||
SUBDIRS += opencl
|
||||
endif
|
||||
|
||||
if HAVE_GALLIUM_SVGA
|
||||
if HAVE_DRI2
|
||||
SUBDIRS += dri-vmwgfx
|
||||
endif
|
||||
endif
|
||||
|
||||
if HAVE_GALLIUM_SOFTPIPE
|
||||
if HAVE_DRISW
|
||||
SUBDIRS += dri-swrast
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
# Copyright © 2012 Intel Corporation
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice (including the next
|
||||
# paragraph) shall be included in all copies or substantial portions of the
|
||||
# Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
include $(top_srcdir)/src/gallium/Automake.inc
|
||||
|
||||
AM_CFLAGS = \
|
||||
$(GALLIUM_DRI_CFLAGS)
|
||||
AM_CPPFLAGS = \
|
||||
-DGALLIUM_RBUG \
|
||||
-DGALLIUM_TRACE
|
||||
|
||||
dridir = $(DRI_DRIVER_INSTALL_DIR)
|
||||
dri_LTLIBRARIES = vmwgfx_dri.la
|
||||
|
||||
nodist_EXTRA_vmwgfx_dri_la_SOURCES = dummy.cpp
|
||||
vmwgfx_dri_la_SOURCES = \
|
||||
target.c \
|
||||
vmw_powf.c
|
||||
|
||||
vmwgfx_dri_la_LDFLAGS = $(GALLIUM_DRI_LINKER_FLAGS)
|
||||
|
||||
vmwgfx_dri_la_LIBADD = \
|
||||
$(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
|
||||
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
|
||||
$(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
|
||||
$(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la \
|
||||
$(top_builddir)/src/gallium/drivers/trace/libtrace.la \
|
||||
$(top_builddir)/src/gallium/drivers/rbug/librbug.la \
|
||||
$(top_builddir)/src/gallium/drivers/svga/libsvga.la \
|
||||
$(GALLIUM_DRI_LIB_DEPS)
|
||||
|
||||
include $(top_srcdir)/install-gallium-links.mk
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
|
||||
#include "target-helpers/inline_wrapper_sw_helper.h"
|
||||
#include "target-helpers/inline_debug_helper.h"
|
||||
#include "state_tracker/drm_driver.h"
|
||||
#include "svga/drm/svga_drm_public.h"
|
||||
#include "svga/svga_public.h"
|
||||
|
||||
static struct pipe_screen *
|
||||
create_screen(int fd)
|
||||
{
|
||||
struct svga_winsys_screen *sws;
|
||||
struct pipe_screen *screen;
|
||||
|
||||
sws = svga_drm_winsys_screen_create(fd);
|
||||
if (!sws)
|
||||
return NULL;
|
||||
|
||||
screen = svga_screen_create(sws);
|
||||
if (!screen)
|
||||
return NULL;
|
||||
|
||||
screen = sw_screen_wrap(screen);
|
||||
|
||||
screen = debug_screen_wrap(screen);
|
||||
|
||||
return screen;
|
||||
}
|
||||
|
||||
static const struct drm_conf_ret throttle_ret = {
|
||||
.type = DRM_CONF_INT,
|
||||
.val.val_int = 2,
|
||||
};
|
||||
|
||||
static const struct drm_conf_ret share_fd_ret = {
|
||||
.type = DRM_CONF_BOOL,
|
||||
.val.val_int = true,
|
||||
};
|
||||
|
||||
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
|
||||
{
|
||||
switch (conf) {
|
||||
case DRM_CONF_THROTTLE:
|
||||
return &throttle_ret;
|
||||
case DRM_CONF_SHARE_FD:
|
||||
return &share_fd_ret;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen, drm_configuration)
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
/**
|
||||
* Powf may leave an unresolved symbol pointing to a libstdc++.so powf.
|
||||
* However, not all libstdc++.so include this function, so optionally
|
||||
* replace the powf function with calls to expf and logf.
|
||||
*/
|
||||
|
||||
#ifdef VMW_RESOLVE_POWF
|
||||
|
||||
extern float expf(float x);
|
||||
extern float logf(float x);
|
||||
extern float powf(float x, float y);
|
||||
|
||||
float powf(float x, float y) {
|
||||
return expf(logf(x)*y);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -111,6 +111,14 @@ STATIC_TARGET_LIB_DEPS += \
|
|||
$(RADEON_LIBS)
|
||||
endif
|
||||
|
||||
if HAVE_GALLIUM_SVGA
|
||||
MEGADRIVERS += vmwgfx
|
||||
STATIC_TARGET_CPPFLAGS += -DGALLIUM_VMWGFX
|
||||
STATIC_TARGET_LIB_DEPS += \
|
||||
$(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
|
||||
$(top_builddir)/src/gallium/drivers/svga/libsvga.la
|
||||
endif
|
||||
|
||||
if HAVE_GALLIUM_FREEDRENO
|
||||
MEGADRIVERS += freedreno
|
||||
STATIC_TARGET_CPPFLAGS += -DGALLIUM_FREEDRENO
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ if env['suncc']:
|
|||
print 'warning: not building dri-vmwgfx'
|
||||
Return()
|
||||
|
||||
env.Append(CPPPATH = [
|
||||
'#/src/loader',
|
||||
])
|
||||
|
||||
if env['build'] == 'release':
|
||||
env.Append(CPPDEFINES = ['GALLIUM_RBUG'])
|
||||
env.Prepend(LIBS = [rbug])
|
||||
|
|
@ -13,11 +17,15 @@ else:
|
|||
env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_RBUG', 'GALLIUM_GALAHAD', 'GALLIUM_SOFTPIPE'])
|
||||
env.Prepend(LIBS = [trace, rbug, galahad, softpipe, ws_wrapper])
|
||||
|
||||
env.Append(CPPDEFINES = [
|
||||
'GALLIUM_VMWGFX',
|
||||
])
|
||||
|
||||
env.Prepend(LIBS = [
|
||||
st_dri,
|
||||
svgadrm,
|
||||
svga,
|
||||
libloader,
|
||||
mesa,
|
||||
glsl,
|
||||
gallium,
|
||||
Loading…
Add table
Reference in a new issue