Skip to content

Commit e99e53a

Browse files
committed
gfx/vita2d: fold the vita2d GXM backend into the driver
vita2d_gfx.c was the only consumer of the vendored libvita2d, and it went through the library's public API as if it were an external dependency, unlike the gx (libogc) and rsx (PSL1GHT) console drivers which talk to their GPU SDK directly. Fold the backend in so the Vita driver is a self-contained GXM implementation like its siblings. The four (already dead-code-stripped) translation units -- vita2d.c, vita2d_texture.c, vita2d_draw.c, utils.c -- and their headers are inlined into vita2d_gfx.c; the driver no longer includes <vita2d.h> and the public vita2d API is gone. The precompiled shader blobs (shader/*.gxp.c) stay -- the folded code still references them as externs. - deps/libvita2d/{source,include}/* and the standalone Makefile deleted; LICENSE and the shader/ blobs retained. - Makefile.common: drop the four source objects, keep the eight shader objects, drop the now-unused -Ideps/libvita2d/include. - griffin.c / Makefile.griffin: drop the source #includes and include dir. Compile-verified with vitasdk (arm-vita-eabi-gcc 15.2.0, -march=armv7-a -mfpu=neon -mfloat-abi=hard): builds to a clean object, no errors. Signed-off-by: LibretroAdmin <LibretroAdmin@users.noreply.github.com>
1 parent 4b5957c commit e99e53a

12 files changed

Lines changed: 2236 additions & 2281 deletions

File tree

Makefile.common

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,11 +1219,9 @@ ifeq ($(HAVE_THREAD_STORAGE), 1)
12191219
endif
12201220

12211221
ifeq ($(HAVE_VITA2D), 1)
1222-
OBJ += $(DEPS_DIR)/libvita2d/source/vita2d.o \
1223-
$(DEPS_DIR)/libvita2d/source/vita2d_texture.o \
1224-
$(DEPS_DIR)/libvita2d/source/vita2d_draw.o \
1225-
$(DEPS_DIR)/libvita2d/source/utils.o
1226-
1222+
# The vita2d GXM backend is now folded directly into vita2d_gfx.c; only
1223+
# the precompiled shader blobs remain as a dependency (the driver still
1224+
# references clear_v_gxp/texture_v_gxp/... as externs).
12271225
OBJ += $(DEPS_DIR)/libvita2d/shader/clear_v_gxp.o \
12281226
$(DEPS_DIR)/libvita2d/shader/clear_f_gxp.o \
12291227
$(DEPS_DIR)/libvita2d/shader/color_v_gxp.o \
@@ -1234,8 +1232,6 @@ ifeq ($(HAVE_VITA2D), 1)
12341232
$(DEPS_DIR)/libvita2d/shader/texture_tint_f_gxp.o
12351233

12361234
OBJ += gfx/drivers/vita2d_gfx.o
1237-
1238-
INCLUDE_DIRS += -I$(DEPS_DIR)/libvita2d/include
12391235
endif
12401236

12411237
ifeq ($(TARGET), retroarch_3ds)

Makefile.griffin

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ else ifeq ($(platform), vita)
315315
EXT_TARGET := $(TARGET_NAME)_$(platform).velf
316316
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
317317
MACHDEP := -DVITA
318-
INCLUDE += -Ideps/libvita2d/include
319318
PLATCFLAGS := -mfloat-abi=hard -fsingle-precision-constant \
320319
-mword-relocations -fno-unwind-tables -fno-asynchronous-unwind-tables -ftree-vectorize -fno-optimize-sibling-calls
321320
LIBS += -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\

deps/libvita2d/Makefile

Lines changed: 0 additions & 33 deletions
This file was deleted.

deps/libvita2d/include/shared.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

deps/libvita2d/include/utils.h

Lines changed: 0 additions & 33 deletions
This file was deleted.

deps/libvita2d/include/vita2d.h

Lines changed: 0 additions & 168 deletions
This file was deleted.

deps/libvita2d/source/utils.c

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)