aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu-gles/gpulib_if.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gpu-gles/gpulib_if.c')
-rw-r--r--plugins/gpu-gles/gpulib_if.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/plugins/gpu-gles/gpulib_if.c b/plugins/gpu-gles/gpulib_if.c
index 068dc41..2090553 100644
--- a/plugins/gpu-gles/gpulib_if.c
+++ b/plugins/gpu-gles/gpulib_if.c
@@ -549,7 +549,12 @@ int do_cmd_list(unsigned int *list, int list_len, int *last_cmd)
while(1)
{
- if((*list_position & 0xf000f000) == 0x50005000 || list_position >= list_end)
+ if(list_position >= list_end) {
+ cmd = -1;
+ goto breakloop;
+ }
+
+ if((*list_position & 0xf000f000) == 0x50005000)
break;
list_position++;
@@ -567,7 +572,12 @@ int do_cmd_list(unsigned int *list, int list_len, int *last_cmd)
while(1)
{
- if((*list_position & 0xf000f000) == 0x50005000 || list_position >= list_end)
+ if(list_position >= list_end) {
+ cmd = -1;
+ goto breakloop;
+ }
+
+ if((*list_position & 0xf000f000) == 0x50005000)
break;
list_position += 2;
@@ -593,6 +603,7 @@ int do_cmd_list(unsigned int *list, int list_len, int *last_cmd)
}
}
+breakloop:
gpu.ex_regs[1] &= ~0x1ff;
gpu.ex_regs[1] |= lGPUstatusRet & 0x1ff;