mirror of https://github.com/xemu-project/xemu.git
Merge pull request #42 from JayFoxRox/texture-formats
More texture formats
This commit is contained in:
commit
ce35c5ec00
|
@ -951,12 +951,16 @@
|
|||
# define NV097_SET_TEXTURE_FORMAT_COLOR_L_DXT1_A1R5G5B5 0x0C
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_L_DXT23_A8R8G8B8 0x0E
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_L_DXT45_A8R8G8B8 0x0F
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A1R5G5B5 0x10
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_R5G6B5 0x11
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A8R8G8B8 0x12
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_Y8 0x13
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A8 0x19
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A8Y8 0x1A
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_X1R5G5B5 0x1C
|
||||
# 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_LC_IMAGE_CR8YB8CB8YA8 0x24
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_SZ_R6G5B5 0x27
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_SZ_G8B8 0x28
|
||||
|
@ -965,6 +969,7 @@
|
|||
# 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_LU_IMAGE_A8B8G8R8 0x3F
|
||||
# define NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_B8G8R8A8 0x40
|
||||
# define NV097_SET_TEXTURE_FORMAT_MIPMAP_LEVELS 0x000F0000
|
||||
# define NV097_SET_TEXTURE_FORMAT_BASE_SIZE_U 0x00F00000
|
||||
# define NV097_SET_TEXTURE_FORMAT_BASE_SIZE_V 0x0F000000
|
||||
|
@ -1199,21 +1204,32 @@ static const ColorFormatInfo kelvin_color_format_map[66] = {
|
|||
{4, false, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, 0, GL_RGBA},
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_L_DXT45_A8R8G8B8] =
|
||||
{4, false, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, 0, GL_RGBA},
|
||||
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A1R5G5B5] =
|
||||
{2, true, GL_RGB5_A1, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV},
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_R5G6B5] =
|
||||
{2, true, GL_RGB565, GL_RGB, GL_UNSIGNED_SHORT_5_6_5},
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A8R8G8B8] =
|
||||
{4, true, GL_RGBA8, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV},
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_Y8] =
|
||||
{1, true, GL_R8, GL_RED, GL_UNSIGNED_BYTE,
|
||||
{GL_RED, GL_RED, GL_RED, GL_ONE}},
|
||||
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A8] =
|
||||
{1, false, GL_R8, GL_RED, GL_UNSIGNED_BYTE,
|
||||
{GL_ONE, GL_ONE, GL_ONE, GL_RED}},
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A8Y8] =
|
||||
{2, false, GL_RG8, GL_RG, GL_UNSIGNED_BYTE,
|
||||
{GL_GREEN, GL_GREEN, GL_GREEN, GL_RED}},
|
||||
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_X1R5G5B5] =
|
||||
{2, true, GL_RGB5, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV},
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A4R4G4B4] =
|
||||
{2, false, GL_RGBA4, GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV},
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_X8R8G8B8] =
|
||||
{4, true, GL_RGB8, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV},
|
||||
[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_SZ_R6G5B5] =
|
||||
{2, false, GL_RGB8_SNORM, GL_RGB, GL_BYTE}, /* FIXME: This might be signed */
|
||||
|
@ -1234,7 +1250,9 @@ static const ColorFormatInfo kelvin_color_format_map[66] = {
|
|||
[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_LU_IMAGE_A8B8G8R8] =
|
||||
{4, true, GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV}
|
||||
{4, true, GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV},
|
||||
[NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_B8G8R8A8] =
|
||||
{4, true, GL_RGBA8, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8}
|
||||
};
|
||||
|
||||
typedef struct SurfaceColorFormatInfo {
|
||||
|
|
Loading…
Reference in New Issue