mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 03:02:53 +01:00
rsx: Workaround for missing AA flags on some surfaces
- This just doesnt work right yet. It looks like AA is being used dynamically? (RDR) - TODO: Try to locate flags to set AA if AA mode is not changed
This commit is contained in:
parent
2385029eab
commit
7037504dcf
@ -1001,11 +1001,36 @@ namespace rsx
|
||||
if (extended_dimension != rsx::texture_dimension_extended::texture_dimension_2d)
|
||||
LOG_ERROR(RSX, "Texture resides in render target memory, but requested type is not 2D (%d)", (u32)extended_dimension);
|
||||
|
||||
const auto surface_width = texptr->get_surface_width();
|
||||
const auto surface_height = texptr->get_surface_height();
|
||||
|
||||
u32 internal_width = tex_width;
|
||||
u32 internal_height = tex_height;
|
||||
get_native_dimensions(internal_width, internal_height, (u32)tex_pitch, texptr);
|
||||
|
||||
bool requires_processing = texptr->get_surface_width() != internal_width || texptr->get_surface_height() != internal_height;
|
||||
if (internal_width > surface_width || internal_height > surface_height)
|
||||
{
|
||||
//An AA flag is likely missing
|
||||
//HACK
|
||||
auto aa_mode = texptr->aa_mode;
|
||||
if ((internal_width >> 1) == surface_width)
|
||||
{
|
||||
if (internal_height > surface_height)
|
||||
texptr->aa_mode = rsx::surface_antialiasing::square_centered_4_samples;
|
||||
else
|
||||
texptr->aa_mode = rsx::surface_antialiasing::diagonal_centered_2_samples;
|
||||
|
||||
internal_width = tex_width;
|
||||
internal_height = tex_height;
|
||||
get_native_dimensions(internal_width, internal_height, (u32)tex_pitch, texptr);
|
||||
}
|
||||
|
||||
internal_width = std::min(internal_width, (u32)surface_width);
|
||||
internal_height = std::min(internal_height, (u32)surface_height);
|
||||
texptr->aa_mode = aa_mode;
|
||||
}
|
||||
|
||||
bool requires_processing = surface_width != internal_width || surface_height != internal_height;
|
||||
if (!requires_processing)
|
||||
{
|
||||
for (const auto& tex : m_rtts.m_bound_render_targets)
|
||||
@ -1052,11 +1077,36 @@ namespace rsx
|
||||
if (extended_dimension != rsx::texture_dimension_extended::texture_dimension_2d)
|
||||
LOG_ERROR(RSX, "Texture resides in depth buffer memory, but requested type is not 2D (%d)", (u32)extended_dimension);
|
||||
|
||||
const auto surface_width = texptr->get_surface_width();
|
||||
const auto surface_height = texptr->get_surface_height();
|
||||
|
||||
u32 internal_width = tex_width;
|
||||
u32 internal_height = tex_height;
|
||||
get_native_dimensions(internal_width, internal_height, (u32)tex_pitch, texptr);
|
||||
|
||||
bool requires_processing = texptr->get_surface_width() != internal_width || texptr->get_surface_height() != internal_height;
|
||||
if (internal_width > surface_width || internal_height > surface_height)
|
||||
{
|
||||
//An AA flag is likely missing
|
||||
//HACK
|
||||
auto aa_mode = texptr->aa_mode;
|
||||
if ((internal_width >> 1) == surface_width)
|
||||
{
|
||||
if (internal_height > surface_height)
|
||||
texptr->aa_mode = rsx::surface_antialiasing::square_centered_4_samples;
|
||||
else
|
||||
texptr->aa_mode = rsx::surface_antialiasing::diagonal_centered_2_samples;
|
||||
|
||||
internal_width = tex_width;
|
||||
internal_height = tex_height;
|
||||
get_native_dimensions(internal_width, internal_height, (u32)tex_pitch, texptr);
|
||||
}
|
||||
|
||||
internal_width = std::min(internal_width, (u32)surface_width);
|
||||
internal_height = std::min(internal_height, (u32)surface_height);
|
||||
texptr->aa_mode = aa_mode;
|
||||
}
|
||||
|
||||
bool requires_processing = surface_width != internal_width || surface_height != internal_height;
|
||||
if (!requires_processing && texaddr == std::get<0>(m_rtts.m_bound_depth_stencil))
|
||||
{
|
||||
if (g_cfg.video.strict_rendering_mode)
|
||||
|
@ -263,7 +263,7 @@ namespace rsx
|
||||
virtual u64 timestamp() const;
|
||||
virtual bool on_access_violation(u32 /*address*/, bool /*is_writing*/) { return false; }
|
||||
virtual void on_notify_memory_unmapped(u32 /*address_base*/, u32 /*size*/) {}
|
||||
virtual void notify_tile_unbound(u32 tile) {}
|
||||
virtual void notify_tile_unbound(u32 /*tile*/) {}
|
||||
|
||||
//zcull
|
||||
virtual void notify_zcull_info_changed() {}
|
||||
|
Loading…
Reference in New Issue
Block a user