Added sunxi graphics backend. No additional libs or blobs required.

This commit is contained in:
vanfanel 2016-01-10 11:04:32 +00:00
parent 0962534491
commit 9831f8f1d0
13 changed files with 7408 additions and 2 deletions

View File

@ -72,7 +72,7 @@ endif
ifeq ($(findstring Haiku,$(OS)),)
LIBS += -lm
DEBUG_FLAG = -g
#DEBUG_FLAG = -g
else
LIBS += -lroot -lnetwork
# stable and nightly haiku builds are stuck on gdb 6.x but we use gcc4
@ -512,6 +512,10 @@ ifeq ($(HAVE_EXYNOS), 1)
DEFINES += $(DRM_CFLAGS) $(EXYNOS_CFLAGS)
endif
ifeq ($(HAVE_SUNXI), 1)
OBJ += gfx/drivers/sunxi_gfx.o gfx/pixman/pixman-arm-neon-asm.o
endif
ifeq ($(HAVE_VG), 1)
OBJ += gfx/drivers/vg.o libretro-common/gfx/math/matrix_3x3.o
DEFINES += $(VG_CFLAGS)

View File

@ -43,6 +43,7 @@ enum
VIDEO_NULL,
VIDEO_OMAP,
VIDEO_EXYNOS,
VIDEO_SUNXI,
AUDIO_RSOUND,
AUDIO_OSS,

1387
gfx/drivers/sunxi_gfx.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,37 @@
/*
* Copyright © 2008 Mozilla Corporation
* Copyright © 2010 Nokia Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Mozilla Corporation not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Mozilla Corporation makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*
* Author: Jeff Muizelaar (jeff@infidigm.net)
*
*/
/* Supplementary macro for setting function attributes */
.macro pixman_asm_function fname
.func fname
.global fname
#ifdef __ELF__
.hidden fname
.type fname, %function
#endif
fname:
.endm

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1153
gfx/pixman/pixman-private.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -59,6 +59,9 @@ static const video_driver_t *video_drivers[] = {
#endif
#ifdef HAVE_EXYNOS
&video_exynos,
#endif
#ifdef HAVE_SUNXI
&video_sunxi,
#endif
&video_null,
NULL,

View File

@ -186,6 +186,7 @@ extern video_driver_t video_sdl2;
extern video_driver_t video_vg;
extern video_driver_t video_omap;
extern video_driver_t video_exynos;
extern video_driver_t video_sunxi;
extern video_driver_t video_null;
enum rarch_display_type

View File

@ -348,6 +348,6 @@ add_define_make OS "$OS"
# Creates config.mk and config.h.
add_define_make GLOBAL_CONFIG_DIR "$GLOBAL_CONFIG_DIR"
VARS="RGUI LAKKA GLUI XMB ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL SDL2 D3D9 DINPUT WINXINPUT DSOUND XAUDIO OPENGL EXYNOS OMAP GLES GLES3 VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG LIBXML2 ZLIB DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE FREETYPE XKBCOMMON XVIDEO X11 XEXT XF86VM XINERAMA WAYLAND MALI_FBDEV VIVANTE_FBDEV NETWORKING NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL STRCASESTR MMAP PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 BSV_MOVIE VIDEOCORE NEON FLOATHARD FLOATSOFTFP UDEV V4L2 AV_CHANNEL_LAYOUT 7ZIP PARPORT"
VARS="RGUI LAKKA GLUI XMB ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL SDL2 D3D9 DINPUT WINXINPUT DSOUND XAUDIO OPENGL EXYNOS SUNXI OMAP GLES GLES3 VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG LIBXML2 ZLIB DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE FREETYPE XKBCOMMON XVIDEO X11 XEXT XF86VM XINERAMA WAYLAND MALI_FBDEV VIVANTE_FBDEV NETWORKING NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL STRCASESTR MMAP PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 BSV_MOVIE VIDEOCORE NEON FLOATHARD FLOATSOFTFP UDEV V4L2 AV_CHANNEL_LAYOUT 7ZIP PARPORT"
create_config_make config.mk $VARS
create_config_header config.h $VARS

View File

@ -25,6 +25,7 @@ HAVE_OMAP=no # Enable OMAP video support
HAVE_XINERAMA=auto # Disable Xinerama support.
HAVE_KMS=auto # Enable KMS context support
HAVE_EXYNOS=no # Enable Exynos video support
HAVE_SUNXI=no # Enable Sunxi video support
HAVE_EGL=auto # Enable EGL context support
HAVE_VG=auto # Enable OpenVG support
HAVE_CG=auto # Enable Cg shader support

View File

@ -155,6 +155,8 @@ const char *config_get_default_video(void)
return "omap";
case VIDEO_EXYNOS:
return "exynos";
case VIDEO_SUNXI:
return "sunxi";
default:
break;
}

View File

@ -1969,6 +1969,12 @@ int setting_data_get_description(const char *label, char *msg,
" \n"
"Performance for software rendered cores \n"
"should be optimal.");
else if (!strcmp(g_settings.video.driver, "sunxi"))
snprintf(msg, sizeof_msg,
" -- Sunxi-G2D Video Driver. \n"
" \n"
"This is a low-level Sunxi video driver. \n"
"Uses the G2D block in Allwinner SoCs.");
else
snprintf(msg, sizeof_msg,
" -- Current Video driver.");