aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfxvideo/Makefile2
-rw-r--r--plugins/dfxvideo/draw_pl.c1
-rw-r--r--plugins/gpu-gles/Makefile2
-rw-r--r--plugins/gpu-gles/gpuDraw.c32
-rw-r--r--plugins/gpu-gles/gpuDraw.h2
-rw-r--r--plugins/gpu-gles/gpuExternals.h4
-rw-r--r--plugins/gpu-gles/gpuPlugin.c6
-rw-r--r--plugins/gpu-gles/gpuPrim.c3
-rw-r--r--plugins/gpu-gles/gpuStdafx.h6
-rw-r--r--plugins/gpu-gles/gpulib_if.c9
-rw-r--r--plugins/gpu_unai/Makefile2
-rw-r--r--plugins/gpu_unai/gpu.cpp1
-rw-r--r--plugins/gpulib/Makefile5
-rw-r--r--plugins/gpulib/cspace.c173
-rw-r--r--plugins/gpulib/cspace.h18
-rw-r--r--plugins/gpulib/cspace_neon.s165
-rw-r--r--plugins/gpulib/gpulib.mak10
-rw-r--r--plugins/gpulib/vout_pl.c4
18 files changed, 47 insertions, 398 deletions
diff --git a/plugins/dfxvideo/Makefile b/plugins/dfxvideo/Makefile
index ee7c4dc..fb879f4 100644
--- a/plugins/dfxvideo/Makefile
+++ b/plugins/dfxvideo/Makefile
@@ -14,6 +14,6 @@ SRC_STANDALONE += draw_pl.c
#LDLIBS_STANDALONE += -lX11 -lXv -lXext
#endif
-BIN_STANDLALONE = gpuPEOPS.so
+#BIN_STANDALONE = gpuPEOPS.so
BIN_GPULIB = gpu_peops.so
include ../gpulib/gpulib.mak
diff --git a/plugins/dfxvideo/draw_pl.c b/plugins/dfxvideo/draw_pl.c
index 61fb94c..37dbfff 100644
--- a/plugins/dfxvideo/draw_pl.c
+++ b/plugins/dfxvideo/draw_pl.c
@@ -9,7 +9,6 @@
#include "gpu.h"
-#include "../gpulib/cspace.h"
#include "../../frontend/plugin_lib.h"
#include "pcnt.h"
diff --git a/plugins/gpu-gles/Makefile b/plugins/gpu-gles/Makefile
index 769a68b..e914764 100644
--- a/plugins/gpu-gles/Makefile
+++ b/plugins/gpu-gles/Makefile
@@ -16,6 +16,6 @@ CFLAGS += $(CFLAGS_GLES)
LDLIBS += $(LDLIBS_GLES)
endif
-BIN_STANDLALONE = gpuGLES.so
+#BIN_STANDALONE = gpuGLES.so
BIN_GPULIB = gpu_gles.so
include ../gpulib/gpulib.mak
diff --git a/plugins/gpu-gles/gpuDraw.c b/plugins/gpu-gles/gpuDraw.c
index b619104..34d1c3b 100644
--- a/plugins/gpu-gles/gpuDraw.c
+++ b/plugins/gpu-gles/gpuDraw.c
@@ -248,9 +248,9 @@ void CreateScanLines(void)
int use_fsaa = 0;
EGLDisplay display;
-EGLConfig config;
-EGLContext context;
EGLSurface surface;
+static EGLConfig config;
+static EGLContext context;
#if defined(USE_X11)
#include "X11/Xlib.h"
@@ -435,10 +435,19 @@ static int initEGL(void)
return 0;
}
-int GLinitialize()
+static int created_gles_context;
+
+int GLinitialize(void *ext_gles_display, void *ext_gles_surface)
{
- if(initEGL()!=0)
- return -1;
+ if(ext_gles_display != NULL && ext_gles_surface != NULL) {
+ display = (EGLDisplay)ext_gles_display;
+ surface = (EGLSurface)ext_gles_surface;
+ }
+ else {
+ if(initEGL()!=0)
+ return -1;
+ created_gles_context=1;
+ }
//----------------------------------------------------//
@@ -448,7 +457,7 @@ int GLinitialize()
iResY-(rRatioRect.top+rRatioRect.bottom),
rRatioRect.right,
rRatioRect.bottom); glError();
-
+
glScissor(0, 0, iResX, iResY); glError(); // init clipping (fullscreen)
glEnable(GL_SCISSOR_TEST); glError();
@@ -532,16 +541,19 @@ void GLcleanup()
{
CleanupTextureStore(); // bye textures
- eglMakeCurrent( display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
- eglDestroySurface( display, surface );
- eglDestroyContext( display, context );
- eglTerminate( display );
+ if(created_gles_context) {
+ eglMakeCurrent( display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
+ eglDestroySurface( display, surface );
+ eglDestroyContext( display, context );
+ eglTerminate( display );
#if defined(USE_X11)
if (x11Window) XDestroyWindow(x11Display, x11Window);
if (x11Colormap) XFreeColormap( x11Display, x11Colormap );
if (x11Display) XCloseDisplay(x11Display);
#endif
+ created_gles_context=0;
+ }
}
////////////////////////////////////////////////////////////////////////
diff --git a/plugins/gpu-gles/gpuDraw.h b/plugins/gpu-gles/gpuDraw.h
index c59927d..a45bf46 100644
--- a/plugins/gpu-gles/gpuDraw.h
+++ b/plugins/gpu-gles/gpuDraw.h
@@ -49,7 +49,7 @@ extern "C" {
BOOL bSetupPixelFormat(HDC hDC);
#endif
-int GLinitialize();
+int GLinitialize(void *ext_gles_display, void *ext_gles_surface);
void GLcleanup();
#ifdef _WINDOWS
BOOL offset2(void);
diff --git a/plugins/gpu-gles/gpuExternals.h b/plugins/gpu-gles/gpuExternals.h
index 897b446..1260167 100644
--- a/plugins/gpu-gles/gpuExternals.h
+++ b/plugins/gpu-gles/gpuExternals.h
@@ -41,6 +41,10 @@ extern "C" {
#include <GLES/glext.h>
#endif
+#ifndef GL_BGRA_EXT
+#define GL_BGRA_EXT GL_RGBA // ??
+#endif
+
#ifdef __NANOGL__
#define glTexParameteri(x,y,z) glTexParameterf(x,y,z)
#define glAlphaFuncx(x,y) glAlphaFunc(x,y)
diff --git a/plugins/gpu-gles/gpuPlugin.c b/plugins/gpu-gles/gpuPlugin.c
index 9d749a5..60570ac 100644
--- a/plugins/gpu-gles/gpuPlugin.c
+++ b/plugins/gpu-gles/gpuPlugin.c
@@ -511,7 +511,7 @@ long CALLBACK GPUopen(int hwndGPU)
// lGPUstatusRet = 0x74000000;
// with some emus, we could do the OGL init right here... oh my
- if(bIsFirstFrame) GLinitialize();
+ if(bIsFirstFrame) GLinitialize(NULL, NULL);
return 0;
}
@@ -1170,7 +1170,7 @@ void CALLBACK GPUwriteStatus(unsigned long gdata)
{
unsigned long lCommand=(gdata>>24)&0xff;
-if(bIsFirstFrame) GLinitialize(); // real ogl startup (needed by some emus)
+if(bIsFirstFrame) GLinitialize(NULL, NULL); // real ogl startup (needed by some emus)
ulStatusControl[lCommand]=gdata;
@@ -2183,7 +2183,7 @@ unsigned long dmaMem;
unsigned char * baseAddrB;
short count;unsigned int DMACommandCounter = 0;
-if(bIsFirstFrame) GLinitialize();
+if(bIsFirstFrame) GLinitialize(NULL, NULL);
GPUIsBusy;
diff --git a/plugins/gpu-gles/gpuPrim.c b/plugins/gpu-gles/gpuPrim.c
index 2f200eb..218ff66 100644
--- a/plugins/gpu-gles/gpuPrim.c
+++ b/plugins/gpu-gles/gpuPrim.c
@@ -44,9 +44,6 @@
// globals
////////////////////////////////////////////////////////////////////////
-EGLSurface surface;
-EGLDisplay display;
-
BOOL bDrawTextured; // current active drawing states
BOOL bDrawSmoothShaded;
diff --git a/plugins/gpu-gles/gpuStdafx.h b/plugins/gpu-gles/gpuStdafx.h
index 69050b3..41051dc 100644
--- a/plugins/gpu-gles/gpuStdafx.h
+++ b/plugins/gpu-gles/gpuStdafx.h
@@ -82,12 +82,6 @@ extern "C" {
#define SHADETEXBIT(x) ((x>>24) & 0x1)
#define SEMITRANSBIT(x) ((x>>25) & 0x1)
-#ifndef _WINDOWS
-#ifndef GL_BGRA_EXT
-#define GL_BGRA_EXT GL_RGBA
-#endif
-#endif
-
#if 0
#define glError() { \
GLenum err = glGetError(); \
diff --git a/plugins/gpu-gles/gpulib_if.c b/plugins/gpu-gles/gpulib_if.c
index 2090553..1f4a23d 100644
--- a/plugins/gpu-gles/gpulib_if.c
+++ b/plugins/gpu-gles/gpulib_if.c
@@ -690,7 +690,7 @@ long GPUopen(void **dpy)
InitializeTextureStore(); // init texture mem
- ret = GLinitialize();
+ ret = GLinitialize(cbs->gles_display, cbs->gles_surface);
MakeDisplayLists();
is_opened = 1;
@@ -726,9 +726,16 @@ void renderer_set_config(const struct rearmed_cbs *cbs_)
bUseFastMdec = cbs->gpu_peopsgl.bUseFastMdec;
iTexGarbageCollection = cbs->gpu_peopsgl.iTexGarbageCollection;
iVRamSize = cbs->gpu_peopsgl.iVRamSize;
+
if (cbs->pl_set_gpu_caps)
cbs->pl_set_gpu_caps(GPU_CAP_OWNS_DISPLAY);
+ if (is_opened && cbs->gles_display != NULL && cbs->gles_surface != NULL) {
+ // HACK..
+ GPUclose();
+ GPUopen(NULL);
+ }
+
set_vram(gpu.vram);
}
diff --git a/plugins/gpu_unai/Makefile b/plugins/gpu_unai/Makefile
index 994997f..1075ee5 100644
--- a/plugins/gpu_unai/Makefile
+++ b/plugins/gpu_unai/Makefile
@@ -11,6 +11,6 @@ ifeq "$(ARCH)" "arm"
SRC += gpu_arm.s
endif
-BIN_STANDLALONE = gpuPCSX4ALL.so
+#BIN_STANDALONE = gpuPCSX4ALL.so
BIN_GPULIB = gpu_unai.so
include ../gpulib/gpulib.mak
diff --git a/plugins/gpu_unai/gpu.cpp b/plugins/gpu_unai/gpu.cpp
index df5e0cf..d509617 100644
--- a/plugins/gpu_unai/gpu.cpp
+++ b/plugins/gpu_unai/gpu.cpp
@@ -819,7 +819,6 @@ void GPU_updateLace(void)
#else
#include "../../frontend/plugin_lib.h"
-#include "../gpulib/cspace.h"
extern "C" {
diff --git a/plugins/gpulib/Makefile b/plugins/gpulib/Makefile
index 4a45aa2..cff6141 100644
--- a/plugins/gpulib/Makefile
+++ b/plugins/gpulib/Makefile
@@ -16,11 +16,6 @@ else
OBJS += vout_pl.o
EXT = $(ARCH).a
endif
-ifeq "$(HAVE_NEON)" "1"
-OBJS += cspace_neon.o
-else
-OBJS += cspace.o
-endif
CFLAGS += $(PLUGIN_CFLAGS)
# need to compile to another dir, same files are compiled
diff --git a/plugins/gpulib/cspace.c b/plugins/gpulib/cspace.c
deleted file mode 100644
index f0c4912..0000000
--- a/plugins/gpulib/cspace.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * (C) Gražvydas "notaz" Ignotas, 2011,2012
- *
- * This work is licensed under the terms of any of these licenses
- * (at your option):
- * - GNU GPL, version 2 or later.
- * - GNU LGPL, version 2.1 or later.
- * See the COPYING file in the top-level directory.
- */
-
-#include "cspace.h"
-
-/*
- * note: these are intended for testing and should be avoided
- * in favor of NEON version or platform-specific conversion
- */
-
-#ifndef __ARM_NEON__
-
-void bgr555_to_rgb565(void *dst_, const void *src_, int bytes)
-{
- const unsigned int *src = src_;
- unsigned int *dst = dst_;
- unsigned int p;
- int x;
-
- for (x = 0; x < bytes / 4; x++) {
- p = src[x];
- p = ((p & 0x7c007c00) >> 10) | ((p & 0x03e003e0) << 1)
- | ((p & 0x001f001f) << 11);
- dst[x] = p;
- }
-}
-
-void bgr888_to_rgb565(void *dst_, const void *src_, int bytes)
-{
- const unsigned char *src = src_;
- unsigned int *dst = dst_;
- unsigned int r1, g1, b1, r2, g2, b2;
-
- for (; bytes >= 6; bytes -= 6, src += 6, dst++) {
- r1 = src[0] & 0xf8;
- g1 = src[1] & 0xfc;
- b1 = src[2] & 0xf8;
- r2 = src[3] & 0xf8;
- g2 = src[4] & 0xfc;
- b2 = src[5] & 0xf8;
- *dst = (r2 << 24) | (g2 << 19) | (b2 << 13) |
- (r1 << 8) | (g1 << 3) | (b1 >> 3);
- }
-}
-
-// TODO?
-void rgb888_to_rgb565(void *dst, const void *src, int bytes) {}
-void bgr888_to_rgb888(void *dst, const void *src, int bytes) {}
-
-#endif // __ARM_NEON__
-
-/* YUV stuff */
-static int yuv_ry[32], yuv_gy[32], yuv_by[32];
-static unsigned char yuv_u[32 * 2], yuv_v[32 * 2];
-
-void bgr_to_uyvy_init(void)
-{
- int i, v;
-
- /* init yuv converter:
- y0 = (int)((0.299f * r0) + (0.587f * g0) + (0.114f * b0));
- y1 = (int)((0.299f * r1) + (0.587f * g1) + (0.114f * b1));
- u = (int)(8 * 0.565f * (b0 - y0)) + 128;
- v = (int)(8 * 0.713f * (r0 - y0)) + 128;
- */
- for (i = 0; i < 32; i++) {
- yuv_ry[i] = (int)(0.299f * i * 65536.0f + 0.5f);
- yuv_gy[i] = (int)(0.587f * i * 65536.0f + 0.5f);
- yuv_by[i] = (int)(0.114f * i * 65536.0f + 0.5f);
- }
- for (i = -32; i < 32; i++) {
- v = (int)(8 * 0.565f * i) + 128;
- if (v < 0)
- v = 0;
- if (v > 255)
- v = 255;
- yuv_u[i + 32] = v;
- v = (int)(8 * 0.713f * i) + 128;
- if (v < 0)
- v = 0;
- if (v > 255)
- v = 255;
- yuv_v[i + 32] = v;
- }
-}
-
-void rgb565_to_uyvy(void *d, const void *s, int pixels)
-{
- unsigned int *dst = d;
- const unsigned short *src = s;
- const unsigned char *yu = yuv_u + 32;
- const unsigned char *yv = yuv_v + 32;
- int r0, g0, b0, r1, g1, b1;
- int y0, y1, u, v;
-
- for (; pixels > 0; src += 2, dst++, pixels -= 2)
- {
- r0 = (src[0] >> 11) & 0x1f;
- g0 = (src[0] >> 6) & 0x1f;
- b0 = src[0] & 0x1f;
- r1 = (src[1] >> 11) & 0x1f;
- g1 = (src[1] >> 6) & 0x1f;
- b1 = src[1] & 0x1f;
- y0 = (yuv_ry[r0] + yuv_gy[g0] + yuv_by[b0]) >> 16;
- y1 = (yuv_ry[r1] + yuv_gy[g1] + yuv_by[b1]) >> 16;
- u = yu[b0 - y0];
- v = yv[r0 - y0];
- // valid Y range seems to be 16..235
- y0 = 16 + 219 * y0 / 31;
- y1 = 16 + 219 * y1 / 31;
-
- *dst = (y1 << 24) | (v << 16) | (y0 << 8) | u;
- }
-}
-
-void bgr555_to_uyvy(void *d, const void *s, int pixels)
-{
- unsigned int *dst = d;
- const unsigned short *src = s;
- const unsigned char *yu = yuv_u + 32;
- const unsigned char *yv = yuv_v + 32;
- int r0, g0, b0, r1, g1, b1;
- int y0, y1, u, v;
-
- for (; pixels > 0; src += 2, dst++, pixels -= 2)
- {
- b0 = (src[0] >> 10) & 0x1f;
- g0 = (src[0] >> 5) & 0x1f;
- r0 = src[0] & 0x1f;
- b1 = (src[1] >> 10) & 0x1f;
- g1 = (src[1] >> 5) & 0x1f;
- r1 = src[1] & 0x1f;
- y0 = (yuv_ry[r0] + yuv_gy[g0] + yuv_by[b0]) >> 16;
- y1 = (yuv_ry[r1] + yuv_gy[g1] + yuv_by[b1]) >> 16;
- u = yu[b0 - y0];
- v = yv[r0 - y0];
- y0 = 16 + 219 * y0 / 31;
- y1 = 16 + 219 * y1 / 31;
-
- *dst = (y1 << 24) | (v << 16) | (y0 << 8) | u;
- }
-}
-
-void bgr888_to_uyvy(void *d, const void *s, int pixels)
-{
- unsigned int *dst = d;
- const unsigned char *src8 = s;
- const unsigned char *yu = yuv_u + 32;
- const unsigned char *yv = yuv_v + 32;
- int r0, g0, b0, r1, g1, b1;
- int y0, y1, u, v;
-
- for (; pixels > 0; src8 += 3*2, dst++, pixels -= 2)
- {
- r0 = src8[0], g0 = src8[1], b0 = src8[2];
- r1 = src8[3], g1 = src8[4], b1 = src8[5];
- y0 = (r0 * 19595 + g0 * 38470 + b0 * 7471) >> 16;
- y1 = (r1 * 19595 + g1 * 38470 + b1 * 7471) >> 16;
- u = yu[(b0 - y0) / 8];
- v = yv[(r0 - y0) / 8];
- y0 = 16 + 219 * y0 / 255;
- y1 = 16 + 219 * y1 / 255;
-
- *dst = (y1 << 24) | (v << 16) | (y0 << 8) | u;
- }
-}
diff --git a/plugins/gpulib/cspace.h b/plugins/gpulib/cspace.h
deleted file mode 100644
index 1a9e339..0000000
--- a/plugins/gpulib/cspace.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-void bgr555_to_rgb565(void *dst, const void *src, int bytes);
-void bgr888_to_rgb888(void *dst, const void *src, int bytes);
-void bgr888_to_rgb565(void *dst, const void *src, int bytes);
-void rgb888_to_rgb565(void *dst, const void *src, int bytes);
-
-void bgr_to_uyvy_init(void);
-void rgb565_to_uyvy(void *d, const void *s, int pixels);
-void bgr555_to_uyvy(void *d, const void *s, int pixels);
-void bgr888_to_uyvy(void *d, const void *s, int pixels);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/plugins/gpulib/cspace_neon.s b/plugins/gpulib/cspace_neon.s
deleted file mode 100644
index b458f06..0000000
--- a/plugins/gpulib/cspace_neon.s
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * (C) Gražvydas "notaz" Ignotas, 2010
- *
- * This work is licensed under the terms of any of these licenses
- * (at your option):
- * - GNU GPL, version 2 or later.
- * - GNU LGPL, version 2.1 or later.
- * See the COPYING file in the top-level directory.
- */
-
-.text
-.align 2
-
-.global bgr555_to_rgb565
-bgr555_to_rgb565:
- pld [r1]
- mov r3, #0x07c0
- vdup.16 q15, r3
- subs r2, r2, #64
- blt btr16_end64
-0:
- pld [r1, #64*2]
- vldmia r1!, {q0-q3}
- vshl.u16 q4, q0, #11
- vshl.u16 q5, q1, #11
- vshl.u16 q6, q2, #11
- vshl.u16 q7, q3, #11
- vsri.u16 q4, q0, #10
- vsri.u16 q5, q1, #10
- vsri.u16 q6, q2, #10
- vsri.u16 q7, q3, #10
- vshl.u16 q0, q0, #1
- vshl.u16 q1, q1, #1
- vshl.u16 q2, q2, #1
- vshl.u16 q3, q3, #1
- vbit q4, q0, q15
- vbit q5, q1, q15
- vbit q6, q2, q15
- vbit q7, q3, q15
- vstmia r0!, {q4-q7}
- subs r2, r2, #64
- bge 0b
-
-btr16_end64:
- adds r2, r2, #64
- bxeq lr
- subs r2, r2, #16
- blt btr16_end16
-
- @ handle the remainder (reasonably rare)
-0:
- vld1.16 {q0}, [r1]!
- vshl.u16 q1, q0, #11
- vshl.u16 q2, q0, #1
- vsri.u16 q1, q0, #10
- vbit q1, q2, q15
- subs r2, r2, #16
- vst1.16 {q1}, [r0]!
- bge 0b
-
-btr16_end16:
- adds r2, r2, #16
- bxeq lr
- subs r2, r2, #8
- bxlt lr
-
- @ very rare
- vld1.16 d0, [r1]!
- vshl.u16 d1, d0, #11
- vshl.u16 d2, d0, #1
- vsri.u16 d1, d0, #10
- vbit d1, d2, d30
- vst1.16 d1, [r0]!
- bx lr
-
-
-.global bgr888_to_rgb888
-bgr888_to_rgb888:
- pld [r1]
- @ r2 /= 48
- mov r2, r2, lsr #4
- movw r3, #0x5556
- movt r3, #0x5555
- umull r12,r2, r3, r2
-0:
- pld [r1, #48*3]
- vld3.8 {d0-d2}, [r1, :64]!
- vld3.8 {d3-d5}, [r1, :64]!
- vswp d0, d2
- vswp d3, d5
- vst3.8 {d0-d2}, [r0, :64]!
- vst3.8 {d3-d5}, [r0, :64]!
- subs r2, r2, #1
- bne 0b
-
- bx lr
-
-
-.global bgr888_to_rgb565
-bgr888_to_rgb565:
- pld [r1]
- @ r2 /= 48
- mov r2, r2, lsr #4
- movw r3, #0x5556
- movt r3, #0x5555
- umull r12,r2, r3, r2
-
- mov r3, #0x07e0
- vdup.16 q15, r3
-0:
- pld [r1, #48*3]
- vld3.8 {d1-d3}, [r1, :64]!
- vld3.8 {d5-d7}, [r1, :64]!
-
- vshll.u8 q8, d2, #3 @ g
- vshll.u8 q9, d6, #3
- vshr.u8 d0, d3, #3 @ b
- vshr.u8 d4, d7, #3
- vzip.8 d0, d1 @ rb
- vzip.8 d4, d5
- vbit q0, q8, q15
- vbit q2, q9, q15
-
- vstmia r0!, {d0,d1}
- vstmia r0!, {d4,d5}
- subs r2, r2, #1
- bne 0b
-
- bx lr
-
-
-.global rgb888_to_rgb565
-rgb888_to_rgb565:
- pld [r1]
- @ r2 /= 48
- mov r2, r2, lsr #4
- movw r3, #0x5556
- movt r3, #0x5555
- umull r12,r2, r3, r2
-
- mov r3, #0x07e0
- vdup.16 q15, r3
-0:
- pld [r1, #48*3]
- vld3.8 {d1-d3}, [r1, :64]!
- vld3.8 {d5-d7}, [r1, :64]!
-
- vshll.u8 q8, d2, #3 @ g
- vshll.u8 q9, d6, #3
- vshr.u8 d2, d1, #3 @ b
- vshr.u8 d6, d5, #3
- vzip.8 d2, d3 @ rb
- vzip.8 d6, d7
- vbit q1, q8, q15
- vbit q3, q9, q15
-
- vstmia r0!, {d2,d3}
- vstmia r0!, {d6,d7}
- subs r2, r2, #1
- bne 0b
-
- bx lr
-
-
-@ vim:filetype=armasm
diff --git a/plugins/gpulib/gpulib.mak b/plugins/gpulib/gpulib.mak
index ad6a8ad..6377274 100644
--- a/plugins/gpulib/gpulib.mak
+++ b/plugins/gpulib/gpulib.mak
@@ -1,5 +1,5 @@
# depends on ARCH definition
-# always adding gpulib to deps in case cspace is needed
+# always adding gpulib to deps (XXX might be no longer needed)
# users must include ../../config.mak
LDFLAGS += -shared -Wl,--no-undefined
@@ -16,8 +16,8 @@ endif
GPULIB_A = ../gpulib/gpulib$(EXT).a
-ifdef BIN_STANDLALONE
-TARGETS += $(BIN_STANDLALONE)
+ifdef BIN_STANDALONE
+TARGETS += $(BIN_STANDALONE)
endif
ifdef BIN_GPULIB
TARGETS += $(BIN_GPULIB)
@@ -30,11 +30,11 @@ PLUGINDIR = $(shell basename $(WD))
all: ../../config.mak $(TARGETS)
-ifdef BIN_STANDLALONE
+ifdef BIN_STANDALONE
ifneq ($(findstring .cpp,$(SRC_STANDALONE)),)
CC_STANDLALONE = $(CXX)
endif
-$(BIN_STANDLALONE): $(SRC) $(SRC_STANDALONE) $(GPULIB_A)
+$(BIN_STANDALONE): $(SRC) $(SRC_STANDALONE) $(GPULIB_A)
$(CC_STANDLALONE) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) $(LDLIBS_STANDALONE)
ln -fs $(PLUGINDIR)/$@ ../
endif
diff --git a/plugins/gpulib/vout_pl.c b/plugins/gpulib/vout_pl.c
index 5af0762..541b5e0 100644
--- a/plugins/gpulib/vout_pl.c
+++ b/plugins/gpulib/vout_pl.c
@@ -11,7 +11,6 @@
#include <string.h>
#include "gpu.h"
-#include "cspace.h"
#include "../../frontend/plugin_lib.h"
static const struct rearmed_cbs *cbs;
@@ -50,8 +49,7 @@ static void check_mode_change(int force)
old_status = gpu.status.reg;
old_h = h;
- cbs->pl_vout_set_mode(w_out, h_out, w, h,
- (gpu.status.rgb24 && !cbs->only_16bpp) ? 24 : 16);
+ cbs->pl_vout_set_mode(w_out, h_out, w, h, gpu.status.rgb24 ? 24 : 16);
}
}