From 9ebd07e9a1de90f69189a532e22b84740b1abb06 Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Sun, 30 Aug 2015 13:30:02 +0200 Subject: [PATCH] Texture formats 0x20 and 0x3C --- hw/xbox/nv2a.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/xbox/nv2a.c b/hw/xbox/nv2a.c index f635874c2a..348f0dcd87 100644 --- a/hw/xbox/nv2a.c +++ b/hw/xbox/nv2a.c @@ -963,6 +963,7 @@ # define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A4R4G4B4 0x1D # define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_X8R8G8B8 0x1E # define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A8 0x1F +# define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A8Y8 0x20 # define NV097_SET_TEXTURE_FORMAT_COLOR_LC_IMAGE_CR8YB8CB8YA8 0x24 # define NV097_SET_TEXTURE_FORMAT_COLOR_SZ_R6G5B5 0x27 # define NV097_SET_TEXTURE_FORMAT_COLOR_SZ_G8B8 0x28 @@ -970,6 +971,7 @@ # define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_DEPTH_Y16_FIXED 0x30 # define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_Y16 0x35 # define NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A8B8G8R8 0x3A +# define NV097_SET_TEXTURE_FORMAT_COLOR_SZ_R8G8B8A8 0x3C # define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A8B8G8R8 0x3F # define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_B8G8R8A8 0x40 # define NV097_SET_TEXTURE_FORMAT_MIPMAP_LEVELS 0x000F0000 @@ -1237,6 +1239,9 @@ static const ColorFormatInfo kelvin_color_format_map[66] = { [NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A8] = {1, true, GL_R8, GL_RED, GL_UNSIGNED_BYTE, {GL_ONE, GL_ONE, GL_ONE, GL_RED}}, + [NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A8Y8] = + {2, true, GL_RG8, GL_RG, GL_UNSIGNED_BYTE, + {GL_GREEN, GL_GREEN, GL_GREEN, GL_RED}}, [NV097_SET_TEXTURE_FORMAT_COLOR_SZ_R6G5B5] = {2, false, GL_RGB8_SNORM, GL_RGB, GL_BYTE}, /* FIXME: This might be signed */ @@ -1256,6 +1261,10 @@ static const ColorFormatInfo kelvin_color_format_map[66] = { {GL_RED, GL_RED, GL_RED, GL_ONE}}, [NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A8B8G8R8] = {4, false, GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV}, + + [NV097_SET_TEXTURE_FORMAT_COLOR_SZ_R8G8B8A8] = + {4, false, GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8}, + [NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A8B8G8R8] = {4, true, GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV}, [NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_B8G8R8A8] =