mirror of https://github.com/RPCS3/rpcs3.git
rsx: Fix flip source selector
This commit is contained in:
parent
a21bdb9f45
commit
23dc9d54e3
|
@ -1436,7 +1436,9 @@ void GLGSRender::flip(int buffer)
|
||||||
u32 buffer_height = display_buffers[buffer].height;
|
u32 buffer_height = display_buffers[buffer].height;
|
||||||
u32 buffer_pitch = display_buffers[buffer].pitch;
|
u32 buffer_pitch = display_buffers[buffer].pitch;
|
||||||
|
|
||||||
if ((u32)buffer < display_buffers_count && buffer_width && buffer_height && buffer_pitch)
|
if (!buffer_pitch) buffer_pitch = buffer_width * 4;
|
||||||
|
|
||||||
|
if ((u32)buffer < display_buffers_count && buffer_width && buffer_height)
|
||||||
{
|
{
|
||||||
// Calculate blit coordinates
|
// Calculate blit coordinates
|
||||||
coordi aspect_ratio;
|
coordi aspect_ratio;
|
||||||
|
@ -1476,7 +1478,7 @@ void GLGSRender::flip(int buffer)
|
||||||
|
|
||||||
image = render_target_texture->raw_handle();
|
image = render_target_texture->raw_handle();
|
||||||
}
|
}
|
||||||
else if (auto surface = m_gl_texture_cache.find_texture_from_dimensions(absolute_address))
|
else if (auto surface = m_gl_texture_cache.find_texture_from_dimensions(absolute_address, buffer_width, buffer_height))
|
||||||
{
|
{
|
||||||
//Hack - this should be the first location to check for output
|
//Hack - this should be the first location to check for output
|
||||||
//The render might have been done offscreen or in software and a blit used to display
|
//The render might have been done offscreen or in software and a blit used to display
|
||||||
|
@ -1486,7 +1488,6 @@ void GLGSRender::flip(int buffer)
|
||||||
{
|
{
|
||||||
LOG_WARNING(RSX, "Flip texture was not found in cache. Uploading surface from CPU");
|
LOG_WARNING(RSX, "Flip texture was not found in cache. Uploading surface from CPU");
|
||||||
|
|
||||||
if (!buffer_pitch) buffer_pitch = buffer_width * 4;
|
|
||||||
gl::pixel_unpack_settings unpack_settings;
|
gl::pixel_unpack_settings unpack_settings;
|
||||||
unpack_settings.alignment(1).row_length(buffer_pitch / 4);
|
unpack_settings.alignment(1).row_length(buffer_pitch / 4);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Emu/Memory/vm.h"
|
#include "Emu/Memory/vm.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "VKGSRender.h"
|
#include "VKGSRender.h"
|
||||||
|
@ -2922,7 +2922,6 @@ void VKGSRender::flip(int buffer)
|
||||||
|
|
||||||
u32 buffer_width = display_buffers[buffer].width;
|
u32 buffer_width = display_buffers[buffer].width;
|
||||||
u32 buffer_height = display_buffers[buffer].height;
|
u32 buffer_height = display_buffers[buffer].height;
|
||||||
u32 buffer_pitch = display_buffers[buffer].pitch;
|
|
||||||
|
|
||||||
coordi aspect_ratio;
|
coordi aspect_ratio;
|
||||||
|
|
||||||
|
@ -2999,7 +2998,7 @@ void VKGSRender::flip(int buffer)
|
||||||
//Blit contents to screen..
|
//Blit contents to screen..
|
||||||
vk::image* image_to_flip = nullptr;
|
vk::image* image_to_flip = nullptr;
|
||||||
|
|
||||||
if ((u32)buffer < display_buffers_count && buffer_width && buffer_height && buffer_pitch)
|
if ((u32)buffer < display_buffers_count && buffer_width && buffer_height)
|
||||||
{
|
{
|
||||||
rsx::tiled_region buffer_region = get_tiled_address(display_buffers[buffer].offset, CELL_GCM_LOCATION_LOCAL);
|
rsx::tiled_region buffer_region = get_tiled_address(display_buffers[buffer].offset, CELL_GCM_LOCATION_LOCAL);
|
||||||
u32 absolute_address = buffer_region.address + buffer_region.base;
|
u32 absolute_address = buffer_region.address + buffer_region.base;
|
||||||
|
@ -3008,7 +3007,7 @@ void VKGSRender::flip(int buffer)
|
||||||
{
|
{
|
||||||
image_to_flip = render_target_texture;
|
image_to_flip = render_target_texture;
|
||||||
}
|
}
|
||||||
else if (auto surface = m_texture_cache.find_texture_from_dimensions(absolute_address))
|
else if (auto surface = m_texture_cache.find_texture_from_dimensions(absolute_address, buffer_width, buffer_height))
|
||||||
{
|
{
|
||||||
//Hack - this should be the first location to check for output
|
//Hack - this should be the first location to check for output
|
||||||
//The render might have been done offscreen or in software and a blit used to display
|
//The render might have been done offscreen or in software and a blit used to display
|
||||||
|
|
Loading…
Reference in New Issue