mirror of
https://github.com/Yours3lf/rpi-vk-driver.git
synced 2025-02-22 19:54:18 +01:00
updated supported surface formats
This commit is contained in:
parent
5db9524684
commit
4290dcd39d
@ -930,6 +930,7 @@ uint32_t getRenderTargetFormatVC4(VkFormat format)
|
|||||||
{
|
{
|
||||||
case VK_FORMAT_R16G16B16A16_SFLOAT: //HDR mode set in tile binning config mode, so just return a valid format
|
case VK_FORMAT_R16G16B16A16_SFLOAT: //HDR mode set in tile binning config mode, so just return a valid format
|
||||||
case VK_FORMAT_R8G8B8A8_UNORM:
|
case VK_FORMAT_R8G8B8A8_UNORM:
|
||||||
|
case VK_FORMAT_B8G8R8A8_UNORM:
|
||||||
//only here so we can do emulated buffer copies to depth textures
|
//only here so we can do emulated buffer copies to depth textures
|
||||||
case VK_FORMAT_X8_D24_UNORM_PACK32:
|
case VK_FORMAT_X8_D24_UNORM_PACK32:
|
||||||
//only here so we can copy ETC1 textures to optimal format
|
//only here so we can copy ETC1 textures to optimal format
|
||||||
@ -937,6 +938,7 @@ uint32_t getRenderTargetFormatVC4(VkFormat format)
|
|||||||
case VK_FORMAT_D24_UNORM_S8_UINT:
|
case VK_FORMAT_D24_UNORM_S8_UINT:
|
||||||
return VC4_RENDER_CONFIG_FORMAT_RGBA8888;
|
return VC4_RENDER_CONFIG_FORMAT_RGBA8888;
|
||||||
case VK_FORMAT_B5G6R5_UNORM_PACK16:
|
case VK_FORMAT_B5G6R5_UNORM_PACK16:
|
||||||
|
case VK_FORMAT_R5G6B5_UNORM_PACK16:
|
||||||
//TODO
|
//TODO
|
||||||
//case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
|
//case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
|
||||||
//case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
|
//case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
|
||||||
|
@ -237,7 +237,8 @@ void modeset_create_surface_for_mode(int fd, uint32_t display, uint32_t mode, mo
|
|||||||
|
|
||||||
void modeset_create_fb_for_surface(int fd, _image* buf, modeset_display_surface* surface)
|
void modeset_create_fb_for_surface(int fd, _image* buf, modeset_display_surface* surface)
|
||||||
{
|
{
|
||||||
int ret = drmModeAddFB(fd, buf->width, buf->height, 24, 32, buf->stride, buf->boundMem->bo, &buf->fb);
|
int bpp = buf->format == VK_FORMAT_B8G8R8A8_UNORM ? 32 : 16;
|
||||||
|
int ret = drmModeAddFB(fd, buf->width, buf->height, bpp, bpp, buf->stride, buf->boundMem->bo, &buf->fb);
|
||||||
|
|
||||||
if(ret)
|
if(ret)
|
||||||
{
|
{
|
||||||
|
@ -191,11 +191,7 @@ static VkQueueFamilyProperties _queueFamilyProperties[] =
|
|||||||
static VkSurfaceFormatKHR supportedSurfaceFormats[] =
|
static VkSurfaceFormatKHR supportedSurfaceFormats[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
.format = VK_FORMAT_R8G8B8A8_UNORM,
|
.format = VK_FORMAT_B8G8R8A8_UNORM,
|
||||||
.colorSpace = VK_COLOR_SPACE_PASS_THROUGH_EXT
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.format = VK_FORMAT_R16G16B16A16_SFLOAT,
|
|
||||||
.colorSpace = VK_COLOR_SPACE_PASS_THROUGH_EXT
|
.colorSpace = VK_COLOR_SPACE_PASS_THROUGH_EXT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -286,10 +282,13 @@ static VkFormat supportedFormats[] =
|
|||||||
{
|
{
|
||||||
VK_FORMAT_R16G16B16A16_SFLOAT,
|
VK_FORMAT_R16G16B16A16_SFLOAT,
|
||||||
VK_FORMAT_R8G8B8_UNORM,
|
VK_FORMAT_R8G8B8_UNORM,
|
||||||
|
VK_FORMAT_B8G8R8_UNORM,
|
||||||
VK_FORMAT_R8G8B8A8_UNORM,
|
VK_FORMAT_R8G8B8A8_UNORM,
|
||||||
|
VK_FORMAT_B8G8R8A8_UNORM,
|
||||||
VK_FORMAT_R5G5B5A1_UNORM_PACK16,
|
VK_FORMAT_R5G5B5A1_UNORM_PACK16,
|
||||||
VK_FORMAT_R4G4B4A4_UNORM_PACK16,
|
VK_FORMAT_R4G4B4A4_UNORM_PACK16,
|
||||||
VK_FORMAT_R5G6B5_UNORM_PACK16,
|
VK_FORMAT_R5G6B5_UNORM_PACK16,
|
||||||
|
VK_FORMAT_B5G6R5_UNORM_PACK16,
|
||||||
VK_FORMAT_R8G8_UNORM,
|
VK_FORMAT_R8G8_UNORM,
|
||||||
VK_FORMAT_R16_SFLOAT,
|
VK_FORMAT_R16_SFLOAT,
|
||||||
VK_FORMAT_R16_SINT,
|
VK_FORMAT_R16_SINT,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user