mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 10:18:40 +12:00
rsx: Handle mismatched/invalidated framebuffer sections when WCB is enabled
This commit is contained in:
parent
ef071ebb6b
commit
6ef9dcd62e
1 changed files with 13 additions and 3 deletions
|
@ -1897,16 +1897,26 @@ namespace rsx
|
||||||
auto cached_texture = find_texture_from_dimensions(texaddr, tex_width, tex_height, depth);
|
auto cached_texture = find_texture_from_dimensions(texaddr, tex_width, tex_height, depth);
|
||||||
if (cached_texture)
|
if (cached_texture)
|
||||||
{
|
{
|
||||||
//TODO: Handle invalidated framebuffer textures better. This is awful
|
// TODO: Handle invalidated framebuffer textures better. This is awful
|
||||||
if (cached_texture->get_context() == rsx::texture_upload_context::framebuffer_storage)
|
while (cached_texture->get_context() == rsx::texture_upload_context::framebuffer_storage)
|
||||||
{
|
{
|
||||||
if (!cached_texture->is_locked())
|
if (!cached_texture->is_locked())
|
||||||
{
|
{
|
||||||
lock.upgrade();
|
lock.upgrade();
|
||||||
cached_texture->set_dirty(true);
|
cached_texture->set_dirty(true);
|
||||||
|
|
||||||
|
// Check again for another match if possible
|
||||||
|
cached_texture = find_texture_from_dimensions(texaddr, tex_width, tex_height, depth);
|
||||||
|
if (!cached_texture) break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Let it play out (will be unlocked and flushed before a shader_read is uploaded)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (cached_texture && cached_texture->get_context() != rsx::texture_upload_context::framebuffer_storage)
|
||||||
{
|
{
|
||||||
if (cached_texture->get_image_type() == rsx::texture_dimension_extended::texture_dimension_1d)
|
if (cached_texture->get_image_type() == rsx::texture_dimension_extended::texture_dimension_1d)
|
||||||
scale_y = 0.f;
|
scale_y = 0.f;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue