(PSP) add BIG_STACK makefile option

fix overflow in VFPU resampler when input_frames is 0
add support for GU_PSM_5551 pixel format when using hardware rendering
This commit is contained in:
aliaspider 2014-06-29 05:45:36 +01:00
parent 9bfb76e7fb
commit ba7cefc529
4 changed files with 20 additions and 14 deletions

View File

@ -1,8 +1,10 @@
BUILD_PRX = 1
DEBUG = 0
HAVE_KERNEL_PRX = 1
HAVE_FILE_LOGGER = 0
HAVE_THREADS = 1
BUILD_PRX = 1
DEBUG = 0
HAVE_KERNEL_PRX = 1
HAVE_FILE_LOGGER = 0
HAVE_THREADS = 1
BIG_STACK = 0
WHOLE_ARCHIVE_LINK = 0
TARGET = retroarchpsp
@ -39,6 +41,10 @@ ifeq ($(HAVE_KERNEL_PRX), 1)
CFLAGS += -DHAVE_KERNEL_PRX
endif
ifeq ($(BIG_STACK), 1)
CFLAGS += -DBIG_STACK
endif
CFLAGS += $(RARCH_DEFINES)

View File

@ -72,6 +72,8 @@ static void resampler_CC_process(void *re_, struct resampler_data *data)
{
while (fraction < ratio)
{
if (inp == inp_max)
goto done;
__asm__ (
".set push \n"
".set noreorder \n"
@ -105,8 +107,6 @@ static void resampler_CC_process(void *re_, struct resampler_data *data)
: "r"(inp));
inp++;
if (inp == inp_max)
goto done;
}
__asm__ (
".set push \n"

View File

@ -35,6 +35,9 @@
PSP_MODULE_INFO("RetroArch PSP", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER|THREAD_ATTR_VFPU);
#ifdef BIG_STACK
PSP_MAIN_THREAD_STACK_SIZE_KB(4*1024);
#endif
PSP_HEAP_SIZE_MAX();
char eboot_path[512];

View File

@ -187,7 +187,7 @@ static void *psp_init(const video_info_t *video,
psp->draw_buffer = SCEGU_VRAM_BP_0;
psp->bpp_log2 = 1;
pixel_format = GU_PSM_5650;
pixel_format = (g_extern.system.pix_fmt == RETRO_PIXEL_FORMAT_0RGB1555)? GU_PSM_5551 : GU_PSM_5650 ;
lut_pixel_format = GU_PSM_T16;
displayBuffer = SCEGU_VRAM_BP_1;
@ -282,7 +282,8 @@ static bool psp_frame(void *data, const void *frame,
if (!width || !height)
return false;
sceGuSync(0, 0);
if (!(((uint32_t)frame&0x04000000) || (frame == RETRO_HW_FRAME_BUFFER_VALID))) // let the core decide when to sync when HW_RENDER
sceGuSync(0, 0);
pspDebugScreenSetBase(psp->draw_buffer);
@ -336,7 +337,7 @@ static bool psp_frame(void *data, const void *frame,
sceGuStart(GU_DIRECT, psp->main_dList);
if ((uint32_t)frame&0x04000000) // frame in VRAM ? texture/palette was set in core so draw directly
if (((uint32_t)frame&0x04000000) || (frame == RETRO_HW_FRAME_BUFFER_VALID)) // frame in VRAM ? texture/palette was set in core so draw directly
{
sceGuClear(GU_COLOR_BUFFER_BIT);
sceGuDrawArray(GU_SPRITES, GU_TEXTURE_16BIT | GU_COLOR_4444 | GU_VERTEX_16BIT | GU_TRANSFORM_2D, 2, NULL, (void*)(psp->frame_coords));
@ -481,10 +482,6 @@ static void psp_set_texture_enable(void *data, bool state, bool full_screen)
static const video_poke_interface_t psp_poke_interface = {
NULL, /* set_filtering */
#ifdef HAVE_FBO
NULL, /* get_current_framebuffer */
NULL, /* get_proc_address */
#endif
NULL,
NULL,
#ifdef HAVE_MENU