mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
rsx: Fix RGB565 blits. Data is byteswapped on input
- Fixes messed up BG on retroarch glyphs
This commit is contained in:
parent
6dfe32c6d2
commit
3338fdb936
2 changed files with 6 additions and 3 deletions
|
@ -1844,7 +1844,10 @@ namespace rsx
|
||||||
if (cached_dest)
|
if (cached_dest)
|
||||||
{
|
{
|
||||||
//Prep surface
|
//Prep surface
|
||||||
auto channel_order = src_is_render_target ? rsx::texture_create_flags::native_component_order : rsx::texture_create_flags::default_component_order;
|
auto channel_order = src_is_render_target ? rsx::texture_create_flags::native_component_order :
|
||||||
|
dst_is_argb8 ? rsx::texture_create_flags::default_component_order :
|
||||||
|
rsx::texture_create_flags::swapped_native_component_order;
|
||||||
|
|
||||||
enforce_surface_creation_type(*cached_dest, gcm_format, channel_order);
|
enforce_surface_creation_type(*cached_dest, gcm_format, channel_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1871,7 +1874,7 @@ namespace rsx
|
||||||
dest_texture = create_new_texture(cmd, dst.rsx_address, dst.pitch * dst_dimensions.height,
|
dest_texture = create_new_texture(cmd, dst.rsx_address, dst.pitch * dst_dimensions.height,
|
||||||
dst_dimensions.width, dst_dimensions.height, 1, 1,
|
dst_dimensions.width, dst_dimensions.height, 1, 1,
|
||||||
gcm_format, rsx::texture_upload_context::blit_engine_dst, rsx::texture_dimension_extended::texture_dimension_2d,
|
gcm_format, rsx::texture_upload_context::blit_engine_dst, rsx::texture_dimension_extended::texture_dimension_2d,
|
||||||
rsx::texture_create_flags::default_component_order,
|
dst_is_argb8? rsx::texture_create_flags::default_component_order : rsx::texture_create_flags::swapped_native_component_order,
|
||||||
default_remap_vector)->get_raw_texture();
|
default_remap_vector)->get_raw_texture();
|
||||||
|
|
||||||
m_texture_memory_in_use += dst.pitch * dst_dimensions.height;
|
m_texture_memory_in_use += dst.pitch * dst_dimensions.height;
|
||||||
|
|
|
@ -500,7 +500,7 @@ namespace vk
|
||||||
}
|
}
|
||||||
case rsx::texture_create_flags::swapped_native_component_order:
|
case rsx::texture_create_flags::swapped_native_component_order:
|
||||||
{
|
{
|
||||||
mapping = { VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_A };
|
mapping = { VK_COMPONENT_SWIZZLE_A, VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B };
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue