diff --git a/src/virgl_hw.h b/src/virgl_hw.h index cd828ed..fa8e1c8 100644 --- a/src/virgl_hw.h +++ b/src/virgl_hw.h @@ -194,9 +194,14 @@ enum virgl_formats { VIRGL_FORMAT_R8G8B8X8_SRGB = 230, + VIRGL_FORMAT_R8G8B8X8_UINT = 231, + VIRGL_FORMAT_R8G8B8X8_SINT = 232, VIRGL_FORMAT_B10G10R10X2_UNORM = 233, VIRGL_FORMAT_R16G16B16X16_UNORM = 234, VIRGL_FORMAT_R16G16B16X16_SNORM = 235, + VIRGL_FORMAT_R16G16B16X16_FLOAT = 236, + VIRGL_FORMAT_R16G16B16X16_UINT = 237, + VIRGL_FORMAT_R16G16B16X16_SINT = 238, VIRGL_FORMAT_R10G10B10A2_UINT = 253, diff --git a/src/vrend_formats.c b/src/vrend_formats.c index 09edc43..8f92903 100644 --- a/src/vrend_formats.c +++ b/src/vrend_formats.c @@ -119,10 +119,10 @@ static struct vrend_format_table integer_base_formats[] = { }; static struct vrend_format_table integer_3comp_formats[] = { - { VIRGL_FORMAT_R8G8B8_UINT, GL_RGB8UI, GL_RGB_INTEGER, GL_UNSIGNED_BYTE, NO_SWIZZLE }, - { VIRGL_FORMAT_R8G8B8_SINT, GL_RGB8I, GL_RGB_INTEGER, GL_BYTE, NO_SWIZZLE }, - { VIRGL_FORMAT_R16G16B16_UINT, GL_RGB16UI, GL_RGB_INTEGER, GL_UNSIGNED_SHORT, NO_SWIZZLE }, - { VIRGL_FORMAT_R16G16B16_SINT, GL_RGB16I, GL_RGB_INTEGER, GL_SHORT, NO_SWIZZLE }, + { VIRGL_FORMAT_R8G8B8X8_UINT, GL_RGBA8UI, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE, RGB1_SWIZZLE }, + { VIRGL_FORMAT_R8G8B8X8_SINT, GL_RGBA8I, GL_RGBA_INTEGER, GL_BYTE, RGB1_SWIZZLE }, + { VIRGL_FORMAT_R16G16B16X16_UINT, GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT, RGB1_SWIZZLE }, + { VIRGL_FORMAT_R16G16B16X16_SINT, GL_RGBA16I, GL_RGBA_INTEGER, GL_SHORT, RGB1_SWIZZLE }, { VIRGL_FORMAT_R32G32B32_UINT, GL_RGB32UI, GL_RGB_INTEGER, GL_UNSIGNED_INT, NO_SWIZZLE }, { VIRGL_FORMAT_R32G32B32_SINT, GL_RGB32I, GL_RGB_INTEGER, GL_INT, NO_SWIZZLE }, }; @@ -167,7 +167,7 @@ static struct vrend_format_table float_rg_formats[] = { }; static struct vrend_format_table float_3comp_formats[] = { - { VIRGL_FORMAT_R16G16B16_FLOAT, GL_RGB16F, GL_RGB, GL_HALF_FLOAT, NO_SWIZZLE }, + { VIRGL_FORMAT_R16G16B16X16_FLOAT, GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT, RGB1_SWIZZLE }, { VIRGL_FORMAT_R32G32B32_FLOAT, GL_RGB32F, GL_RGB, GL_FLOAT, NO_SWIZZLE }, };