mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-06 07:05:04 -06:00
Merge branch 'master' into feature/perf-overlay-window-space
This commit is contained in:
commit
d9cc50a29a
@ -37,10 +37,6 @@ QSlider#sizeSlider::handle:horizontal {
|
|||||||
QLabel#toolbar_icon_color {
|
QLabel#toolbar_icon_color {
|
||||||
color: rgba(64,64,64,255);
|
color: rgba(64,64,64,255);
|
||||||
}
|
}
|
||||||
/* thumbnail icon color stylesheet */
|
|
||||||
QLabel#thumbnail_icon_color {
|
|
||||||
color: rgba(0,100,231,255);
|
|
||||||
}
|
|
||||||
/* gamelist icon color stylesheet */
|
/* gamelist icon color stylesheet */
|
||||||
QLabel#gamelist_icon_background_color {
|
QLabel#gamelist_icon_background_color {
|
||||||
color: rgba(209,209,209,255);
|
color: rgba(209,209,209,255);
|
||||||
|
|||||||
@ -237,11 +237,6 @@ QLabel#gamelist_icon_background_color {
|
|||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set Windows Taskbar Thumbnail colors */
|
|
||||||
QLabel#thumbnail_icon_color {
|
|
||||||
color: #262626;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set Log colors */
|
/* Set Log colors */
|
||||||
QPlainTextEdit#log_frame {
|
QPlainTextEdit#log_frame {
|
||||||
background-color: #000; /* Black */
|
background-color: #000; /* Black */
|
||||||
|
|||||||
@ -573,11 +573,6 @@ QLabel#gamelist_icon_background_color {
|
|||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set Windows Taskbar Thumbnail colors */
|
|
||||||
QLabel#thumbnail_icon_color {
|
|
||||||
color: #23262d;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Log colors */
|
/* Log colors */
|
||||||
QPlainTextEdit#log_frame {
|
QPlainTextEdit#log_frame {
|
||||||
background-color: #23262d;
|
background-color: #23262d;
|
||||||
|
|||||||
@ -265,11 +265,6 @@ QLabel#gamelist_icon_background_color {
|
|||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set Taskbar Thumbnail colors */
|
|
||||||
QLabel#thumbnail_icon_color {
|
|
||||||
color: #444444;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Memory Viewer */
|
/* Memory Viewer */
|
||||||
QLabel#memory_viewer_address_panel {
|
QLabel#memory_viewer_address_panel {
|
||||||
color: #00cbff; /* Font Color: Blue */
|
color: #00cbff; /* Font Color: Blue */
|
||||||
|
|||||||
@ -244,11 +244,6 @@ QLabel#gamelist_icon_background_color {
|
|||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set Windows Taskbar Thumbnail colors */
|
|
||||||
QLabel#thumbnail_icon_color {
|
|
||||||
color: #262626;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set Log colors */
|
/* Set Log colors */
|
||||||
QPlainTextEdit#log_frame {
|
QPlainTextEdit#log_frame {
|
||||||
background-color: #181d24; /* Black */
|
background-color: #181d24; /* Black */
|
||||||
|
|||||||
@ -397,12 +397,6 @@ QLabel#gamelist_icon_background_color {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Set Windows Taskbar Thumbnail colors */
|
|
||||||
QLabel#thumbnail_icon_color {
|
|
||||||
color: #ffd785;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QLabel#log_level_always {
|
QLabel#log_level_always {
|
||||||
color: #00ffff; /* Cyan */
|
color: #00ffff; /* Cyan */
|
||||||
}
|
}
|
||||||
|
|||||||
@ -656,11 +656,6 @@ QLabel#color_button {
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set Windows Taskbar Thumbnail colors */
|
|
||||||
QLabel#thumbnail_icon_color {
|
|
||||||
color: #370048;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Debugger colors */
|
/* Debugger colors */
|
||||||
QLabel#debugger_frame_breakpoint {
|
QLabel#debugger_frame_breakpoint {
|
||||||
color: #000; /* Font Color: Black */
|
color: #000; /* Font Color: Black */
|
||||||
|
|||||||
@ -664,11 +664,6 @@ QLabel#color_button {
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set Windows Taskbar Thumbnail colors */
|
|
||||||
QLabel#thumbnail_icon_color {
|
|
||||||
color: #8500ae;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Debugger colors */
|
/* Debugger colors */
|
||||||
QLabel#debugger_frame_breakpoint {
|
QLabel#debugger_frame_breakpoint {
|
||||||
color: #000; /* Font Color: Black */
|
color: #000; /* Font Color: Black */
|
||||||
|
|||||||
@ -379,11 +379,6 @@ QLabel#gamelist_icon_background_color {
|
|||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set Windows Taskbar Thumbnail colors */
|
|
||||||
QLabel#thumbnail_icon_color {
|
|
||||||
color: #4d4940;
|
|
||||||
}
|
|
||||||
|
|
||||||
QLabel#log_level_always {
|
QLabel#log_level_always {
|
||||||
color: #00ffff; /* Cyan */
|
color: #00ffff; /* Cyan */
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,6 +165,14 @@ namespace rsx::assembler
|
|||||||
|
|
||||||
if (opcode == RSX_FP_OPCODE_NOP)
|
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++;
|
pc++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -679,8 +679,7 @@ fragment_program_utils::fragment_program_metadata fragment_program_utils::analys
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsx::assembler::FP::get_operand_count(opcode) > 0 &&
|
if (is_any_src_constant(inst))
|
||||||
is_any_src_constant(inst))
|
|
||||||
{
|
{
|
||||||
// Instruction references constant, skip one slot occupied by data
|
// Instruction references constant, skip one slot occupied by data
|
||||||
index++;
|
index++;
|
||||||
|
|||||||
@ -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);
|
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);
|
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
|
// enable play options if a recent game exists
|
||||||
const bool enable_play_last = !m_recent_game.actions.isEmpty() && m_recent_game.actions.first();
|
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();
|
update_gui_pad_thread();
|
||||||
|
|
||||||
|
show();
|
||||||
|
|
||||||
return true;
|
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()
|
void main_window::RepaintToolBarIcons()
|
||||||
{
|
{
|
||||||
const QColor color = gui::utils::get_foreground_color();
|
const QColor color = gui::utils::get_foreground_color();
|
||||||
@ -2311,7 +2300,6 @@ void main_window::RepaintGui()
|
|||||||
}
|
}
|
||||||
|
|
||||||
RepaintToolBarIcons();
|
RepaintToolBarIcons();
|
||||||
RepaintThumbnailIcons();
|
|
||||||
|
|
||||||
Q_EMIT RequestDialogRepaint();
|
Q_EMIT RequestDialogRepaint();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,7 +134,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void ConfigureGuiFromSettings();
|
void ConfigureGuiFromSettings();
|
||||||
void RepaintToolBarIcons();
|
void RepaintToolBarIcons();
|
||||||
void RepaintThumbnailIcons();
|
|
||||||
void CreateActions();
|
void CreateActions();
|
||||||
void CreateConnects();
|
void CreateConnects();
|
||||||
void CreateDockWindows();
|
void CreateDockWindows();
|
||||||
|
|||||||
@ -312,45 +312,6 @@ namespace gui
|
|||||||
return get_aligned_pixmap(QPixmap(path), icon_size, device_pixel_ratio, mode, h_alignment, v_alignment);
|
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
|
// taken from https://stackoverflow.com/a/30818424/8353754
|
||||||
// because size policies won't work as expected (see similar bugs in Qt bugtracker)
|
// because size policies won't work as expected (see similar bugs in Qt bugtracker)
|
||||||
void resize_combo_box_view(QComboBox* combo)
|
void resize_combo_box_view(QComboBox* combo)
|
||||||
|
|||||||
@ -132,9 +132,6 @@ namespace gui
|
|||||||
// Returns a scaled, aligned QPixmap
|
// 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);
|
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
|
// Workaround: resize the dropdown combobox items
|
||||||
void resize_combo_box_view(QComboBox* combo);
|
void resize_combo_box_view(QComboBox* combo);
|
||||||
|
|
||||||
|
|||||||
@ -24,9 +24,6 @@ namespace gui
|
|||||||
// main window toolbar icon color
|
// main window toolbar icon color
|
||||||
"QLabel#toolbar_icon_color { color: #5b5b5b; }"
|
"QLabel#toolbar_icon_color { color: #5b5b5b; }"
|
||||||
|
|
||||||
// thumbnail icon color
|
|
||||||
"QLabel#thumbnail_icon_color { color: rgba(0, 100, 231, 255); }"
|
|
||||||
|
|
||||||
// game list icon color
|
// game list icon color
|
||||||
"QLabel#gamelist_icon_background_color { color: rgba(240, 240, 240, 255); }"
|
"QLabel#gamelist_icon_background_color { color: rgba(240, 240, 240, 255); }"
|
||||||
|
|
||||||
|
|||||||
@ -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_gr, 1);
|
||||||
EXPECT_EQ(SRC0{ .HEX = graph.blocks.front().instructions[0].bytecode[1] }.exec_if_eq, 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user