rsx: Properly fill in the cyclic ref field for framebuffer references
This commit is contained in:
@@ -262,6 +262,8 @@ namespace rsx
|
|||||||
if (sections.size() == 1 && section_fills_target(sections[0]))
|
if (sections.size() == 1 && section_fills_target(sections[0]))
|
||||||
{
|
{
|
||||||
const auto cpy = sections[0];
|
const auto cpy = sections[0];
|
||||||
|
external_subresource_desc.external_ref_addr = cpy.base_addr;
|
||||||
|
|
||||||
if (section_is_transfer_only(cpy))
|
if (section_is_transfer_only(cpy))
|
||||||
{
|
{
|
||||||
// Change the command to copy_image_static
|
// Change the command to copy_image_static
|
||||||
@@ -275,7 +277,6 @@ namespace rsx
|
|||||||
// Blit op is a semantic variant of the copy and atlas ops.
|
// Blit op is a semantic variant of the copy and atlas ops.
|
||||||
// We can simply reuse the atlas handler for this for now, but this allows simplification.
|
// We can simply reuse the atlas handler for this for now, but this allows simplification.
|
||||||
external_subresource_desc.op = deferred_request_command::blit_image_static;
|
external_subresource_desc.op = deferred_request_command::blit_image_static;
|
||||||
external_subresource_desc.external_ref_addr = cpy.base_addr;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1997,7 +1998,7 @@ namespace rsx
|
|||||||
position2i(result.external_subresource_desc.x, result.external_subresource_desc.y),
|
position2i(result.external_subresource_desc.x, result.external_subresource_desc.y),
|
||||||
size2i(result.external_subresource_desc.width, result.external_subresource_desc.height),
|
size2i(result.external_subresource_desc.width, result.external_subresource_desc.height),
|
||||||
size2i(result.external_subresource_desc.external_handle->width(), result.external_subresource_desc.external_handle->height()),
|
size2i(result.external_subresource_desc.external_handle->width(), result.external_subresource_desc.external_handle->height()),
|
||||||
encoded_remap, remap, false /* FIXME */);
|
encoded_remap, remap, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2005,9 +2006,10 @@ namespace rsx
|
|||||||
result,
|
result,
|
||||||
encoded_remap,
|
encoded_remap,
|
||||||
remap,
|
remap,
|
||||||
false /* FIXME */);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result.is_cyclic_reference = !!result.ref_address && m_rtts.address_is_bound(result.ref_address);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ namespace rsx
|
|||||||
({
|
({
|
||||||
.src = section.surface->get_surface(rsx::surface_access::transfer_read),
|
.src = section.surface->get_surface(rsx::surface_access::transfer_read),
|
||||||
.xform = surface_transform::identity,
|
.xform = surface_transform::identity,
|
||||||
.base_addr = section.base_addr,
|
.base_addr = section.base_address,
|
||||||
.level = 0,
|
.level = 0,
|
||||||
.src_x = static_cast<u16>(src_x),
|
.src_x = static_cast<u16>(src_x),
|
||||||
.src_y = static_cast<u16>(src_y),
|
.src_y = static_cast<u16>(src_y),
|
||||||
@@ -384,7 +384,6 @@ namespace rsx
|
|||||||
({
|
({
|
||||||
.src = section->get_raw_texture(),
|
.src = section->get_raw_texture(),
|
||||||
.xform = surface_transform::identity,
|
.xform = surface_transform::identity,
|
||||||
.base_addr = address,
|
|
||||||
.level = 0,
|
.level = 0,
|
||||||
.src_x = static_cast<u16>(src_offset.x), // src.x
|
.src_x = static_cast<u16>(src_offset.x), // src.x
|
||||||
.src_y = static_cast<u16>(src_offset.y), // src.y
|
.src_y = static_cast<u16>(src_offset.y), // src.y
|
||||||
@@ -542,6 +541,7 @@ namespace rsx
|
|||||||
bool cyclic_reference)
|
bool cyclic_reference)
|
||||||
{
|
{
|
||||||
desc.image_handle = desc.external_subresource_desc.as_viewable()->get_view(encoded_remap, decoded_remap);
|
desc.image_handle = desc.external_subresource_desc.as_viewable()->get_view(encoded_remap, decoded_remap);
|
||||||
|
desc.ref_address = desc.external_subresource_desc.external_ref_addr;
|
||||||
desc.is_cyclic_reference = cyclic_reference;
|
desc.is_cyclic_reference = cyclic_reference;
|
||||||
desc.samples = desc.external_subresource_desc.external_handle->samples();
|
desc.samples = desc.external_subresource_desc.external_handle->samples();
|
||||||
desc.external_subresource_desc = {};
|
desc.external_subresource_desc = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user