summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/gsp_sema_service.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 1487f86..140e8e7 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -12231,10 +12231,19 @@ static bool svc_gl_win_has_draw(const u8 *buf, u32 len)
if (!buf)
return false;
for (i = 0; i + 4u <= len; i += 4u) {
- u32 w, m;
+ u32 w, op, m;
memcpy(&w, buf + i, 4);
- if ((w & 0xe0001fffu) != 0x20000000u)
+ op = (w >> 29) & 7u;
+ /*
+ * The client encodes these real draw markers as different
+ * run forms: CALL_MME_MACRO(34) 0x3910 arrives as ONE_INCR
+ * (op 5, header 0xa00a0e44) and BEGIN 0x1618 as an immd13
+ * (op 4). Accept the method-stream ops rather than only the
+ * INC form; data words that alias these methods are rare and
+ * the per-window bind validity is not required on this path.
+ */
+ if (op != 1u && op != 3u && op != 4u && op != 5u)
continue;
m = (w & 0x1fffu) << 2;
if (m == 0x1618u || m == 0x0d78u || m == 0x3910u)