rsx: Stubs for pitch conversion

This commit is contained in:
kd-11 2022-08-04 21:35:23 +03:00 committed by kd-11
parent 2ec039365f
commit c799ffd223
3 changed files with 31 additions and 4 deletions

View File

@ -427,11 +427,17 @@ namespace rsx
if (Traits::surface_matches_properties(surface, format, width, height, antialias))
{
if (pitch_compatible)
Traits::notify_surface_persist(surface);
else
Traits::invalidate_surface_contents(command_list, Traits::get(surface), address, pitch);
if (!pitch_compatible)
{
// This object should be pitch-converted and re-intersected with
if (old_surface_storage = Traits::convert_pitch(command_list, surface, pitch))
{
old_surface = Traits::get(old_surface_storage);
Traits::invalidate_surface_contents(command_list, Traits::get(surface), address, pitch);
}
}
Traits::notify_surface_persist(surface);
Traits::prepare_surface_for_drawing(command_list, Traits::get(surface));
new_surface = Traits::get(surface);
store = false;

View File

@ -234,6 +234,17 @@ struct gl_render_target_traits
sink->raster_type = ref->raster_type; // Can't actually cut up swizzled data
}
static
std::unique_ptr<gl::render_target> convert_pitch(
gl::command_context& /*cmd*/,
std::unique_ptr<gl::render_target>& src,
usz out_pitch)
{
// TODO
src->set_rsx_pitch(static_cast<u32>(out_pitch));
return {};
}
static
bool is_compatible_surface(const gl::render_target* surface, const gl::render_target* ref, u16 width, u16 height, u8 sample_count)
{

View File

@ -329,6 +329,16 @@ namespace vk
sink->raster_type = ref->raster_type; // Can't actually cut up swizzled data
}
static std::unique_ptr<vk::render_target> convert_pitch(
vk::command_buffer& /*cmd*/,
std::unique_ptr<vk::render_target>& src,
usz out_pitch)
{
// TODO
src->rsx_pitch = static_cast<u32>(out_pitch);
return {};
}
static bool is_compatible_surface(const vk::render_target* surface, const vk::render_target* ref, u16 width, u16 height, u8 sample_count)
{
return (surface->format() == ref->format() &&