aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu_neon/psx_gpu
diff options
context:
space:
mode:
authornotaz2011-12-20 23:14:42 +0200
committernotaz2011-12-21 22:42:20 +0200
commite8c0e0bb6288aeeb2a4cb6709608340836778886 (patch)
tree1eb2fd3ef05feae2b3bbafa8c777cd44d47fec0e /plugins/gpu_neon/psx_gpu
parent75e28f62b2a50044b58075d63d207409e0148409 (diff)
downloadpcsx_rearmed-e8c0e0bb6288aeeb2a4cb6709608340836778886.tar.gz
pcsx_rearmed-e8c0e0bb6288aeeb2a4cb6709608340836778886.tar.bz2
pcsx_rearmed-e8c0e0bb6288aeeb2a4cb6709608340836778886.zip
gpu_neon/psx_gpu: use external vram
Diffstat (limited to 'plugins/gpu_neon/psx_gpu')
-rw-r--r--plugins/gpu_neon/psx_gpu/psx_gpu.c4
-rw-r--r--plugins/gpu_neon/psx_gpu/psx_gpu.h3
-rw-r--r--plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.S2
-rw-r--r--plugins/gpu_neon/psx_gpu/psx_gpu_main.c3
4 files changed, 5 insertions, 7 deletions
diff --git a/plugins/gpu_neon/psx_gpu/psx_gpu.c b/plugins/gpu_neon/psx_gpu/psx_gpu.c
index 8d4b8b8..f29fa7e 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 15d9469..49425ce 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 381f3a9..3551b59 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 97f62ca..d610e8e 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");