1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

rsx/overlays: Allow some basic communication from the UI components to the backend renderers

This commit is contained in:
kd-11 2022-10-11 21:37:52 +03:00 committed by Megamouse
parent ab6ba848b8
commit 3fe9aea5b5
4 changed files with 27 additions and 0 deletions

View File

@ -498,6 +498,12 @@ namespace gl
saved_sampler_state save_30(30, m_sampler);
saved_sampler_state save_31(31, m_sampler);
if (ui.status_flags & rsx::overlays::status_bits::invalidate_image_cache)
{
remove_temp_resources(ui.uid);
ui.status_flags.clear(rsx::overlays::status_bits::invalidate_image_cache);
}
for (auto& cmd : ui.get_compiled().draw_commands)
{
set_primitive_type(cmd.config.primitives);

View File

@ -264,6 +264,11 @@ namespace rsx
rsx_log.notice("Media dialog: showing entry '%s' ('%s')", m_media->name, m_media->path);
if (m_list)
{
status_flags |= status_bits::invalidate_image_cache;
}
m_list = std::make_unique<list_view>(1240, 540);
m_list->set_pos(20, 85);

View File

@ -7,6 +7,8 @@
#include "Utilities/mutex.h"
#include "Utilities/Timer.h"
#include "../Common/bitfield.hpp"
#include <mutex>
#include <set>
@ -16,6 +18,12 @@ namespace rsx
{
namespace overlays
{
// Bitfield of UI signals to overlay manager
enum status_bits : u32
{
invalidate_image_cache = 0x0001, // Flush the address-based image cache
};
// Non-interactable UI element
struct overlay
{
@ -27,6 +35,7 @@ namespace rsx
u32 min_refresh_duration_us = 16600;
atomic_t<bool> visible = false;
atomic_bitmask_t<status_bits> status_flags = {};
virtual ~overlay() = default;
@ -92,6 +101,7 @@ namespace rsx
pad_button::ls_left,
pad_button::ls_right
};
atomic_t<bool> m_stop_input_loop = false;
atomic_t<bool> m_interactive = false;
bool m_start_pad_interception = true;

View File

@ -740,6 +740,12 @@ namespace vk
vk::null_image_view(cmd, VK_IMAGE_VIEW_TYPE_2D_ARRAY)
};
if (ui.status_flags & rsx::overlays::status_bits::invalidate_image_cache)
{
remove_temp_resources(ui.uid);
ui.status_flags.clear(rsx::overlays::status_bits::invalidate_image_cache);
}
for (auto& command : ui.get_compiled().draw_commands)
{
num_drawable_elements = static_cast<u32>(command.verts.size());