Fix to B8 format render target swizzling (#4123)
This commit is contained in:
@@ -31,7 +31,8 @@ color_format rsx::internals::surface_color_format_to_gl(rsx::surface_color_forma
|
|||||||
return{ ::gl::texture::type::f32, ::gl::texture::format::rgba, true, 4, 4 };
|
return{ ::gl::texture::type::f32, ::gl::texture::format::rgba, true, 4, 4 };
|
||||||
|
|
||||||
case rsx::surface_color_format::b8:
|
case rsx::surface_color_format::b8:
|
||||||
return{ ::gl::texture::type::ubyte, ::gl::texture::format::r, false, 1, 1 };
|
return{ ::gl::texture::type::ubyte, ::gl::texture::format::r, false, 1, 1,
|
||||||
|
{ ::gl::texture::channel::one, ::gl::texture::channel::r, ::gl::texture::channel::r, ::gl::texture::channel::r } };
|
||||||
|
|
||||||
case rsx::surface_color_format::g8b8:
|
case rsx::surface_color_format::g8b8:
|
||||||
return{ ::gl::texture::type::ubyte, ::gl::texture::format::rg, false, 2, 1 };
|
return{ ::gl::texture::type::ubyte, ::gl::texture::format::rg, false, 2, 1 };
|
||||||
|
|||||||
@@ -84,7 +84,10 @@ namespace vk
|
|||||||
}
|
}
|
||||||
|
|
||||||
case rsx::surface_color_format::b8:
|
case rsx::surface_color_format::b8:
|
||||||
return std::make_pair(VK_FORMAT_R8_UNORM, vk::default_component_map());
|
{
|
||||||
|
VkComponentMapping no_alpha = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_ONE };
|
||||||
|
return std::make_pair(VK_FORMAT_R8_UNORM, no_alpha);
|
||||||
|
}
|
||||||
|
|
||||||
case rsx::surface_color_format::g8b8:
|
case rsx::surface_color_format::g8b8:
|
||||||
return std::make_pair(VK_FORMAT_R8G8_UNORM, vk::default_component_map());
|
return std::make_pair(VK_FORMAT_R8G8_UNORM, vk::default_component_map());
|
||||||
@@ -3194,4 +3197,4 @@ void VKGSRender::shell_do_cleanup()
|
|||||||
{
|
{
|
||||||
//TODO: Guard this
|
//TODO: Guard this
|
||||||
m_overlay_cleanup_requests.push_back(0);
|
m_overlay_cleanup_requests.push_back(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user