Unknown W. Brackets
863eb83e4c
Add support for sceGeGetStack() for debugging.
2013-09-21 10:04:31 -07:00
Unknown W. Brackets
3c954ea0e4
Save the base address in signal calls.
...
It's not saved in regular calls but it is in signal ones.
2013-09-21 00:07:49 -07:00
Unknown W. Brackets
9116b879a4
Restore context even without an interrupt.
2013-09-20 21:03:39 -07:00
Unknown W. Brackets
4078dcd917
Support save/restore of context on list run/finish.
2013-09-20 09:51:44 -07:00
Unknown W. Brackets
bd70d04930
Include GE_CMD_PATCHFACING just in case.
2013-09-20 00:45:48 -07:00
Unknown W. Brackets
50e9e45d65
Check version in each DoState() func.
...
They bail on PointerWrap error or bad version.
2013-09-14 20:23:03 -07:00
Unknown W. Brackets
8ae6694e1d
Use a waiting thread list in sceGe as well.
2013-09-08 11:57:44 -07:00
Unknown W. Brackets
08b41df6a2
Change a few more log types.
2013-09-07 13:31:14 -07:00
Unknown W. Brackets
8998a1b303
Don't trash a list the GE interrupt handler needs.
...
Even after it's marked COMPLETED, the CPU needs it to start and finish the
interrupt. Fixes #2956 , where an existing completed list was not having
its interrupt run correctly.
2013-09-01 12:39:45 -07:00
Unknown W. Brackets
dc9b5156d9
Cleanup comment (broke savestates anyway.)
2013-09-01 00:52:25 -07:00
Unknown W. Brackets
15a0f39fa1
Return yet more errors while inside interrupts.
2013-08-28 23:15:13 -07:00
Unknown W. Brackets
211c2bd955
Refuse a few more waits w/ dispatch/intr disabled.
2013-08-28 22:35:05 -07:00
The Dax
4d9eb24f29
Fix hang in Project Diva 2nd in single-threaded mode. Doesn't seem to affect other games, but I don't have every game in existence, so there could be one or two out there that might break from this.
2013-08-24 21:13:34 -04:00
Unknown W. Brackets
8dbcf6572e
Add some additional reporting.
2013-08-24 11:34:38 -07:00
Henrik Rydgard
520453a5bd
Fix gpu cycle call level counting, of course halving the numbers I mentioned in the previous commit comment.
2013-08-23 11:42:15 +02:00
Henrik Rydgard
dfb91d4532
Track number of GPU commands executed per call level.
...
This is to get an idea if it would be beneficial to compile and cache display lists. Looks like it would be for some games, for example in GTA it's often 20k/80k/20k commands per frame - that is 100k executed commands per frame that could potentially just be executed instead of interpreted. Likewise in Wipeout. Of course, this means yet another cache with invalidation issues etc..
2013-08-23 11:29:55 +02:00
Unknown W. Brackets
1ed8edb0d3
Avoid some dangerous hex constant widths.
2013-08-22 23:23:48 -07:00
raven02
e68ddf671c
Temporary fix issue #3167 in non-multithread mode #2
2013-08-15 03:44:20 +08:00
Unknown W. Brackets
49ab98c7fd
Use atomic operations on Android + warning fixes.
2013-08-12 08:51:49 -07:00
Unknown W. Brackets
cf7c718706
Use a timer to keep gpu/cpu in sync periodically.
...
Fixes Diva Extend demo, at least, losing FPS.
2013-08-11 13:41:42 -07:00
Unknown W. Brackets
e0f699fd5f
Use a possibly harmless hack to prevent hangs.
...
Not sure where the problem is, but this fixes it pretty consistently for
me... seems like lists are somehow not being processed after becoming
processable?
2013-08-10 20:03:43 -07:00
Unknown W. Brackets
26c072df51
Don't wait directly from GPUCommon, do it in sceGe.
...
Makes debugging a bit easier.
2013-08-10 18:24:40 -07:00
Unknown W. Brackets
55c07bdc73
Avoid a possible thread sync issue.
...
Could be that it's about to wake listsync, does, and then we wait.
2013-08-10 17:18:31 -07:00
Unknown W. Brackets
abc396cbe1
Sync the GPU thread on list/draw sync.
...
Otherwise, the CPU gets ahead (inside the frame) and games get confused.
I don't think there's any good workaround to avoid this.
2013-08-10 15:16:49 -07:00
Unknown W. Brackets
450e4c7fea
Factor out event queue logic to a template mixin.
2013-08-10 03:33:09 -07:00
Unknown W. Brackets
a80a7690c8
Fix SyncThread() not syncing during last event.
2013-08-09 23:18:37 -07:00
Unknown W. Brackets
e82bae3708
Simplify easy_guard to avoid coding errors.
2013-08-09 22:57:53 -07:00
Unknown W. Brackets
1226c3dbd9
Try to prevent a deadlock if CPU doesn't NEXTFRAME.
2013-08-09 22:57:53 -07:00
Unknown W. Brackets
e71cf2ec7e
Don't queue Flush() etc. while on GPU thread.
...
Oops, that makes it not actually flush properly of course.
Also made a simpler guard wrapper to avoid extra braces in too many
places. Reduced contention areas slightly.
2013-08-09 22:57:52 -07:00
Unknown W. Brackets
68fb78e203
Be more careful with the stall address.
...
In case it's moved while running the list.
2013-08-09 22:57:52 -07:00
Unknown W. Brackets
8c69020fa8
Use separate condition vars/locks for GPU sync.
2013-08-09 22:57:51 -07:00
Unknown W. Brackets
b0e6967697
Rename UseCPUThread to SeparateCPUThread.
2013-08-09 22:41:33 -07:00
Unknown W. Brackets
a56cac1eb3
Bail when CPU thread disabled to ensure good perf.
2013-08-09 22:41:32 -07:00
Unknown W. Brackets
3819886e2e
Add a way to synchronize with the GPU thread.
2013-08-09 22:41:32 -07:00
Unknown W. Brackets
02e301e5fe
Add a simple message event system to the GE.
...
With this, the CPU thread feature now mostly works.
2013-08-09 22:41:31 -07:00
Unknown W. Brackets
52ca93aab2
Add mutex locks around list management.
...
This way we can safely execute lists on a separate thread.
2013-08-09 22:41:31 -07:00
Unknown W. Brackets
00fc5ec40e
Enable interrupts as a property of the list.
...
This way there's no behavior change when enqueue is async.
2013-08-07 00:32:30 -07:00
Unknown W. Brackets
3aa2db9a8e
Simplify ProcessDLQueue() slightly.
2013-08-04 16:31:54 -07:00
Unknown W. Brackets
f7a39d1b12
Move ReapplyGfxState() to GPUCommon.
...
This way it can be overridden, and simplifies some other things.
2013-08-04 15:15:50 -07:00
Henrik Rydgard
a95daf4647
Reduce logspam for some GE signals. doesn't seem to be a problem (although that might change if we paralellize).
2013-06-27 17:49:29 +02:00
Unknown W. Brackets
9c85bd92e4
Show statistics for GPU cycles executed per frame.
2013-05-31 10:40:16 -07:00
Unknown W. Brackets
46e5b84242
Small opt. for common immediately stalled list.
2013-04-28 14:56:38 -07:00
Unknown W. Brackets
597cdbca3f
Simplify, don't let InterpretList do downcount.
2013-04-28 14:30:28 -07:00
Unknown W. Brackets
1edbfa3212
Use a downcount and fast run loop in the GE.
2013-04-28 14:23:30 -07:00
Unknown W. Brackets
5a03888b56
Centralize state and pc changes in the GE.
...
To make later things easier.
2013-04-28 13:34:29 -07:00
Unknown W. Brackets
9208f6389d
Avoid calling time_update in GE w/o debug stats.
...
Just wastes time, especially if the game hammers sceGeListUpdateStallAddr,
which many games do.
2013-04-22 22:04:27 -07:00
Henrik Rydgard
628c223234
GPUCommon: Get rid of prev variable.
2013-04-21 19:32:56 +02:00
Unknown W. Brackets
b54eb41041
Don't signal again if a PAUSE handler unstalls.
...
Basically, if the handler calls sceGeListUpdateStallAddr(), and it hits
a finish (which it might), before we were triggering another PAUSE.
THat's wrong, it should just be a FINISH as usual.
2013-04-20 20:15:47 -07:00
Henrik Rydgard
98daf18d56
Add skeleton code for Windows multitouch, to be filled in by someone who can test :P
2013-04-16 21:14:46 +02:00
Unknown W. Brackets
f86e01707f
Use a struct for the GE stack entries, cleaner.
2013-04-15 23:06:56 -07:00
Unknown W. Brackets
7b184602df
Remember the GE offset in the stack on call/ret.
2013-04-15 22:20:49 -07:00
Henrik Rydgard
ea11c36091
Fix a vshader id bit collision, avoid color test when set to 'ALWAYS', zeroinitialize dls.
2013-04-15 22:57:54 +02:00
Henrik Rydgard
cbbc4e2c9e
Reset gstate_c.offsetAddr on RET. Fixes some "CALL to illegal address"
...
(as seen in Flatout for example).
2013-04-15 22:24:30 +02:00
Unknown W. Brackets
e45bd32c61
Fix incorrect GPU timing with signal jumps.
2013-04-12 08:57:30 -07:00
Unknown W. Brackets
6cbd1b5205
Fix typo, add back state to savestate.
2013-04-09 02:18:09 -07:00
Unknown W. Brackets
957394258c
Block dlist execution while in virtual progress.
...
Fixes #1224 .
Also, fix drawsync late by a GPU cycle, so interrupts line up.
It would break at least Ys Seven without that.
2013-04-09 00:56:50 -07:00
Unknown W. Brackets
210c7b1639
Slow down the GPU clock estimate.
...
This makes Fat Princess for example much faster.
2013-04-07 17:05:12 -07:00
Unknown W. Brackets
5d017829ad
Make sure lists aren't reused before they complete.
2013-04-07 17:05:11 -07:00
Unknown W. Brackets
57770dbd95
Delay GPU signals and waits to simulate cycles.
2013-04-07 17:05:11 -07:00
Unknown W. Brackets
0ca4e5f0a7
Implement the jump, call, and ret signals.
...
Still buggy, but more things show...
2013-04-06 11:03:43 -07:00
Unknown W. Brackets
376ad80d76
Implement sync signal in display lists.
...
Makes dialogs show up in 3rd Birthday.
2013-04-06 10:12:41 -07:00
Unknown W. Brackets
dac448dfae
Implement the pause signal a bit better.
2013-04-06 09:59:24 -07:00
Unknown W. Brackets
8302780e98
These signals seem to skip the next FINISH, report.
2013-04-06 08:40:24 -07:00
Unknown W. Brackets
77311a121d
Don't listsync until after the signal handler.
2013-04-06 08:36:03 -07:00
Unknown W. Brackets
fb26941a27
Implement sceGeListSync().
2013-04-06 02:30:38 -07:00
Unknown W. Brackets
c0f20c2fdd
If the interrupt is not run, don't flip gpuState.
...
Technically this is a hack, hopefully can remove it soon.
2013-04-06 02:30:37 -07:00
Unknown W. Brackets
c57954a72e
Implement sceGeDrawSync().
2013-04-06 02:30:37 -07:00
Unknown W. Brackets
832edb0a8f
Fix some x64 type conversion warnings.
2013-04-05 20:29:20 -07:00
Unknown W. Brackets
028cdbea43
Add some GPU related reporting.
2013-04-05 01:17:18 -07:00
Unknown W. Brackets
ef1086413c
Correct wait signal handling.
2013-04-05 00:32:35 -07:00
Unknown W. Brackets
2913bc063a
Implement sceGeListDeQueue().
...
Doesn't seem often used, though.
2013-04-05 00:32:34 -07:00
Unknown W. Brackets
339b444703
Switch to a fixed size displaylist queue.
2013-04-05 00:32:34 -07:00
Unknown W. Brackets
c986228d12
Change the state in PSP_GE_SIGNAL_HANDLER_SUSPEND.
2013-04-05 00:32:33 -07:00
Unknown W. Brackets
942eadb031
Always trigger interrupts on signal.
...
It seems likely the hardware does this.
2013-04-05 00:32:33 -07:00
Unknown W. Brackets
7aa6112c24
Keep a flag to indicate display list bailout.
2013-04-05 00:32:32 -07:00
Unknown W. Brackets
7738b42b9c
Implement sceGeBreak()/sceGeContinue().
2013-04-04 00:36:43 -07:00
Unknown W. Brackets
566b88bd63
Don't actually run sceGeListEnqueueHead right away.
2013-04-04 00:11:15 -07:00
Unknown W. Brackets
5336ae814d
Return more correct values in sceGeDrawSync().
2013-04-03 23:31:01 -07:00
Unknown W. Brackets
74441fdc07
Handle displaylist state more like the PSP.
...
All these changes from Orphis' hard work. Things still looking good.
2013-04-03 23:05:54 -07:00
Unknown W. Brackets
15cb005a60
Always trigger FINISH and SIGNAL from END.
2013-04-03 08:16:43 -07:00
Unknown W. Brackets
cd246d27c3
Count cycles in the GPU, rough guess at timing.
...
Doesn't actually do anything yet with the count, though.
2013-04-03 08:10:58 -07:00
Unknown W. Brackets
514bf93bf9
Don't trigger an interrupt when cb = -1.
2013-04-03 08:09:34 -07:00
Unknown W. Brackets
ec009bc299
Cleanup a few GPU error codes.
2013-03-31 23:57:03 -07:00
Unknown W. Brackets
b8e4c72f04
Maintain the stack per displaylist, not globally.
2013-03-31 23:57:03 -07:00
Unknown W. Brackets
affe91cb3b
Refactor some GPU methods to return errors.
2013-03-31 23:57:03 -07:00
Unknown W. Brackets
0f15a5eae6
Move the pc-management cmds to GPUCommon.
2013-03-31 23:57:02 -07:00
Henrik Rydgard
d4603136f0
Minor stuff: Fake-implement sceKernelReferThreadProfiler, make sure GPU frame dump logging gets output by not sending it to G3D.
2013-03-04 22:15:39 +01:00
Xele02
0fefca672d
Add 2 step mode for display list : Go to selected line and go to next draw using selected texture
2013-02-17 21:43:44 +01:00
Xele02
2a6af9b8a3
Add displayList debug dialog
2013-02-17 01:28:43 +01:00
Unknown W. Brackets
fb7cabcccf
Fix some missing GPUCommon state.
2013-02-12 01:06:11 -08:00
Xele02
381bffaa47
Remove Qt define
2013-02-10 18:15:01 +01:00
Xele02
69b837f18b
Add debug dialogs (DisAsm, Memory, VFPU).
...
New features : Breakpoint display, thread status, display list status
Update translation and start french translation
2013-02-10 17:33:34 +01:00
Unknown W. Brackets
2a6457b6ab
Cut down on h files including PointerWrap.
...
This makes changes to it a bit faster to build.
2013-02-04 08:26:59 -08:00
Florent Castelli
8004d360dd
Interrupt handler reorganization for easier GE interrupt support
2013-02-04 03:10:01 +01:00
Henrik Rydgard
00f9c97479
Seems vertex/index addresses should be computed through the same mechanism as jumps.
...
Gets rid of bad vertex address messages in Sol Trigger.
2013-02-02 23:48:22 +01:00
Unknown W. Brackets
661c7132c4
Don't check that the pc is valid every single op.
2013-01-29 08:19:07 -08:00
Henrik Rydgard
7390f2b5f6
Some realtime profiling stuff. Enable FZ (flush-to-zero) mode.
2013-01-11 00:13:39 +01:00
Lewis Robbins
64ee61a150
fixed compiling error
2013-01-10 08:02:55 +00:00
Lewis Robbins
4ae9ead2ce
clean up of GPUCommon
2013-01-09 21:13:09 +00:00
Unknown W. Brackets
97bdaf5dd2
Add support for selecting the GE callback per list.
...
Not sure if interrupts are right, but this should be more right.
2012-12-29 15:55:05 -08:00