mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
rsx/overlays: Allow some basic communication from the UI components to the backend renderers
This commit is contained in:
parent
ab6ba848b8
commit
3fe9aea5b5
4 changed files with 27 additions and 0 deletions
|
@ -498,6 +498,12 @@ namespace gl
|
||||||
saved_sampler_state save_30(30, m_sampler);
|
saved_sampler_state save_30(30, m_sampler);
|
||||||
saved_sampler_state save_31(31, 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)
|
for (auto& cmd : ui.get_compiled().draw_commands)
|
||||||
{
|
{
|
||||||
set_primitive_type(cmd.config.primitives);
|
set_primitive_type(cmd.config.primitives);
|
||||||
|
|
|
@ -264,6 +264,11 @@ namespace rsx
|
||||||
|
|
||||||
rsx_log.notice("Media dialog: showing entry '%s' ('%s')", m_media->name, m_media->path);
|
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 = std::make_unique<list_view>(1240, 540);
|
||||||
m_list->set_pos(20, 85);
|
m_list->set_pos(20, 85);
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#include "Utilities/mutex.h"
|
#include "Utilities/mutex.h"
|
||||||
#include "Utilities/Timer.h"
|
#include "Utilities/Timer.h"
|
||||||
|
|
||||||
|
#include "../Common/bitfield.hpp"
|
||||||
|
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
@ -16,6 +18,12 @@ namespace rsx
|
||||||
{
|
{
|
||||||
namespace overlays
|
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
|
// Non-interactable UI element
|
||||||
struct overlay
|
struct overlay
|
||||||
{
|
{
|
||||||
|
@ -27,6 +35,7 @@ namespace rsx
|
||||||
|
|
||||||
u32 min_refresh_duration_us = 16600;
|
u32 min_refresh_duration_us = 16600;
|
||||||
atomic_t<bool> visible = false;
|
atomic_t<bool> visible = false;
|
||||||
|
atomic_bitmask_t<status_bits> status_flags = {};
|
||||||
|
|
||||||
virtual ~overlay() = default;
|
virtual ~overlay() = default;
|
||||||
|
|
||||||
|
@ -92,6 +101,7 @@ namespace rsx
|
||||||
pad_button::ls_left,
|
pad_button::ls_left,
|
||||||
pad_button::ls_right
|
pad_button::ls_right
|
||||||
};
|
};
|
||||||
|
|
||||||
atomic_t<bool> m_stop_input_loop = false;
|
atomic_t<bool> m_stop_input_loop = false;
|
||||||
atomic_t<bool> m_interactive = false;
|
atomic_t<bool> m_interactive = false;
|
||||||
bool m_start_pad_interception = true;
|
bool m_start_pad_interception = true;
|
||||||
|
|
|
@ -740,6 +740,12 @@ namespace vk
|
||||||
vk::null_image_view(cmd, VK_IMAGE_VIEW_TYPE_2D_ARRAY)
|
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)
|
for (auto& command : ui.get_compiled().draw_commands)
|
||||||
{
|
{
|
||||||
num_drawable_elements = static_cast<u32>(command.verts.size());
|
num_drawable_elements = static_cast<u32>(command.verts.size());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue