mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
rsx: Stubs for pitch conversion
This commit is contained in:
parent
2ec039365f
commit
c799ffd223
3 changed files with 31 additions and 4 deletions
|
@ -427,11 +427,17 @@ namespace rsx
|
||||||
|
|
||||||
if (Traits::surface_matches_properties(surface, format, width, height, antialias))
|
if (Traits::surface_matches_properties(surface, format, width, height, antialias))
|
||||||
{
|
{
|
||||||
if (pitch_compatible)
|
if (!pitch_compatible)
|
||||||
Traits::notify_surface_persist(surface);
|
{
|
||||||
else
|
// This object should be pitch-converted and re-intersected with
|
||||||
Traits::invalidate_surface_contents(command_list, Traits::get(surface), address, pitch);
|
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));
|
Traits::prepare_surface_for_drawing(command_list, Traits::get(surface));
|
||||||
new_surface = Traits::get(surface);
|
new_surface = Traits::get(surface);
|
||||||
store = false;
|
store = false;
|
||||||
|
|
|
@ -234,6 +234,17 @@ struct gl_render_target_traits
|
||||||
sink->raster_type = ref->raster_type; // Can't actually cut up swizzled data
|
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
|
static
|
||||||
bool is_compatible_surface(const gl::render_target* surface, const gl::render_target* ref, u16 width, u16 height, u8 sample_count)
|
bool is_compatible_surface(const gl::render_target* surface, const gl::render_target* ref, u16 width, u16 height, u8 sample_count)
|
||||||
{
|
{
|
||||||
|
|
|
@ -329,6 +329,16 @@ namespace vk
|
||||||
sink->raster_type = ref->raster_type; // Can't actually cut up swizzled data
|
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)
|
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() &&
|
return (surface->format() == ref->format() &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue