rsx: Fix RGB565 blits. Data is byteswapped on input

- Fixes messed up BG on retroarch glyphs
This commit is contained in:
kd-11 2017-12-07 20:46:49 +03:00
parent 6dfe32c6d2
commit 3338fdb936
2 changed files with 6 additions and 3 deletions

View file

@ -1844,7 +1844,10 @@ namespace rsx
if (cached_dest)
{
//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);
}
@ -1871,7 +1874,7 @@ namespace rsx
dest_texture = create_new_texture(cmd, dst.rsx_address, dst.pitch * dst_dimensions.height,
dst_dimensions.width, dst_dimensions.height, 1, 1,
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();
m_texture_memory_in_use += dst.pitch * dst_dimensions.height;

View file

@ -500,7 +500,7 @@ namespace vk
}
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;
}
default: