notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f6c92b
)
gpulib: fix frameskip on weird lists
author
notaz
<notasas@gmail.com>
Fri, 22 Mar 2024 22:57:41 +0000
(
00:57
+0200)
committer
notaz
<notasas@gmail.com>
Fri, 22 Mar 2024 22:59:42 +0000
(
00:59
+0200)
notaz/pcsx_rearmed#337
plugins/gpulib/gpu.c
patch
|
blob
|
blame
|
history
diff --git
a/plugins/gpulib/gpu.c
b/plugins/gpulib/gpu.c
index
f2bf6ce
..
b444dcf
100644
(file)
--- a/
plugins/gpulib/gpu.c
+++ b/
plugins/gpulib/gpu.c
@@
-532,6
+532,10
@@
static noinline int do_cmd_list_skip(uint32_t *data, int count, int *last_cmd)
uint32_t *list = data + pos;
cmd = LE32TOH(list[0]) >> 24;
len = 1 + cmd_lengths[cmd];
+ if (pos + len > count) {
+ cmd = -1;
+ break; // incomplete cmd
+ }
switch (cmd) {
case 0x02:
@@
-571,11
+575,6
@@
static noinline int do_cmd_list_skip(uint32_t *data, int count, int *last_cmd)
gpu.ex_regs[cmd & 7] = LE32TOH(list[0]);
break;
}
-
- if (pos + len > count) {
- cmd = -1;
- break; // incomplete cmd
- }
if (0x80 <= cmd && cmd <= 0xdf)
break; // image i/o