mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
rsx: Fix AA factor calculation
This commit is contained in:
parent
d46dbc0fa8
commit
b9ea6be842
1 changed files with 18 additions and 5 deletions
|
@ -558,13 +558,26 @@ namespace rsx
|
||||||
const texture_channel_remap_t& decoded_remap,
|
const texture_channel_remap_t& decoded_remap,
|
||||||
bool cyclic_reference)
|
bool cyclic_reference)
|
||||||
{
|
{
|
||||||
|
// Our "desired" output is the source window, and the "actual" output is the real size
|
||||||
const auto& section = desc.external_subresource_desc.sections_to_copy[0];
|
const auto& section = desc.external_subresource_desc.sections_to_copy[0];
|
||||||
|
|
||||||
// Our "desired" output is the source window, and the "actual" output is the real size
|
// Apply AA correct factor
|
||||||
const auto aa_scale_x = section.src->samples() % 2;
|
auto surface_width = section.src->width();
|
||||||
const auto aa_scale_y = section.src->samples() / 2;
|
auto surface_height = section.src->height();
|
||||||
const auto surface_width = section.src->width() * aa_scale_x;
|
switch (section.src->samples())
|
||||||
const auto surface_height = section.src->height() * aa_scale_y;
|
{
|
||||||
|
case 1:
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
surface_width *= 2;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
surface_width *= 2;
|
||||||
|
surface_height *= 2;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fmt::throw_exception("Unsupported MSAA configuration");
|
||||||
|
}
|
||||||
|
|
||||||
// First, we convert this descriptor to a copy descriptor
|
// First, we convert this descriptor to a copy descriptor
|
||||||
desc.external_subresource_desc.external_handle = section.src;
|
desc.external_subresource_desc.external_handle = section.src;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue