fix blend masks

This commit is contained in:
lif 2023-12-24 13:39:32 -08:00
parent 53490ec797
commit 4a6b94980e
2 changed files with 9 additions and 3 deletions

View File

@ -2366,10 +2366,9 @@ static void emit_pmemst_stub(
mips_emit_andi(reg_temp, reg_a1, 0x7FFF);
#elif defined(USE_RGBA5551_FORMAT)
/* N64's native format */
//#error "TODO"
#define palette_convert() \
mips_emit_sll(reg_temp, reg_a1, 1); \
mips_emit_ori(reg_temp, reg_temp, 1);
mips_emit_ori(reg_temp, reg_temp, 1)
#else
/* 0BGR to RGB565 (clobbers a0) */
#ifdef MIPS_HAS_R2_INSTS

View File

@ -1656,13 +1656,20 @@ static void order_layers(u32 layer_flags, u32 vcnt)
#define BLND_MSK (SATR_MSK | SATG_MSK | SATB_MSK)
#if defined(USE_XBGR1555_FORMAT) || defined(USE_RGBA5551_FORMAT)
#if defined(USE_XBGR1555_FORMAT)
#define OVFG_MSK 0x04000000
#define OVFR_MSK 0x00008000
#define OVFB_MSK 0x00000020
#define SATG_MSK 0x03E00000
#define SATR_MSK 0x00007C00
#define SATB_MSK 0x0000001F
#elif defined(USE_RGBA5551_FORMAT)
#define OVFG_MSK 0x08000000
#define OVFR_MSK 0x00010000
#define OVFB_MSK 0x00000040
#define SATG_MSK 0x07c00000
#define SATR_MSK 0x0000f800
#define SATB_MSK 0x0000003e
#else
#define OVFG_MSK 0x08000000
#define OVFR_MSK 0x00010000