Merge branch 'master' into feature/perf-overlay-window-space

This commit is contained in:
BehroozRezvani 2026-03-21 16:10:35 +00:00 committed by GitHub
commit d9cc50a29a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 36 additions and 107 deletions

View File

@ -37,10 +37,6 @@ QSlider#sizeSlider::handle:horizontal {
QLabel#toolbar_icon_color {
color: rgba(64,64,64,255);
}
/* thumbnail icon color stylesheet */
QLabel#thumbnail_icon_color {
color: rgba(0,100,231,255);
}
/* gamelist icon color stylesheet */
QLabel#gamelist_icon_background_color {
color: rgba(209,209,209,255);

View File

@ -237,11 +237,6 @@ QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #262626;
}
/* Set Log colors */
QPlainTextEdit#log_frame {
background-color: #000; /* Black */

View File

@ -573,11 +573,6 @@ QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #23262d;
}
/* Log colors */
QPlainTextEdit#log_frame {
background-color: #23262d;

View File

@ -265,11 +265,6 @@ QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #444444;
}
/* Memory Viewer */
QLabel#memory_viewer_address_panel {
color: #00cbff; /* Font Color: Blue */

View File

@ -244,11 +244,6 @@ QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #262626;
}
/* Set Log colors */
QPlainTextEdit#log_frame {
background-color: #181d24; /* Black */

View File

@ -397,12 +397,6 @@ QLabel#gamelist_icon_background_color {
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #ffd785;
}
QLabel#log_level_always {
color: #00ffff; /* Cyan */
}

View File

@ -656,11 +656,6 @@ QLabel#color_button {
background: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #370048;
}
/* Debugger colors */
QLabel#debugger_frame_breakpoint {
color: #000; /* Font Color: Black */

View File

@ -664,11 +664,6 @@ QLabel#color_button {
background: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #8500ae;
}
/* Debugger colors */
QLabel#debugger_frame_breakpoint {
color: #000; /* Font Color: Black */

View File

@ -379,11 +379,6 @@ QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #4d4940;
}
QLabel#log_level_always {
color: #00ffff; /* Cyan */
}

View File

@ -165,6 +165,14 @@ namespace rsx::assembler
if (opcode == RSX_FP_OPCODE_NOP)
{
if (includes_literal_constant())
{
// Verified behavior on real hardware
// If any input on a non-flow-control instruction is of literal type the next instruction is assumed to be data
// You can actually use this behavior to mask off instructions completely
pc++;
}
pc++;
continue;
}

View File

@ -679,8 +679,7 @@ fragment_program_utils::fragment_program_metadata fragment_program_utils::analys
break;
}
if (rsx::assembler::FP::get_operand_count(opcode) > 0 &&
is_any_src_constant(inst))
if (is_any_src_constant(inst))
{
// Instruction references constant, skip one slot occupied by data
index++;

View File

@ -213,8 +213,6 @@ bool main_window::Init([[maybe_unused]] bool with_cli_boot)
m_shortcut_handler = new shortcut_handler(gui::shortcuts::shortcut_handler_id::main_window, this, m_gui_settings);
connect(m_shortcut_handler, &shortcut_handler::shortcut_activated, this, &main_window::handle_shortcut);
show(); // needs to be done before creating the thumbnail toolbar
// enable play options if a recent game exists
const bool enable_play_last = !m_recent_game.actions.isEmpty() && m_recent_game.actions.first();
@ -279,6 +277,8 @@ bool main_window::Init([[maybe_unused]] bool with_cli_boot)
update_gui_pad_thread();
show();
return true;
}
@ -1795,17 +1795,6 @@ void main_window::SaveWindowState() const
}
}
void main_window::RepaintThumbnailIcons()
{
const QColor color = gui::utils::get_foreground_color();
[[maybe_unused]] const QColor new_color = gui::utils::get_label_color("thumbnail_icon_color", color, color);
[[maybe_unused]] const auto icon = [&new_color](const QString& path)
{
return gui::utils::get_colorized_icon(QPixmap::fromImage(gui::utils::get_opaque_image_area(path)), Qt::black, new_color);
};
}
void main_window::RepaintToolBarIcons()
{
const QColor color = gui::utils::get_foreground_color();
@ -2311,7 +2300,6 @@ void main_window::RepaintGui()
}
RepaintToolBarIcons();
RepaintThumbnailIcons();
Q_EMIT RequestDialogRepaint();
}

View File

@ -134,7 +134,6 @@ protected:
private:
void ConfigureGuiFromSettings();
void RepaintToolBarIcons();
void RepaintThumbnailIcons();
void CreateActions();
void CreateConnects();
void CreateDockWindows();

View File

@ -312,45 +312,6 @@ namespace gui
return get_aligned_pixmap(QPixmap(path), icon_size, device_pixel_ratio, mode, h_alignment, v_alignment);
}
QImage get_opaque_image_area(const QString& path)
{
QImage image = QImage(path);
int w_min = 0;
int w_max = image.width();
int h_min = 0;
int h_max = image.height();
for (int y = 0; y < image.height(); ++y)
{
const QRgb* row = reinterpret_cast<const QRgb*>(image.constScanLine(y));
bool row_filled = false;
for (int x = 0; x < image.width(); ++x)
{
if (qAlpha(row[x]))
{
row_filled = true;
w_min = std::max(w_min, x);
if (w_max > x)
{
w_max = x;
x = w_min;
}
}
}
if (row_filled)
{
h_max = std::min(h_max, y);
h_min = y;
}
}
return image.copy(QRect(QPoint(w_max, h_max), QPoint(w_min, h_min)));
}
// taken from https://stackoverflow.com/a/30818424/8353754
// because size policies won't work as expected (see similar bugs in Qt bugtracker)
void resize_combo_box_view(QComboBox* combo)

View File

@ -132,9 +132,6 @@ namespace gui
// Returns a scaled, aligned QPixmap
QPixmap get_aligned_pixmap(const QString& path, const QSize& icon_size, qreal device_pixel_ratio, Qt::TransformationMode mode, align_h h_alignment, align_v v_alignment);
// Returns the part of the image loaded from path that is inside the bounding box of its opaque areas
QImage get_opaque_image_area(const QString& path);
// Workaround: resize the dropdown combobox items
void resize_combo_box_view(QComboBox* combo);

View File

@ -24,9 +24,6 @@ namespace gui
// main window toolbar icon color
"QLabel#toolbar_icon_color { color: #5b5b5b; }"
// thumbnail icon color
"QLabel#thumbnail_icon_color { color: rgba(0, 100, 231, 255); }"
// game list icon color
"QLabel#gamelist_icon_background_color { color: rgba(240, 240, 240, 255); }"

View File

@ -251,4 +251,29 @@ namespace rsx::assembler
EXPECT_EQ(SRC0{ .HEX = graph.blocks.front().instructions[0].bytecode[1] }.exec_if_gr, 1);
EXPECT_EQ(SRC0{ .HEX = graph.blocks.front().instructions[0].bytecode[1] }.exec_if_eq, 1);
}
TEST(CFG, FpToCFG_SkipOverImmediateOperand)
{
auto ir = FPIR::from_source(
"MOV R0, #{ 0.25 };" // NOP with real dst and one literal input
"MOV R0, R1;" // False merge block.
);
RSXFragmentProgram program{};
auto bytecode = ir.compile();
program.data = bytecode.data();
ASSERT_EQ(bytecode.size(), 12);
// Patch the first instruction to be a NOP with a literal as input
const u32 decoded_d0 = ((bytecode[0] & 0xFF00FF00u) >> 16u) | ((bytecode[0] & 0x00FF00FFu) << 16u);
OPDEST d0{ .HEX = decoded_d0 };
d0.opcode = RSX_FP_OPCODE_NOP;
bytecode[0] = ((d0.HEX & 0xFF00FF00u) >> 16u) | ((d0.HEX & 0x00FF00FFu) << 16u);
FlowGraph graph = deconstruct_fragment_program(program);
ASSERT_EQ(graph.blocks.size(), 1);
ASSERT_EQ(graph.blocks.front().instructions.size(), 1);
}
}