From 0b9a2e1a8f9d98144be417836a46123633532a23 Mon Sep 17 00:00:00 2001
From: Mike Davis <mdavis.virtual@gmail.com>
Date: Sun, 18 Jul 2021 23:35:43 -0500
Subject: [PATCH] nv2a: Support NV062_SET_COLOR_FORMAT_LE_Y32 blitting

---
 hw/xbox/nv2a/nv2a_regs.h | 1 +
 hw/xbox/nv2a/pgraph.c    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/hw/xbox/nv2a/nv2a_regs.h b/hw/xbox/nv2a/nv2a_regs.h
index af573623ba..dde8da47a5 100644
--- a/hw/xbox/nv2a/nv2a_regs.h
+++ b/hw/xbox/nv2a/nv2a_regs.h
@@ -756,6 +756,7 @@
 #       define NV062_SET_COLOR_FORMAT_LE_R5G6B5                0x04
 #       define NV062_SET_COLOR_FORMAT_LE_X8R8G8B8              0x07
 #       define NV062_SET_COLOR_FORMAT_LE_A8R8G8B8              0x0A
+#       define NV062_SET_COLOR_FORMAT_LE_Y32                   0x0B
 #   define NV062_SET_PITCH                                    0x00000304
 #   define NV062_SET_OFFSET_SOURCE                            0x00000308
 #   define NV062_SET_OFFSET_DESTIN                            0x0000030C
diff --git a/hw/xbox/nv2a/pgraph.c b/hw/xbox/nv2a/pgraph.c
index c388cc414c..fc9866a644 100644
--- a/hw/xbox/nv2a/pgraph.c
+++ b/hw/xbox/nv2a/pgraph.c
@@ -862,6 +862,7 @@ int pgraph_method(NV2AState *d, unsigned int subchannel,
                 break;
             case NV062_SET_COLOR_FORMAT_LE_A8R8G8B8:
             case NV062_SET_COLOR_FORMAT_LE_X8R8G8B8:
+            case NV062_SET_COLOR_FORMAT_LE_Y32:
                 bytes_per_pixel = 4;
                 break;
             default: