From: notaz Date: Tue, 20 Dec 2011 21:14:42 +0000 (+0200) Subject: gpu_neon/psx_gpu: use external vram X-Git-Tag: r12~14 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8c0e0bb6288aeeb2a4cb6709608340836778886;p=pcsx_rearmed.git gpu_neon/psx_gpu: use external vram --- diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu.c b/plugins/gpu_neon/psx_gpu/psx_gpu.c index 8d4b8b82..f29fa7e7 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu.c @@ -4315,7 +4315,7 @@ void initialize_reciprocal_table(void) #define dither_table_row(a, b, c, d) \ ((a & 0xFF) | ((b & 0xFF) << 8) | ((c & 0xFF) << 16) | ((d & 0xFF) << 24)) \ -void initialize_psx_gpu(psx_gpu_struct *psx_gpu) +void initialize_psx_gpu(psx_gpu_struct *psx_gpu, u16 *vram) { vec_8x16u test_mask = { { { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 } } }; @@ -4345,7 +4345,7 @@ void initialize_psx_gpu(psx_gpu_struct *psx_gpu) psx_gpu->render_state_base = 0; psx_gpu->num_blocks = 0; - psx_gpu->vram_ptr = psx_gpu->_vram; + psx_gpu->vram_ptr = vram; psx_gpu->texture_page_ptr = psx_gpu->vram_ptr; psx_gpu->clut_ptr = psx_gpu->vram_ptr; diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu.h b/plugins/gpu_neon/psx_gpu/psx_gpu.h index 15d94696..49425ceb 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu.h +++ b/plugins/gpu_neon/psx_gpu/psx_gpu.h @@ -186,7 +186,6 @@ typedef struct edge_data_struct span_edge_data[MAX_SPANS]; u32 span_b_offset[MAX_SPANS]; - u16 _vram[1024 * 512]; u8 texture_4bpp_cache[32][256 * 256]; u8 texture_8bpp_even_cache[16][256 * 256]; u8 texture_8bpp_odd_cache[16][256 * 256]; @@ -232,7 +231,7 @@ u32 texture_region_mask(s32 x1, s32 y1, s32 x2, s32 y2); void flush_render_block_buffer(psx_gpu_struct *psx_gpu); -void initialize_psx_gpu(psx_gpu_struct *psx_gpu); +void initialize_psx_gpu(psx_gpu_struct *psx_gpu, u16 *vram); void gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size); void triangle_benchmark(psx_gpu_struct *psx_gpu); diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.S b/plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.S index 381f3a9e..3551b596 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.S +++ b/plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.S @@ -76,8 +76,6 @@ #define psx_gpu_span_edge_data_offset 0x4100 #define psx_gpu_span_b_offset_offset 0x5100 -#define psx_gpu__vram_offset 0x005900 - #define edge_data_left_x_offset 0 #define edge_data_num_blocks_offset 2 #define edge_data_right_mask_offset 4 diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu_main.c b/plugins/gpu_neon/psx_gpu/psx_gpu_main.c index 97f62caf..d610e8e7 100644 --- a/plugins/gpu_neon/psx_gpu/psx_gpu_main.c +++ b/plugins/gpu_neon/psx_gpu/psx_gpu_main.c @@ -64,6 +64,7 @@ typedef struct static gpu_dump_struct state; psx_gpu_struct __attribute__((aligned(256))) _psx_gpu; +u16 __attribute__((aligned(256))) _vram[1024 * 512]; #define percent_of(numerator, denominator) \ ((((double)(numerator)) / (denominator)) * 100.0) \ @@ -175,7 +176,7 @@ int main(int argc, char *argv[]) screen = SDL_SetVideoMode(1024, 512, 32, 0); } - initialize_psx_gpu(psx_gpu); + initialize_psx_gpu(psx_gpu, _vram); #ifdef PANDORA_BUILD system("ofbset -fb /dev/fb1 -mem 6291456 -en 0");