Gif: Debugging performed on queue functions

This commit is contained in:
Gabriel Correia 2024-01-08 11:43:36 -03:00
parent 746ed21524
commit 5a13f8662a
3 changed files with 16 additions and 12 deletions

View File

@ -53,7 +53,7 @@ target_sources(cosmic PRIVATE
${COSMIC_DIR}/gs/synth_tables.cpp
${COSMIC_DIR}/gs/synth_engine.cpp
${COSMIC_DIR}/gs/gif_bridge.cpp
${COSMIC_DIR}/gs/transfer_queue.s
${COSMIC_DIR}/gs/transfer_queue.S
${COSMIC_DIR}/vu/vecu.cpp
${COSMIC_DIR}/vu/vu_time.cpp
${COSMIC_DIR}/vu/vif10_upload.cpp

View File

@ -12,16 +12,18 @@ declFunc gifQueueSize
// Macro adr_l and unconditional jumps are being used as a priority, due to the enabled LTO
gifQueueReset:
prologue
eor v0.16b, v0.16b, v0.16b
eor v0.16b, v0.16b, v0.16b // v0 = 0.0, 0.0 ...
mov x9, 0
mov w12, 0
adr_l x10, gQueue
cleanUp:
mov w9, w12
lsl x9, x9, #4
add x10, x10, x9
st1 {v0.16b}, [x10] // ((u128*)qQueue[w0]) = v0
add x11, x10, x9
st1 {v0.16b}, [x11] // ((u128*)qQueue[w0]) = v0
add w9, w9, #1
sub w11, w9, #16
add w12, w12, #1
sub w11, w12, #16
cbz w11, #8
b cleanUp
mov x9, 1
@ -34,17 +36,19 @@ gifQueueSize:
prologue
// We can pre-load the array values into the L2 cache since we'll be accessing it shortly
mov x10, 0
mov w11, 0
adr_l x9, gQueue
loadIntoL2:
// ((u8*)gQueue)[w1 * 64]
mov x10, x11
lsl x10, x10, #6
add x9, x9, x10
add x12, x9, x10
prfm pldl2keep, [x9]
prfm pldl2keep, [x12]
add w10, w10, #4
sub w11, w10, #16
cbz w11, #0x8
add w11, w11, #1
sub w10, w11, #4
cbz w10, #0x8
b loadIntoL2
ldr_l x0, qSize

View File

@ -25,7 +25,7 @@ namespace cosmic::vm {
std::shared_ptr<engine::EeMipsCore> mips;
std::shared_ptr<iop::IoMipsCore> iop;
std::shared_ptr<ipu::IpuMpeg2> mpegDecoder;
std::shared_ptr<gs::GifArk> gsGif;
std::shared_ptr<gs::GifBridge> gsGif;
std::shared_ptr<gpu::ExhibitionEngine> screenEngine;
u8 frames;