Compare commits
42 Commits
__refs_pul
...
__refs_pul
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a491f7aaa | ||
|
|
4653effad8 | ||
|
|
67c3c65f7b | ||
|
|
413df0811d | ||
|
|
82e2ac6026 | ||
|
|
1551f97950 | ||
|
|
5a106cf11e | ||
|
|
28fde29924 | ||
|
|
58a10ed5d0 | ||
|
|
2817af0961 | ||
|
|
0953cdd271 | ||
|
|
a0e8e5b22e | ||
|
|
122a8faa38 | ||
|
|
d7dbd8e774 | ||
|
|
4294429a07 | ||
|
|
bb2aec00a2 | ||
|
|
3ba53f2511 | ||
|
|
2f2ef5b147 | ||
|
|
0e8f98a441 | ||
|
|
87b02f78e1 | ||
|
|
c277dad25f | ||
|
|
cbcf210c19 | ||
|
|
0eae0b6803 | ||
|
|
74404261d2 | ||
|
|
e2c68edd35 | ||
|
|
9f974ea818 | ||
|
|
385ddef8c3 | ||
|
|
fa8581e900 | ||
|
|
eaf425bd32 | ||
|
|
1caa84e652 | ||
|
|
fda0e7e989 | ||
|
|
6bf1436f5c | ||
|
|
ffb12f4f9f | ||
|
|
a4cd747122 | ||
|
|
3be8312120 | ||
|
|
279005448a | ||
|
|
948ac976d1 | ||
|
|
0df43e4e07 | ||
|
|
efbb6fe288 | ||
|
|
115bf20448 | ||
|
|
c19c8ac92c | ||
|
|
9ed4c13758 |
2
externals/dynarmic
vendored
2
externals/dynarmic
vendored
Submodule externals/dynarmic updated: a1cbea7948...befe547d56
@@ -20,25 +20,25 @@ static void SrcProcessFrame(std::span<s32> output, std::span<const s32> input,
|
||||
const u32 target_sample_count, const u32 source_sample_count,
|
||||
UpsamplerState* state) {
|
||||
constexpr u32 WindowSize = 10;
|
||||
constexpr std::array<Common::FixedPoint<24, 8>, WindowSize> SincWindow1{
|
||||
51.93359375f, -18.80078125f, 9.73046875f, -5.33203125f, 2.84375f,
|
||||
-1.41015625f, 0.62109375f, -0.2265625f, 0.0625f, -0.00390625f,
|
||||
constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc1{
|
||||
0.95376587f, -0.12872314f, 0.060028076f, -0.032470703f, 0.017669678f,
|
||||
-0.009124756f, 0.004272461f, -0.001739502f, 0.000579834f, -0.000091552734f,
|
||||
};
|
||||
constexpr std::array<Common::FixedPoint<24, 8>, WindowSize> SincWindow2{
|
||||
105.35546875f, -24.52734375f, 11.9609375f, -6.515625f, 3.52734375f,
|
||||
-1.796875f, 0.828125f, -0.32421875f, 0.1015625f, -0.015625f,
|
||||
constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc2{
|
||||
0.8230896f, -0.19161987f, 0.093444824f, -0.05090332f, 0.027557373f,
|
||||
-0.014038086f, 0.0064697266f, -0.002532959f, 0.00079345703f, -0.00012207031f,
|
||||
};
|
||||
constexpr std::array<Common::FixedPoint<24, 8>, WindowSize> SincWindow3{
|
||||
122.08203125f, -16.47656250f, 7.68359375f, -4.15625000f, 2.26171875f,
|
||||
-1.16796875f, 0.54687500f, -0.22265625f, 0.07421875f, -0.01171875f,
|
||||
constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc3{
|
||||
0.6298828f, -0.19274902f, 0.09725952f, -0.05319214f, 0.028625488f,
|
||||
-0.014373779f, 0.006500244f, -0.0024719238f, 0.0007324219f, -0.000091552734f,
|
||||
};
|
||||
constexpr std::array<Common::FixedPoint<24, 8>, WindowSize> SincWindow4{
|
||||
23.73437500f, -9.62109375f, 5.07812500f, -2.78125000f, 1.46875000f,
|
||||
-0.71484375f, 0.30859375f, -0.10546875f, 0.02734375f, 0.00000000f,
|
||||
constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc4{
|
||||
0.4057312f, -0.1468811f, 0.07601929f, -0.041656494f, 0.022216797f,
|
||||
-0.011016846f, 0.004852295f, -0.0017700195f, 0.00048828125f, -0.000030517578f,
|
||||
};
|
||||
constexpr std::array<Common::FixedPoint<24, 8>, WindowSize> SincWindow5{
|
||||
80.62500000f, -24.67187500f, 12.44921875f, -6.80859375f, 3.66406250f,
|
||||
-1.83984375f, 0.83203125f, -0.31640625f, 0.09375000f, -0.01171875f,
|
||||
constexpr std::array<Common::FixedPoint<17, 15>, WindowSize> WindowedSinc5{
|
||||
0.1854248f, -0.075164795f, 0.03967285f, -0.021728516f, 0.011474609f,
|
||||
-0.005584717f, 0.0024108887f, -0.0008239746f, 0.00021362305f, 0.0f,
|
||||
};
|
||||
|
||||
if (!state->initialized) {
|
||||
@@ -91,52 +91,31 @@ static void SrcProcessFrame(std::span<s32> output, std::span<const s32> input,
|
||||
static_cast<u16>((state->history_output_index + 1) % UpsamplerState::HistorySize);
|
||||
};
|
||||
|
||||
auto calculate_sample = [&state](std::span<const Common::FixedPoint<24, 8>> coeffs1,
|
||||
std::span<const Common::FixedPoint<24, 8>> coeffs2) -> s32 {
|
||||
auto calculate_sample = [&state](std::span<const Common::FixedPoint<17, 15>> coeffs1,
|
||||
std::span<const Common::FixedPoint<17, 15>> coeffs2) -> s32 {
|
||||
auto output_index{state->history_output_index};
|
||||
auto start_pos{output_index - state->history_start_index + 1U};
|
||||
auto end_pos{10U};
|
||||
u64 result{0};
|
||||
|
||||
if (start_pos < 10) {
|
||||
end_pos = start_pos;
|
||||
}
|
||||
for (u32 coeff_index = 0; coeff_index < 10; coeff_index++) {
|
||||
result += static_cast<u64>(state->history[output_index].to_raw()) *
|
||||
coeffs1[coeff_index].to_raw();
|
||||
|
||||
u64 prev_contrib{0};
|
||||
u32 coeff_index{0};
|
||||
for (; coeff_index < end_pos; coeff_index++, output_index--) {
|
||||
prev_contrib += static_cast<u64>(state->history[output_index].to_raw()) *
|
||||
coeffs1[coeff_index].to_raw();
|
||||
}
|
||||
|
||||
auto end_index{state->history_end_index};
|
||||
for (; start_pos < 9; start_pos++, coeff_index++, end_index--) {
|
||||
prev_contrib += static_cast<u64>(state->history[end_index].to_raw()) *
|
||||
coeffs1[coeff_index].to_raw();
|
||||
output_index = output_index == state->history_start_index ? state->history_end_index
|
||||
: output_index - 1;
|
||||
}
|
||||
|
||||
output_index =
|
||||
static_cast<u16>((state->history_output_index + 1) % UpsamplerState::HistorySize);
|
||||
start_pos = state->history_end_index - output_index + 1U;
|
||||
end_pos = 10U;
|
||||
|
||||
if (start_pos < 10) {
|
||||
end_pos = start_pos;
|
||||
for (u32 coeff_index = 0; coeff_index < 10; coeff_index++) {
|
||||
result += static_cast<u64>(state->history[output_index].to_raw()) *
|
||||
coeffs2[coeff_index].to_raw();
|
||||
|
||||
output_index = output_index == state->history_end_index ? state->history_start_index
|
||||
: output_index + 1;
|
||||
}
|
||||
|
||||
u64 next_contrib{0};
|
||||
coeff_index = 0;
|
||||
for (; coeff_index < end_pos; coeff_index++, output_index++) {
|
||||
next_contrib += static_cast<u64>(state->history[output_index].to_raw()) *
|
||||
coeffs2[coeff_index].to_raw();
|
||||
}
|
||||
|
||||
auto start_index{state->history_start_index};
|
||||
for (; start_pos < 9; start_pos++, start_index++, coeff_index++) {
|
||||
next_contrib += static_cast<u64>(state->history[start_index].to_raw()) *
|
||||
coeffs2[coeff_index].to_raw();
|
||||
}
|
||||
|
||||
return static_cast<s32>(((prev_contrib >> 15) + (next_contrib >> 15)) >> 8);
|
||||
return static_cast<s32>(result >> (8 + 15));
|
||||
};
|
||||
|
||||
switch (state->ratio.to_int_floor()) {
|
||||
@@ -150,23 +129,23 @@ static void SrcProcessFrame(std::span<s32> output, std::span<const s32> input,
|
||||
break;
|
||||
|
||||
case 1:
|
||||
output[write_index] = calculate_sample(SincWindow3, SincWindow4);
|
||||
output[write_index] = calculate_sample(WindowedSinc1, WindowedSinc5);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
output[write_index] = calculate_sample(SincWindow2, SincWindow1);
|
||||
output[write_index] = calculate_sample(WindowedSinc2, WindowedSinc4);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
output[write_index] = calculate_sample(SincWindow5, SincWindow5);
|
||||
output[write_index] = calculate_sample(WindowedSinc3, WindowedSinc3);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
output[write_index] = calculate_sample(SincWindow1, SincWindow2);
|
||||
output[write_index] = calculate_sample(WindowedSinc4, WindowedSinc2);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
output[write_index] = calculate_sample(SincWindow4, SincWindow3);
|
||||
output[write_index] = calculate_sample(WindowedSinc5, WindowedSinc1);
|
||||
break;
|
||||
}
|
||||
state->sample_index = static_cast<u8>((state->sample_index + 1) % 6);
|
||||
@@ -183,11 +162,11 @@ static void SrcProcessFrame(std::span<s32> output, std::span<const s32> input,
|
||||
break;
|
||||
|
||||
case 1:
|
||||
output[write_index] = calculate_sample(SincWindow2, SincWindow1);
|
||||
output[write_index] = calculate_sample(WindowedSinc2, WindowedSinc4);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
output[write_index] = calculate_sample(SincWindow1, SincWindow2);
|
||||
output[write_index] = calculate_sample(WindowedSinc4, WindowedSinc2);
|
||||
break;
|
||||
}
|
||||
state->sample_index = static_cast<u8>((state->sample_index + 1) % 3);
|
||||
@@ -204,12 +183,12 @@ static void SrcProcessFrame(std::span<s32> output, std::span<const s32> input,
|
||||
break;
|
||||
|
||||
case 1:
|
||||
output[write_index] = calculate_sample(SincWindow1, SincWindow2);
|
||||
output[write_index] = calculate_sample(WindowedSinc4, WindowedSinc2);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
increment();
|
||||
output[write_index] = calculate_sample(SincWindow2, SincWindow1);
|
||||
output[write_index] = calculate_sample(WindowedSinc2, WindowedSinc4);
|
||||
break;
|
||||
}
|
||||
state->sample_index = static_cast<u8>((state->sample_index + 1) % 3);
|
||||
|
||||
@@ -129,6 +129,10 @@ void UpdateRescalingInfo() {
|
||||
info.up_scale = 1;
|
||||
info.down_shift = 0;
|
||||
break;
|
||||
case ResolutionSetup::Res3_2X:
|
||||
info.up_scale = 3;
|
||||
info.down_shift = 1;
|
||||
break;
|
||||
case ResolutionSetup::Res2X:
|
||||
info.up_scale = 2;
|
||||
info.down_shift = 0;
|
||||
@@ -149,6 +153,14 @@ void UpdateRescalingInfo() {
|
||||
info.up_scale = 6;
|
||||
info.down_shift = 0;
|
||||
break;
|
||||
case ResolutionSetup::Res7X:
|
||||
info.up_scale = 7;
|
||||
info.down_shift = 0;
|
||||
break;
|
||||
case ResolutionSetup::Res8X:
|
||||
info.up_scale = 8;
|
||||
info.down_shift = 0;
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
info.up_scale = 1;
|
||||
|
||||
@@ -56,11 +56,14 @@ enum class ResolutionSetup : u32 {
|
||||
Res1_2X = 0,
|
||||
Res3_4X = 1,
|
||||
Res1X = 2,
|
||||
Res2X = 3,
|
||||
Res3X = 4,
|
||||
Res4X = 5,
|
||||
Res5X = 6,
|
||||
Res6X = 7,
|
||||
Res3_2X = 3,
|
||||
Res2X = 4,
|
||||
Res3X = 5,
|
||||
Res4X = 6,
|
||||
Res5X = 7,
|
||||
Res6X = 8,
|
||||
Res7X = 9,
|
||||
Res8X = 10,
|
||||
};
|
||||
|
||||
enum class ScalingFilter : u32 {
|
||||
@@ -415,7 +418,7 @@ struct Values {
|
||||
// Renderer
|
||||
SwitchableSetting<RendererBackend, true> renderer_backend{
|
||||
RendererBackend::Vulkan, RendererBackend::OpenGL, RendererBackend::Null, "backend"};
|
||||
SwitchableSetting<bool> renderer_force_max_clock{true, "force_max_clock"};
|
||||
SwitchableSetting<bool> renderer_force_max_clock{false, "force_max_clock"};
|
||||
Setting<bool> renderer_debug{false, "debug"};
|
||||
Setting<bool> renderer_shader_feedback{false, "shader_feedback"};
|
||||
Setting<bool> enable_nsight_aftermath{false, "nsight_aftermath"};
|
||||
|
||||
@@ -142,16 +142,24 @@ void CoreTiming::ScheduleLoopingEvent(std::chrono::nanoseconds start_time,
|
||||
}
|
||||
|
||||
void CoreTiming::UnscheduleEvent(const std::shared_ptr<EventType>& event_type,
|
||||
std::uintptr_t user_data) {
|
||||
std::scoped_lock scope{basic_lock};
|
||||
const auto itr = std::remove_if(event_queue.begin(), event_queue.end(), [&](const Event& e) {
|
||||
return e.type.lock().get() == event_type.get() && e.user_data == user_data;
|
||||
});
|
||||
std::uintptr_t user_data, bool wait) {
|
||||
{
|
||||
std::scoped_lock lk{basic_lock};
|
||||
const auto itr =
|
||||
std::remove_if(event_queue.begin(), event_queue.end(), [&](const Event& e) {
|
||||
return e.type.lock().get() == event_type.get() && e.user_data == user_data;
|
||||
});
|
||||
|
||||
// Removing random items breaks the invariant so we have to re-establish it.
|
||||
if (itr != event_queue.end()) {
|
||||
event_queue.erase(itr, event_queue.end());
|
||||
std::make_heap(event_queue.begin(), event_queue.end(), std::greater<>());
|
||||
// Removing random items breaks the invariant so we have to re-establish it.
|
||||
if (itr != event_queue.end()) {
|
||||
event_queue.erase(itr, event_queue.end());
|
||||
std::make_heap(event_queue.begin(), event_queue.end(), std::greater<>());
|
||||
}
|
||||
}
|
||||
|
||||
// Force any in-progress events to finish
|
||||
if (wait) {
|
||||
std::scoped_lock lk{advance_lock};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,20 +198,6 @@ u64 CoreTiming::GetClockTicks() const {
|
||||
return CpuCyclesToClockCycles(ticks);
|
||||
}
|
||||
|
||||
void CoreTiming::RemoveEvent(const std::shared_ptr<EventType>& event_type) {
|
||||
std::scoped_lock lock{basic_lock};
|
||||
|
||||
const auto itr = std::remove_if(event_queue.begin(), event_queue.end(), [&](const Event& e) {
|
||||
return e.type.lock().get() == event_type.get();
|
||||
});
|
||||
|
||||
// Removing random items breaks the invariant so we have to re-establish it.
|
||||
if (itr != event_queue.end()) {
|
||||
event_queue.erase(itr, event_queue.end());
|
||||
std::make_heap(event_queue.begin(), event_queue.end(), std::greater<>());
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<s64> CoreTiming::Advance() {
|
||||
std::scoped_lock lock{advance_lock, basic_lock};
|
||||
global_timer = GetGlobalTimeNs().count();
|
||||
|
||||
@@ -98,10 +98,13 @@ public:
|
||||
const std::shared_ptr<EventType>& event_type,
|
||||
std::uintptr_t user_data = 0, bool absolute_time = false);
|
||||
|
||||
void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, std::uintptr_t user_data);
|
||||
void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, std::uintptr_t user_data,
|
||||
bool wait = true);
|
||||
|
||||
/// We only permit one event of each type in the queue at a time.
|
||||
void RemoveEvent(const std::shared_ptr<EventType>& event_type);
|
||||
void UnscheduleEventWithoutWait(const std::shared_ptr<EventType>& event_type,
|
||||
std::uintptr_t user_data) {
|
||||
UnscheduleEvent(event_type, user_data, false);
|
||||
}
|
||||
|
||||
void AddTicks(u64 ticks_to_add);
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ void KHardwareTimer::Initialize() {
|
||||
}
|
||||
|
||||
void KHardwareTimer::Finalize() {
|
||||
this->DisableInterrupt();
|
||||
m_kernel.System().CoreTiming().UnscheduleEvent(m_event_type, reinterpret_cast<uintptr_t>(this));
|
||||
m_wakeup_time = std::numeric_limits<s64>::max();
|
||||
m_event_type.reset();
|
||||
}
|
||||
|
||||
@@ -59,7 +60,8 @@ void KHardwareTimer::EnableInterrupt(s64 wakeup_time) {
|
||||
}
|
||||
|
||||
void KHardwareTimer::DisableInterrupt() {
|
||||
m_kernel.System().CoreTiming().UnscheduleEvent(m_event_type, reinterpret_cast<uintptr_t>(this));
|
||||
m_kernel.System().CoreTiming().UnscheduleEventWithoutWait(m_event_type,
|
||||
reinterpret_cast<uintptr_t>(this));
|
||||
m_wakeup_time = std::numeric_limits<s64>::max();
|
||||
}
|
||||
|
||||
|
||||
@@ -312,8 +312,6 @@ void NVFlinger::Compose() {
|
||||
}
|
||||
|
||||
s64 NVFlinger::GetNextTicks() const {
|
||||
static constexpr s64 max_hertz = 120LL;
|
||||
|
||||
const auto& settings = Settings::values;
|
||||
auto speed_scale = 1.f;
|
||||
if (settings.use_multi_core.GetValue()) {
|
||||
@@ -327,9 +325,11 @@ s64 NVFlinger::GetNextTicks() const {
|
||||
}
|
||||
}
|
||||
|
||||
const auto next_ticks = ((1000000000 * (1LL << swap_interval)) / max_hertz);
|
||||
// As an extension, treat nonpositive swap interval as framerate multiplier.
|
||||
const f32 effective_fps = swap_interval <= 0 ? 120.f * static_cast<f32>(1 - swap_interval)
|
||||
: 60.f / static_cast<f32>(swap_interval);
|
||||
|
||||
return static_cast<s64>(speed_scale * static_cast<float>(next_ticks));
|
||||
return static_cast<s64>(speed_scale * (1000000000.f / effective_fps));
|
||||
}
|
||||
|
||||
} // namespace Service::NVFlinger
|
||||
|
||||
@@ -133,7 +133,7 @@ private:
|
||||
/// layers.
|
||||
u32 next_buffer_queue_id = 1;
|
||||
|
||||
u32 swap_interval = 1;
|
||||
s32 swap_interval = 1;
|
||||
|
||||
/// Event that handles screen composition.
|
||||
std::shared_ptr<Core::Timing::EventType> multi_composition_event;
|
||||
|
||||
@@ -156,10 +156,12 @@ void Tas::RecordInput(u64 buttons, TasAnalog left_axis, TasAnalog right_axis) {
|
||||
};
|
||||
}
|
||||
|
||||
std::tuple<TasState, size_t, size_t> Tas::GetStatus() const {
|
||||
std::tuple<TasState, size_t, std::array<size_t, PLAYER_NUMBER>> Tas::GetStatus() const {
|
||||
TasState state;
|
||||
std::array<size_t, PLAYER_NUMBER> lengths{0};
|
||||
if (is_recording) {
|
||||
return {TasState::Recording, 0, record_commands.size()};
|
||||
lengths[0] = record_commands.size();
|
||||
return {TasState::Recording, record_commands.size(), lengths};
|
||||
}
|
||||
|
||||
if (is_running) {
|
||||
@@ -168,7 +170,11 @@ std::tuple<TasState, size_t, size_t> Tas::GetStatus() const {
|
||||
state = TasState::Stopped;
|
||||
}
|
||||
|
||||
return {state, current_command, script_length};
|
||||
for (size_t i = 0; i < PLAYER_NUMBER; i++) {
|
||||
lengths[i] = commands[i].size();
|
||||
}
|
||||
|
||||
return {state, current_command, lengths};
|
||||
}
|
||||
|
||||
void Tas::UpdateThread() {
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
* Current playback progress ;
|
||||
* Total length of script file currently loaded or being recorded
|
||||
*/
|
||||
std::tuple<TasState, size_t, size_t> GetStatus() const;
|
||||
std::tuple<TasState, size_t, std::array<size_t, PLAYER_NUMBER>> GetStatus() const;
|
||||
|
||||
private:
|
||||
enum class TasAxis : u8;
|
||||
|
||||
@@ -76,7 +76,7 @@ void MappingFactory::RegisterButton(const MappingData& data) {
|
||||
break;
|
||||
case EngineInputType::Analog:
|
||||
// Ignore mouse axis when mapping buttons
|
||||
if (data.engine == "mouse") {
|
||||
if (data.engine == "mouse" && data.index != 4) {
|
||||
return;
|
||||
}
|
||||
new_input.Set("axis", data.index);
|
||||
|
||||
@@ -467,7 +467,7 @@ void Maxwell3D::ProcessMacroBind(u32 data) {
|
||||
}
|
||||
|
||||
void Maxwell3D::ProcessFirmwareCall4() {
|
||||
LOG_WARNING(HW_GPU, "(STUBBED) called");
|
||||
LOG_DEBUG(HW_GPU, "(STUBBED) called");
|
||||
|
||||
// Firmware call 4 is a blob that changes some registers depending on its parameters.
|
||||
// These registers don't affect emulation and so are stubbed by setting 0xd00 to 1.
|
||||
|
||||
@@ -139,6 +139,7 @@ void RasterizerOpenGL::LoadDiskResources(u64 title_id, std::stop_token stop_load
|
||||
void RasterizerOpenGL::Clear(u32 layer_count) {
|
||||
MICROPROFILE_SCOPE(OpenGL_Clears);
|
||||
|
||||
gpu_memory->FlushCaching();
|
||||
const auto& regs = maxwell3d->regs;
|
||||
bool use_color{};
|
||||
bool use_depth{};
|
||||
@@ -207,6 +208,7 @@ void RasterizerOpenGL::PrepareDraw(bool is_indexed, Func&& draw_func) {
|
||||
MICROPROFILE_SCOPE(OpenGL_Drawing);
|
||||
|
||||
SCOPE_EXIT({ gpu.TickWork(); });
|
||||
gpu_memory->FlushCaching();
|
||||
query_cache.UpdateCounters();
|
||||
|
||||
GraphicsPipeline* const pipeline{shader_cache.CurrentGraphicsPipeline()};
|
||||
@@ -319,6 +321,7 @@ void RasterizerOpenGL::DrawIndirect() {
|
||||
}
|
||||
|
||||
void RasterizerOpenGL::DispatchCompute() {
|
||||
gpu_memory->FlushCaching();
|
||||
ComputePipeline* const pipeline{shader_cache.CurrentComputePipeline()};
|
||||
if (!pipeline) {
|
||||
return;
|
||||
@@ -526,6 +529,7 @@ void RasterizerOpenGL::TickFrame() {
|
||||
}
|
||||
|
||||
bool RasterizerOpenGL::AccelerateConditionalRendering() {
|
||||
gpu_memory->FlushCaching();
|
||||
if (Settings::IsGPULevelHigh()) {
|
||||
// Reimplement Host conditional rendering.
|
||||
return false;
|
||||
|
||||
@@ -60,22 +60,9 @@ std::string GetDriverVersion(const Device& device) {
|
||||
return GetReadableVersion(version);
|
||||
}
|
||||
|
||||
std::string BuildCommaSeparatedExtensions(std::vector<std::string> available_extensions) {
|
||||
std::sort(std::begin(available_extensions), std::end(available_extensions));
|
||||
|
||||
static constexpr std::size_t AverageExtensionSize = 64;
|
||||
std::string separated_extensions;
|
||||
separated_extensions.reserve(available_extensions.size() * AverageExtensionSize);
|
||||
|
||||
const auto end = std::end(available_extensions);
|
||||
for (auto extension = std::begin(available_extensions); extension != end; ++extension) {
|
||||
if (const bool is_last = extension + 1 == end; is_last) {
|
||||
separated_extensions += *extension;
|
||||
} else {
|
||||
separated_extensions += fmt::format("{},", *extension);
|
||||
}
|
||||
}
|
||||
return separated_extensions;
|
||||
std::string BuildCommaSeparatedExtensions(
|
||||
const std::set<std::string, std::less<>>& available_extensions) {
|
||||
return fmt::format("{}", fmt::join(available_extensions, ","));
|
||||
}
|
||||
|
||||
} // Anonymous namespace
|
||||
@@ -112,6 +99,7 @@ RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_,
|
||||
state_tracker, scheduler) {
|
||||
if (Settings::values.renderer_force_max_clock.GetValue() && device.ShouldBoostClocks()) {
|
||||
turbo_mode.emplace(instance, dld);
|
||||
scheduler.RegisterOnSubmit([this] { turbo_mode->QueueSubmitted(); });
|
||||
}
|
||||
Report();
|
||||
} catch (const vk::Exception& exception) {
|
||||
@@ -120,6 +108,7 @@ RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_,
|
||||
}
|
||||
|
||||
RendererVulkan::~RendererVulkan() {
|
||||
scheduler.RegisterOnSubmit([] {});
|
||||
void(device.GetLogical().WaitIdle());
|
||||
}
|
||||
|
||||
|
||||
@@ -270,6 +270,7 @@ void RasterizerVulkan::Clear(u32 layer_count) {
|
||||
MICROPROFILE_SCOPE(Vulkan_Clearing);
|
||||
|
||||
FlushWork();
|
||||
gpu_memory->FlushCaching();
|
||||
|
||||
query_cache.UpdateCounters();
|
||||
|
||||
@@ -628,6 +629,7 @@ void RasterizerVulkan::TickFrame() {
|
||||
}
|
||||
|
||||
bool RasterizerVulkan::AccelerateConditionalRendering() {
|
||||
gpu_memory->FlushCaching();
|
||||
if (Settings::IsGPULevelHigh()) {
|
||||
// TODO(Blinkhawk): Reimplement Host conditional rendering.
|
||||
return false;
|
||||
|
||||
@@ -213,6 +213,11 @@ void Scheduler::SubmitExecution(VkSemaphore signal_semaphore, VkSemaphore wait_s
|
||||
.signalSemaphoreCount = num_signal_semaphores,
|
||||
.pSignalSemaphores = signal_semaphores.data(),
|
||||
};
|
||||
|
||||
if (on_submit) {
|
||||
on_submit();
|
||||
}
|
||||
|
||||
switch (const VkResult result = device.GetGraphicsQueue().Submit(submit_info)) {
|
||||
case VK_SUCCESS:
|
||||
break;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <condition_variable>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
@@ -66,6 +67,11 @@ public:
|
||||
query_cache = &query_cache_;
|
||||
}
|
||||
|
||||
// Registers a callback to perform on queue submission.
|
||||
void RegisterOnSubmit(std::function<void()>&& func) {
|
||||
on_submit = std::move(func);
|
||||
}
|
||||
|
||||
/// Send work to a separate thread.
|
||||
template <typename T>
|
||||
void Record(T&& command) {
|
||||
@@ -216,6 +222,7 @@ private:
|
||||
vk::CommandBuffer current_cmdbuf;
|
||||
|
||||
std::unique_ptr<CommandChunk> chunk;
|
||||
std::function<void()> on_submit;
|
||||
|
||||
State state;
|
||||
|
||||
|
||||
@@ -14,11 +14,21 @@ using namespace Common::Literals;
|
||||
|
||||
TurboMode::TurboMode(const vk::Instance& instance, const vk::InstanceDispatch& dld)
|
||||
: m_device{CreateDevice(instance, dld, VK_NULL_HANDLE)}, m_allocator{m_device, false} {
|
||||
{
|
||||
std::scoped_lock lk{m_submission_lock};
|
||||
m_submission_time = std::chrono::steady_clock::now();
|
||||
}
|
||||
m_thread = std::jthread([&](auto stop_token) { Run(stop_token); });
|
||||
}
|
||||
|
||||
TurboMode::~TurboMode() = default;
|
||||
|
||||
void TurboMode::QueueSubmitted() {
|
||||
std::scoped_lock lk{m_submission_lock};
|
||||
m_submission_time = std::chrono::steady_clock::now();
|
||||
m_submission_cv.notify_one();
|
||||
}
|
||||
|
||||
void TurboMode::Run(std::stop_token stop_token) {
|
||||
auto& dld = m_device.GetLogical();
|
||||
|
||||
@@ -199,6 +209,13 @@ void TurboMode::Run(std::stop_token stop_token) {
|
||||
|
||||
// Wait for completion.
|
||||
fence.Wait();
|
||||
|
||||
// Wait for the next graphics queue submission if necessary.
|
||||
std::unique_lock lk{m_submission_lock};
|
||||
Common::CondvarWait(m_submission_cv, lk, stop_token, [this] {
|
||||
return (std::chrono::steady_clock::now() - m_submission_time) <=
|
||||
std::chrono::milliseconds{100};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
#include <mutex>
|
||||
|
||||
#include "common/polyfill_thread.h"
|
||||
#include "video_core/vulkan_common/vulkan_device.h"
|
||||
#include "video_core/vulkan_common/vulkan_memory_allocator.h"
|
||||
@@ -15,11 +18,17 @@ public:
|
||||
explicit TurboMode(const vk::Instance& instance, const vk::InstanceDispatch& dld);
|
||||
~TurboMode();
|
||||
|
||||
void QueueSubmitted();
|
||||
|
||||
private:
|
||||
void Run(std::stop_token stop_token);
|
||||
|
||||
Device m_device;
|
||||
MemoryAllocator m_allocator;
|
||||
std::mutex m_submission_lock;
|
||||
std::condition_variable_any m_submission_cv;
|
||||
std::chrono::time_point<std::chrono::steady_clock> m_submission_time{};
|
||||
|
||||
std::jthread m_thread;
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <set>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
@@ -11,6 +12,156 @@
|
||||
#include "common/common_types.h"
|
||||
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
||||
|
||||
// Define all features which may be used by the implementation here.
|
||||
// Vulkan version in the macro describes the minimum version required for feature availability.
|
||||
// If the Vulkan version is lower than the required version, the named extension is required.
|
||||
#define FOR_EACH_VK_FEATURE_1_1(FEATURE) \
|
||||
FEATURE(EXT, SubgroupSizeControl, SUBGROUP_SIZE_CONTROL, subgroup_size_control) \
|
||||
FEATURE(KHR, 16BitStorage, 16BIT_STORAGE, bit16_storage) \
|
||||
FEATURE(KHR, ShaderAtomicInt64, SHADER_ATOMIC_INT64, shader_atomic_int64) \
|
||||
FEATURE(KHR, ShaderDrawParameters, SHADER_DRAW_PARAMETERS, shader_draw_parameters) \
|
||||
FEATURE(KHR, ShaderFloat16Int8, SHADER_FLOAT16_INT8, shader_float16_int8) \
|
||||
FEATURE(KHR, UniformBufferStandardLayout, UNIFORM_BUFFER_STANDARD_LAYOUT, \
|
||||
uniform_buffer_standard_layout) \
|
||||
FEATURE(KHR, VariablePointer, VARIABLE_POINTERS, variable_pointer)
|
||||
|
||||
#define FOR_EACH_VK_FEATURE_1_2(FEATURE) \
|
||||
FEATURE(EXT, HostQueryReset, HOST_QUERY_RESET, host_query_reset) \
|
||||
FEATURE(KHR, 8BitStorage, 8BIT_STORAGE, bit8_storage) \
|
||||
FEATURE(KHR, TimelineSemaphore, TIMELINE_SEMAPHORE, timeline_semaphore)
|
||||
|
||||
#define FOR_EACH_VK_FEATURE_1_3(FEATURE) \
|
||||
FEATURE(EXT, ShaderDemoteToHelperInvocation, SHADER_DEMOTE_TO_HELPER_INVOCATION, \
|
||||
shader_demote_to_helper_invocation)
|
||||
|
||||
// Define all features which may be used by the implementation and require an extension here.
|
||||
#define FOR_EACH_VK_FEATURE_EXT(FEATURE) \
|
||||
FEATURE(EXT, CustomBorderColor, CUSTOM_BORDER_COLOR, custom_border_color) \
|
||||
FEATURE(EXT, DepthClipControl, DEPTH_CLIP_CONTROL, depth_clip_control) \
|
||||
FEATURE(EXT, ExtendedDynamicState, EXTENDED_DYNAMIC_STATE, extended_dynamic_state) \
|
||||
FEATURE(EXT, ExtendedDynamicState2, EXTENDED_DYNAMIC_STATE_2, extended_dynamic_state2) \
|
||||
FEATURE(EXT, ExtendedDynamicState3, EXTENDED_DYNAMIC_STATE_3, extended_dynamic_state3) \
|
||||
FEATURE(EXT, IndexTypeUint8, INDEX_TYPE_UINT8, index_type_uint8) \
|
||||
FEATURE(EXT, LineRasterization, LINE_RASTERIZATION, line_rasterization) \
|
||||
FEATURE(EXT, PrimitiveTopologyListRestart, PRIMITIVE_TOPOLOGY_LIST_RESTART, \
|
||||
primitive_topology_list_restart) \
|
||||
FEATURE(EXT, ProvokingVertex, PROVOKING_VERTEX, provoking_vertex) \
|
||||
FEATURE(EXT, Robustness2, ROBUSTNESS_2, robustness2) \
|
||||
FEATURE(EXT, TransformFeedback, TRANSFORM_FEEDBACK, transform_feedback) \
|
||||
FEATURE(EXT, VertexInputDynamicState, VERTEX_INPUT_DYNAMIC_STATE, vertex_input_dynamic_state) \
|
||||
FEATURE(KHR, PipelineExecutableProperties, PIPELINE_EXECUTABLE_PROPERTIES, \
|
||||
pipeline_executable_properties) \
|
||||
FEATURE(KHR, WorkgroupMemoryExplicitLayout, WORKGROUP_MEMORY_EXPLICIT_LAYOUT, \
|
||||
workgroup_memory_explicit_layout)
|
||||
|
||||
// Define miscellaneous extensions which may be used by the implementation here.
|
||||
#define FOR_EACH_VK_EXTENSION(EXTENSION) \
|
||||
EXTENSION(EXT, CONSERVATIVE_RASTERIZATION, conservative_rasterization) \
|
||||
EXTENSION(EXT, DEPTH_RANGE_UNRESTRICTED, depth_range_unrestricted) \
|
||||
EXTENSION(EXT, MEMORY_BUDGET, memory_budget) \
|
||||
EXTENSION(EXT, ROBUSTNESS_2, robustness_2) \
|
||||
EXTENSION(EXT, SAMPLER_FILTER_MINMAX, sampler_filter_minmax) \
|
||||
EXTENSION(EXT, SHADER_STENCIL_EXPORT, shader_stencil_export) \
|
||||
EXTENSION(EXT, SHADER_VIEWPORT_INDEX_LAYER, shader_viewport_index_layer) \
|
||||
EXTENSION(EXT, TOOLING_INFO, tooling_info) \
|
||||
EXTENSION(EXT, VERTEX_ATTRIBUTE_DIVISOR, vertex_attribute_divisor) \
|
||||
EXTENSION(KHR, DRAW_INDIRECT_COUNT, draw_indirect_count) \
|
||||
EXTENSION(KHR, DRIVER_PROPERTIES, driver_properties) \
|
||||
EXTENSION(KHR, EXTERNAL_MEMORY_FD, external_memory_fd) \
|
||||
EXTENSION(KHR, PUSH_DESCRIPTOR, push_descriptor) \
|
||||
EXTENSION(KHR, SAMPLER_MIRROR_CLAMP_TO_EDGE, sampler_mirror_clamp_to_edge) \
|
||||
EXTENSION(KHR, SHADER_FLOAT_CONTROLS, shader_float_controls) \
|
||||
EXTENSION(KHR, SPIRV_1_4, spirv_1_4) \
|
||||
EXTENSION(KHR, SWAPCHAIN, swapchain) \
|
||||
EXTENSION(KHR, SWAPCHAIN_MUTABLE_FORMAT, swapchain_mutable_format) \
|
||||
EXTENSION(NV, DEVICE_DIAGNOSTICS_CONFIG, device_diagnostics_config) \
|
||||
EXTENSION(NV, GEOMETRY_SHADER_PASSTHROUGH, geometry_shader_passthrough) \
|
||||
EXTENSION(NV, VIEWPORT_ARRAY2, viewport_array2) \
|
||||
EXTENSION(NV, VIEWPORT_SWIZZLE, viewport_swizzle)
|
||||
|
||||
#define FOR_EACH_VK_EXTENSION_WIN32(EXTENSION) \
|
||||
EXTENSION(KHR, EXTERNAL_MEMORY_WIN32, external_memory_win32)
|
||||
|
||||
// Define extensions which must be supported.
|
||||
#define FOR_EACH_VK_MANDATORY_EXTENSION(EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME)
|
||||
|
||||
#define FOR_EACH_VK_MANDATORY_EXTENSION_GENERIC(EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME)
|
||||
|
||||
#define FOR_EACH_VK_MANDATORY_EXTENSION_WIN32(EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME)
|
||||
|
||||
// Define extensions where the absence of the extension may result in a degraded experience.
|
||||
#define FOR_EACH_VK_RECOMMENDED_EXTENSION(EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME) \
|
||||
EXTENSION_NAME(VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME)
|
||||
|
||||
// Define features which must be supported.
|
||||
#define FOR_EACH_VK_MANDATORY_FEATURE(FEATURE_NAME) \
|
||||
FEATURE_NAME(bit16_storage, storageBuffer16BitAccess) \
|
||||
FEATURE_NAME(bit16_storage, uniformAndStorageBuffer16BitAccess) \
|
||||
FEATURE_NAME(bit8_storage, storageBuffer8BitAccess) \
|
||||
FEATURE_NAME(bit8_storage, uniformAndStorageBuffer8BitAccess) \
|
||||
FEATURE_NAME(features, depthBiasClamp) \
|
||||
FEATURE_NAME(features, depthClamp) \
|
||||
FEATURE_NAME(features, drawIndirectFirstInstance) \
|
||||
FEATURE_NAME(features, dualSrcBlend) \
|
||||
FEATURE_NAME(features, fillModeNonSolid) \
|
||||
FEATURE_NAME(features, fragmentStoresAndAtomics) \
|
||||
FEATURE_NAME(features, geometryShader) \
|
||||
FEATURE_NAME(features, imageCubeArray) \
|
||||
FEATURE_NAME(features, independentBlend) \
|
||||
FEATURE_NAME(features, largePoints) \
|
||||
FEATURE_NAME(features, logicOp) \
|
||||
FEATURE_NAME(features, multiDrawIndirect) \
|
||||
FEATURE_NAME(features, multiViewport) \
|
||||
FEATURE_NAME(features, occlusionQueryPrecise) \
|
||||
FEATURE_NAME(features, robustBufferAccess) \
|
||||
FEATURE_NAME(features, samplerAnisotropy) \
|
||||
FEATURE_NAME(features, sampleRateShading) \
|
||||
FEATURE_NAME(features, shaderClipDistance) \
|
||||
FEATURE_NAME(features, shaderCullDistance) \
|
||||
FEATURE_NAME(features, shaderImageGatherExtended) \
|
||||
FEATURE_NAME(features, shaderStorageImageWriteWithoutFormat) \
|
||||
FEATURE_NAME(features, tessellationShader) \
|
||||
FEATURE_NAME(features, vertexPipelineStoresAndAtomics) \
|
||||
FEATURE_NAME(features, wideLines) \
|
||||
FEATURE_NAME(host_query_reset, hostQueryReset) \
|
||||
FEATURE_NAME(robustness2, nullDescriptor) \
|
||||
FEATURE_NAME(robustness2, robustBufferAccess2) \
|
||||
FEATURE_NAME(robustness2, robustImageAccess2) \
|
||||
FEATURE_NAME(shader_demote_to_helper_invocation, shaderDemoteToHelperInvocation) \
|
||||
FEATURE_NAME(shader_draw_parameters, shaderDrawParameters) \
|
||||
FEATURE_NAME(timeline_semaphore, timelineSemaphore) \
|
||||
FEATURE_NAME(variable_pointer, variablePointers) \
|
||||
FEATURE_NAME(variable_pointer, variablePointersStorageBuffer)
|
||||
|
||||
// Define features where the absence of the feature may result in a degraded experience.
|
||||
#define FOR_EACH_VK_RECOMMENDED_FEATURE(FEATURE_NAME) \
|
||||
FEATURE_NAME(custom_border_color, customBorderColors) \
|
||||
FEATURE_NAME(extended_dynamic_state, extendedDynamicState) \
|
||||
FEATURE_NAME(index_type_uint8, indexTypeUint8) \
|
||||
FEATURE_NAME(primitive_topology_list_restart, primitiveTopologyListRestart) \
|
||||
FEATURE_NAME(provoking_vertex, provokingVertexLast) \
|
||||
FEATURE_NAME(shader_float16_int8, shaderFloat16) \
|
||||
FEATURE_NAME(shader_float16_int8, shaderInt8) \
|
||||
FEATURE_NAME(transform_feedback, transformFeedback) \
|
||||
FEATURE_NAME(uniform_buffer_standard_layout, uniformBufferStandardLayout) \
|
||||
FEATURE_NAME(vertex_input_dynamic_state, vertexInputDynamicState)
|
||||
|
||||
namespace Vulkan {
|
||||
|
||||
class NsightAftermathTracker;
|
||||
@@ -88,69 +239,69 @@ public:
|
||||
|
||||
/// Returns the current Vulkan API version provided in Vulkan-formatted version numbers.
|
||||
u32 ApiVersion() const {
|
||||
return properties.apiVersion;
|
||||
return properties.properties.apiVersion;
|
||||
}
|
||||
|
||||
/// Returns the current driver version provided in Vulkan-formatted version numbers.
|
||||
u32 GetDriverVersion() const {
|
||||
return properties.driverVersion;
|
||||
return properties.properties.driverVersion;
|
||||
}
|
||||
|
||||
/// Returns the device name.
|
||||
std::string_view GetModelName() const {
|
||||
return properties.deviceName;
|
||||
return properties.properties.deviceName;
|
||||
}
|
||||
|
||||
/// Returns the driver ID.
|
||||
VkDriverIdKHR GetDriverID() const {
|
||||
return driver_id;
|
||||
return properties.driver.driverID;
|
||||
}
|
||||
|
||||
bool ShouldBoostClocks() const;
|
||||
|
||||
/// Returns uniform buffer alignment requeriment.
|
||||
VkDeviceSize GetUniformBufferAlignment() const {
|
||||
return properties.limits.minUniformBufferOffsetAlignment;
|
||||
return properties.properties.limits.minUniformBufferOffsetAlignment;
|
||||
}
|
||||
|
||||
/// Returns storage alignment requeriment.
|
||||
VkDeviceSize GetStorageBufferAlignment() const {
|
||||
return properties.limits.minStorageBufferOffsetAlignment;
|
||||
return properties.properties.limits.minStorageBufferOffsetAlignment;
|
||||
}
|
||||
|
||||
/// Returns the maximum range for storage buffers.
|
||||
VkDeviceSize GetMaxStorageBufferRange() const {
|
||||
return properties.limits.maxStorageBufferRange;
|
||||
return properties.properties.limits.maxStorageBufferRange;
|
||||
}
|
||||
|
||||
/// Returns the maximum size for push constants.
|
||||
VkDeviceSize GetMaxPushConstantsSize() const {
|
||||
return properties.limits.maxPushConstantsSize;
|
||||
return properties.properties.limits.maxPushConstantsSize;
|
||||
}
|
||||
|
||||
/// Returns the maximum size for shared memory.
|
||||
u32 GetMaxComputeSharedMemorySize() const {
|
||||
return properties.limits.maxComputeSharedMemorySize;
|
||||
return properties.properties.limits.maxComputeSharedMemorySize;
|
||||
}
|
||||
|
||||
/// Returns float control properties of the device.
|
||||
const VkPhysicalDeviceFloatControlsPropertiesKHR& FloatControlProperties() const {
|
||||
return float_controls;
|
||||
return properties.float_controls;
|
||||
}
|
||||
|
||||
/// Returns true if ASTC is natively supported.
|
||||
bool IsOptimalAstcSupported() const {
|
||||
return is_optimal_astc_supported;
|
||||
return features.features.textureCompressionASTC_LDR;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports float16 natively.
|
||||
bool IsFloat16Supported() const {
|
||||
return is_float16_supported;
|
||||
return features.shader_float16_int8.shaderFloat16;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports int8 natively.
|
||||
bool IsInt8Supported() const {
|
||||
return is_int8_supported;
|
||||
return features.shader_float16_int8.shaderInt8;
|
||||
}
|
||||
|
||||
/// Returns true if the device warp size can potentially be bigger than guest's warp size.
|
||||
@@ -160,32 +311,32 @@ public:
|
||||
|
||||
/// Returns true if the device can be forced to use the guest warp size.
|
||||
bool IsGuestWarpSizeSupported(VkShaderStageFlagBits stage) const {
|
||||
return guest_warp_stages & stage;
|
||||
return properties.subgroup_size_control.requiredSubgroupSizeStages & stage;
|
||||
}
|
||||
|
||||
/// Returns the maximum number of push descriptors.
|
||||
u32 MaxPushDescriptors() const {
|
||||
return max_push_descriptors;
|
||||
return properties.push_descriptor.maxPushDescriptors;
|
||||
}
|
||||
|
||||
/// Returns true if formatless image load is supported.
|
||||
bool IsFormatlessImageLoadSupported() const {
|
||||
return is_formatless_image_load_supported;
|
||||
return features.features.shaderStorageImageReadWithoutFormat;
|
||||
}
|
||||
|
||||
/// Returns true if shader int64 is supported.
|
||||
bool IsShaderInt64Supported() const {
|
||||
return is_shader_int64_supported;
|
||||
return features.features.shaderInt64;
|
||||
}
|
||||
|
||||
/// Returns true if shader int16 is supported.
|
||||
bool IsShaderInt16Supported() const {
|
||||
return is_shader_int16_supported;
|
||||
return features.features.shaderInt16;
|
||||
}
|
||||
|
||||
// Returns true if depth bounds is supported.
|
||||
bool IsDepthBoundsSupported() const {
|
||||
return is_depth_bounds_supported;
|
||||
return features.features.depthBounds;
|
||||
}
|
||||
|
||||
/// Returns true when blitting from and to depth stencil images is supported.
|
||||
@@ -195,151 +346,151 @@ public:
|
||||
|
||||
/// Returns true if the device supports VK_NV_viewport_swizzle.
|
||||
bool IsNvViewportSwizzleSupported() const {
|
||||
return nv_viewport_swizzle;
|
||||
return extensions.viewport_swizzle;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_NV_viewport_array2.
|
||||
bool IsNvViewportArray2Supported() const {
|
||||
return nv_viewport_array2;
|
||||
return extensions.viewport_array2;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_NV_geometry_shader_passthrough.
|
||||
bool IsNvGeometryShaderPassthroughSupported() const {
|
||||
return nv_geometry_shader_passthrough;
|
||||
return extensions.geometry_shader_passthrough;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_KHR_uniform_buffer_standard_layout.
|
||||
bool IsKhrUniformBufferStandardLayoutSupported() const {
|
||||
return khr_uniform_buffer_standard_layout;
|
||||
return extensions.uniform_buffer_standard_layout;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_KHR_push_descriptor.
|
||||
bool IsKhrPushDescriptorSupported() const {
|
||||
return khr_push_descriptor;
|
||||
return extensions.push_descriptor;
|
||||
}
|
||||
|
||||
/// Returns true if VK_KHR_pipeline_executable_properties is enabled.
|
||||
bool IsKhrPipelineExecutablePropertiesEnabled() const {
|
||||
return khr_pipeline_executable_properties;
|
||||
return extensions.pipeline_executable_properties;
|
||||
}
|
||||
|
||||
/// Returns true if VK_KHR_swapchain_mutable_format is enabled.
|
||||
bool IsKhrSwapchainMutableFormatEnabled() const {
|
||||
return khr_swapchain_mutable_format;
|
||||
return extensions.swapchain_mutable_format;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_KHR_workgroup_memory_explicit_layout.
|
||||
bool IsKhrWorkgroupMemoryExplicitLayoutSupported() const {
|
||||
return khr_workgroup_memory_explicit_layout;
|
||||
return extensions.workgroup_memory_explicit_layout;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_primitive_topology_list_restart.
|
||||
bool IsTopologyListPrimitiveRestartSupported() const {
|
||||
return is_topology_list_restart_supported;
|
||||
return features.primitive_topology_list_restart.primitiveTopologyListRestart;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_primitive_topology_list_restart.
|
||||
bool IsPatchListPrimitiveRestartSupported() const {
|
||||
return is_patch_list_restart_supported;
|
||||
return features.primitive_topology_list_restart.primitiveTopologyPatchListRestart;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_index_type_uint8.
|
||||
bool IsExtIndexTypeUint8Supported() const {
|
||||
return ext_index_type_uint8;
|
||||
return extensions.index_type_uint8;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_sampler_filter_minmax.
|
||||
bool IsExtSamplerFilterMinmaxSupported() const {
|
||||
return ext_sampler_filter_minmax;
|
||||
return extensions.sampler_filter_minmax;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_depth_range_unrestricted.
|
||||
bool IsExtDepthRangeUnrestrictedSupported() const {
|
||||
return ext_depth_range_unrestricted;
|
||||
return extensions.depth_range_unrestricted;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_depth_clip_control.
|
||||
bool IsExtDepthClipControlSupported() const {
|
||||
return ext_depth_clip_control;
|
||||
return extensions.depth_clip_control;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_shader_viewport_index_layer.
|
||||
bool IsExtShaderViewportIndexLayerSupported() const {
|
||||
return ext_shader_viewport_index_layer;
|
||||
return extensions.shader_viewport_index_layer;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_subgroup_size_control.
|
||||
bool IsExtSubgroupSizeControlSupported() const {
|
||||
return ext_subgroup_size_control;
|
||||
return extensions.subgroup_size_control;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_transform_feedback.
|
||||
bool IsExtTransformFeedbackSupported() const {
|
||||
return ext_transform_feedback;
|
||||
return extensions.transform_feedback;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_custom_border_color.
|
||||
bool IsExtCustomBorderColorSupported() const {
|
||||
return ext_custom_border_color;
|
||||
return extensions.custom_border_color;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_extended_dynamic_state.
|
||||
bool IsExtExtendedDynamicStateSupported() const {
|
||||
return ext_extended_dynamic_state;
|
||||
return extensions.extended_dynamic_state;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_extended_dynamic_state2.
|
||||
bool IsExtExtendedDynamicState2Supported() const {
|
||||
return ext_extended_dynamic_state_2;
|
||||
return extensions.extended_dynamic_state2;
|
||||
}
|
||||
|
||||
bool IsExtExtendedDynamicState2ExtrasSupported() const {
|
||||
return ext_extended_dynamic_state_2_extra;
|
||||
return features.extended_dynamic_state2.extendedDynamicState2LogicOp;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_extended_dynamic_state3.
|
||||
bool IsExtExtendedDynamicState3Supported() const {
|
||||
return ext_extended_dynamic_state_3;
|
||||
return extensions.extended_dynamic_state3;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_extended_dynamic_state3.
|
||||
bool IsExtExtendedDynamicState3BlendingSupported() const {
|
||||
return ext_extended_dynamic_state_3_blend;
|
||||
return dynamic_state3_blending;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_extended_dynamic_state3.
|
||||
bool IsExtExtendedDynamicState3EnablesSupported() const {
|
||||
return ext_extended_dynamic_state_3_enables;
|
||||
return dynamic_state3_enables;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_line_rasterization.
|
||||
bool IsExtLineRasterizationSupported() const {
|
||||
return ext_line_rasterization;
|
||||
return extensions.line_rasterization;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_vertex_input_dynamic_state.
|
||||
bool IsExtVertexInputDynamicStateSupported() const {
|
||||
return ext_vertex_input_dynamic_state;
|
||||
return extensions.vertex_input_dynamic_state;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_shader_stencil_export.
|
||||
bool IsExtShaderStencilExportSupported() const {
|
||||
return ext_shader_stencil_export;
|
||||
return extensions.shader_stencil_export;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_conservative_rasterization.
|
||||
bool IsExtConservativeRasterizationSupported() const {
|
||||
return ext_conservative_rasterization;
|
||||
return extensions.conservative_rasterization;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_EXT_provoking_vertex.
|
||||
bool IsExtProvokingVertexSupported() const {
|
||||
return ext_provoking_vertex;
|
||||
return extensions.provoking_vertex;
|
||||
}
|
||||
|
||||
/// Returns true if the device supports VK_KHR_shader_atomic_int64.
|
||||
bool IsExtShaderAtomicInt64Supported() const {
|
||||
return ext_shader_atomic_int64;
|
||||
return extensions.shader_atomic_int64;
|
||||
}
|
||||
|
||||
/// Returns the minimum supported version of SPIR-V.
|
||||
@@ -347,7 +498,7 @@ public:
|
||||
if (instance_version >= VK_API_VERSION_1_3) {
|
||||
return 0x00010600U;
|
||||
}
|
||||
if (khr_spirv_1_4) {
|
||||
if (extensions.spirv_1_4) {
|
||||
return 0x00010400U;
|
||||
}
|
||||
return 0x00010000U;
|
||||
@@ -365,11 +516,11 @@ public:
|
||||
|
||||
/// Returns the vendor name reported from Vulkan.
|
||||
std::string_view GetVendorName() const {
|
||||
return vendor_name;
|
||||
return properties.driver.driverName;
|
||||
}
|
||||
|
||||
/// Returns the list of available extensions.
|
||||
const std::vector<std::string>& GetAvailableExtensions() const {
|
||||
const std::set<std::string, std::less<>>& GetAvailableExtensions() const {
|
||||
return supported_extensions;
|
||||
}
|
||||
|
||||
@@ -378,7 +529,7 @@ public:
|
||||
}
|
||||
|
||||
bool CanReportMemoryUsage() const {
|
||||
return ext_memory_budget;
|
||||
return extensions.memory_budget;
|
||||
}
|
||||
|
||||
u64 GetDeviceMemoryUsage() const;
|
||||
@@ -400,36 +551,29 @@ public:
|
||||
}
|
||||
|
||||
bool HasNullDescriptor() const {
|
||||
return has_null_descriptor;
|
||||
return features.robustness2.nullDescriptor;
|
||||
}
|
||||
|
||||
u32 GetMaxVertexInputAttributes() const {
|
||||
return max_vertex_input_attributes;
|
||||
return properties.properties.limits.maxVertexInputAttributes;
|
||||
}
|
||||
|
||||
u32 GetMaxVertexInputBindings() const {
|
||||
return max_vertex_input_bindings;
|
||||
return properties.properties.limits.maxVertexInputBindings;
|
||||
}
|
||||
|
||||
private:
|
||||
/// Checks if the physical device is suitable.
|
||||
void CheckSuitability(bool requires_swapchain) const;
|
||||
/// Checks if the physical device is suitable and configures the object state
|
||||
/// with all necessary info about its properties.
|
||||
bool GetSuitability(bool requires_swapchain);
|
||||
|
||||
/// Loads extensions into a vector and stores available ones in this object.
|
||||
std::vector<const char*> LoadExtensions(bool requires_surface);
|
||||
// Remove extensions which have incomplete feature support.
|
||||
void RemoveUnsuitableExtensions();
|
||||
void RemoveExtensionIfUnsuitable(bool is_suitable, const std::string& extension_name);
|
||||
|
||||
/// Sets up queue families.
|
||||
void SetupFamilies(VkSurfaceKHR surface);
|
||||
|
||||
/// Sets up device features.
|
||||
void SetupFeatures();
|
||||
|
||||
/// Sets up device properties.
|
||||
void SetupProperties();
|
||||
|
||||
/// Collects telemetry information from the device.
|
||||
void CollectTelemetryParameters();
|
||||
|
||||
/// Collects information about attached tools.
|
||||
void CollectToolingInfo();
|
||||
|
||||
@@ -440,91 +584,93 @@ private:
|
||||
std::vector<VkDeviceQueueCreateInfo> GetDeviceQueueCreateInfos() const;
|
||||
|
||||
/// Returns true if ASTC textures are natively supported.
|
||||
bool IsOptimalAstcSupported(const VkPhysicalDeviceFeatures& features) const;
|
||||
bool ComputeIsOptimalAstcSupported() const;
|
||||
|
||||
/// Returns true if the device natively supports blitting depth stencil images.
|
||||
bool TestDepthStencilBlits() const;
|
||||
|
||||
VkInstance instance; ///< Vulkan instance.
|
||||
vk::DeviceDispatch dld; ///< Device function pointers.
|
||||
vk::PhysicalDevice physical; ///< Physical device.
|
||||
VkPhysicalDeviceProperties properties; ///< Device properties.
|
||||
VkPhysicalDeviceFloatControlsPropertiesKHR float_controls{}; ///< Float control properties.
|
||||
vk::Device logical; ///< Logical device.
|
||||
vk::Queue graphics_queue; ///< Main graphics queue.
|
||||
vk::Queue present_queue; ///< Main present queue.
|
||||
u32 instance_version{}; ///< Vulkan onstance version.
|
||||
u32 graphics_family{}; ///< Main graphics queue family index.
|
||||
u32 present_family{}; ///< Main present queue family index.
|
||||
VkDriverIdKHR driver_id{}; ///< Driver ID.
|
||||
VkShaderStageFlags guest_warp_stages{}; ///< Stages where the guest warp size can be forced.
|
||||
u64 device_access_memory{}; ///< Total size of device local memory in bytes.
|
||||
u32 max_push_descriptors{}; ///< Maximum number of push descriptors
|
||||
u32 sets_per_pool{}; ///< Sets per Description Pool
|
||||
bool is_optimal_astc_supported{}; ///< Support for native ASTC.
|
||||
bool is_float16_supported{}; ///< Support for float16 arithmetic.
|
||||
bool is_int8_supported{}; ///< Support for int8 arithmetic.
|
||||
bool is_warp_potentially_bigger{}; ///< Host warp size can be bigger than guest.
|
||||
bool is_formatless_image_load_supported{}; ///< Support for shader image read without format.
|
||||
bool is_depth_bounds_supported{}; ///< Support for depth bounds.
|
||||
bool is_shader_float64_supported{}; ///< Support for float64.
|
||||
bool is_shader_int64_supported{}; ///< Support for int64.
|
||||
bool is_shader_int16_supported{}; ///< Support for int16.
|
||||
bool is_shader_storage_image_multisample{}; ///< Support for image operations on MSAA images.
|
||||
bool is_blit_depth_stencil_supported{}; ///< Support for blitting from and to depth stencil.
|
||||
bool is_topology_list_restart_supported{}; ///< Support for primitive restart with list
|
||||
///< topologies.
|
||||
bool is_patch_list_restart_supported{}; ///< Support for primitive restart with list patch.
|
||||
bool is_integrated{}; ///< Is GPU an iGPU.
|
||||
bool is_virtual{}; ///< Is GPU a virtual GPU.
|
||||
bool is_non_gpu{}; ///< Is SoftwareRasterizer, FPGA, non-GPU device.
|
||||
bool nv_viewport_swizzle{}; ///< Support for VK_NV_viewport_swizzle.
|
||||
bool nv_viewport_array2{}; ///< Support for VK_NV_viewport_array2.
|
||||
bool nv_geometry_shader_passthrough{}; ///< Support for VK_NV_geometry_shader_passthrough.
|
||||
bool khr_draw_indirect_count{}; ///< Support for VK_KHR_draw_indirect_count.
|
||||
bool khr_uniform_buffer_standard_layout{}; ///< Support for scalar uniform buffer layouts.
|
||||
bool khr_spirv_1_4{}; ///< Support for VK_KHR_spirv_1_4.
|
||||
bool khr_workgroup_memory_explicit_layout{}; ///< Support for explicit workgroup layouts.
|
||||
bool khr_push_descriptor{}; ///< Support for VK_KHR_push_descritor.
|
||||
bool khr_pipeline_executable_properties{}; ///< Support for executable properties.
|
||||
bool khr_swapchain_mutable_format{}; ///< Support for VK_KHR_swapchain_mutable_format.
|
||||
bool ext_index_type_uint8{}; ///< Support for VK_EXT_index_type_uint8.
|
||||
bool ext_sampler_filter_minmax{}; ///< Support for VK_EXT_sampler_filter_minmax.
|
||||
bool ext_depth_clip_control{}; ///< Support for VK_EXT_depth_clip_control
|
||||
bool ext_depth_range_unrestricted{}; ///< Support for VK_EXT_depth_range_unrestricted.
|
||||
bool ext_shader_viewport_index_layer{}; ///< Support for VK_EXT_shader_viewport_index_layer.
|
||||
bool ext_tooling_info{}; ///< Support for VK_EXT_tooling_info.
|
||||
bool ext_subgroup_size_control{}; ///< Support for VK_EXT_subgroup_size_control.
|
||||
bool ext_transform_feedback{}; ///< Support for VK_EXT_transform_feedback.
|
||||
bool ext_custom_border_color{}; ///< Support for VK_EXT_custom_border_color.
|
||||
bool ext_extended_dynamic_state{}; ///< Support for VK_EXT_extended_dynamic_state.
|
||||
bool ext_extended_dynamic_state_2{}; ///< Support for VK_EXT_extended_dynamic_state2.
|
||||
bool ext_extended_dynamic_state_2_extra{}; ///< Support for VK_EXT_extended_dynamic_state2.
|
||||
bool ext_extended_dynamic_state_3{}; ///< Support for VK_EXT_extended_dynamic_state3.
|
||||
bool ext_extended_dynamic_state_3_blend{}; ///< Support for VK_EXT_extended_dynamic_state3.
|
||||
bool ext_extended_dynamic_state_3_enables{}; ///< Support for VK_EXT_extended_dynamic_state3.
|
||||
bool ext_line_rasterization{}; ///< Support for VK_EXT_line_rasterization.
|
||||
bool ext_vertex_input_dynamic_state{}; ///< Support for VK_EXT_vertex_input_dynamic_state.
|
||||
bool ext_shader_stencil_export{}; ///< Support for VK_EXT_shader_stencil_export.
|
||||
bool ext_shader_atomic_int64{}; ///< Support for VK_KHR_shader_atomic_int64.
|
||||
bool ext_conservative_rasterization{}; ///< Support for VK_EXT_conservative_rasterization.
|
||||
bool ext_provoking_vertex{}; ///< Support for VK_EXT_provoking_vertex.
|
||||
bool ext_memory_budget{}; ///< Support for VK_EXT_memory_budget.
|
||||
bool nv_device_diagnostics_config{}; ///< Support for VK_NV_device_diagnostics_config.
|
||||
bool has_broken_cube_compatibility{}; ///< Has broken cube compatiblity bit
|
||||
bool has_renderdoc{}; ///< Has RenderDoc attached
|
||||
bool has_nsight_graphics{}; ///< Has Nsight Graphics attached
|
||||
bool supports_d24_depth{}; ///< Supports D24 depth buffers.
|
||||
bool cant_blit_msaa{}; ///< Does not support MSAA<->MSAA blitting.
|
||||
bool must_emulate_bgr565{}; ///< Emulates BGR565 by swizzling RGB565 format.
|
||||
bool has_null_descriptor{}; ///< Has support for null descriptors.
|
||||
u32 max_vertex_input_attributes{}; ///< Max vertex input attributes in pipeline
|
||||
u32 max_vertex_input_bindings{}; ///< Max vertex input buffers in pipeline
|
||||
private:
|
||||
VkInstance instance; ///< Vulkan instance.
|
||||
vk::DeviceDispatch dld; ///< Device function pointers.
|
||||
vk::PhysicalDevice physical; ///< Physical device.
|
||||
vk::Device logical; ///< Logical device.
|
||||
vk::Queue graphics_queue; ///< Main graphics queue.
|
||||
vk::Queue present_queue; ///< Main present queue.
|
||||
u32 instance_version{}; ///< Vulkan instance version.
|
||||
u32 graphics_family{}; ///< Main graphics queue family index.
|
||||
u32 present_family{}; ///< Main present queue family index.
|
||||
|
||||
struct Extensions {
|
||||
#define EXTENSION(prefix, macro_name, var_name) bool var_name{};
|
||||
#define FEATURE(prefix, struct_name, macro_name, var_name) bool var_name{};
|
||||
|
||||
FOR_EACH_VK_FEATURE_1_1(FEATURE);
|
||||
FOR_EACH_VK_FEATURE_1_2(FEATURE);
|
||||
FOR_EACH_VK_FEATURE_1_3(FEATURE);
|
||||
FOR_EACH_VK_FEATURE_EXT(FEATURE);
|
||||
FOR_EACH_VK_EXTENSION(EXTENSION);
|
||||
FOR_EACH_VK_EXTENSION_WIN32(EXTENSION);
|
||||
|
||||
#undef EXTENSION
|
||||
#undef FEATURE
|
||||
};
|
||||
|
||||
struct Features {
|
||||
#define FEATURE_CORE(prefix, struct_name, macro_name, var_name) \
|
||||
VkPhysicalDevice##struct_name##Features var_name{};
|
||||
#define FEATURE_EXT(prefix, struct_name, macro_name, var_name) \
|
||||
VkPhysicalDevice##struct_name##Features##prefix var_name{};
|
||||
|
||||
FOR_EACH_VK_FEATURE_1_1(FEATURE_CORE);
|
||||
FOR_EACH_VK_FEATURE_1_2(FEATURE_CORE);
|
||||
FOR_EACH_VK_FEATURE_1_3(FEATURE_CORE);
|
||||
FOR_EACH_VK_FEATURE_EXT(FEATURE_EXT);
|
||||
|
||||
#undef FEATURE_CORE
|
||||
#undef FEATURE_EXT
|
||||
|
||||
VkPhysicalDeviceFeatures features{};
|
||||
};
|
||||
|
||||
struct Properties {
|
||||
VkPhysicalDeviceDriverProperties driver{};
|
||||
VkPhysicalDeviceFloatControlsProperties float_controls{};
|
||||
VkPhysicalDevicePushDescriptorPropertiesKHR push_descriptor{};
|
||||
VkPhysicalDeviceSubgroupSizeControlProperties subgroup_size_control{};
|
||||
VkPhysicalDeviceTransformFeedbackPropertiesEXT transform_feedback{};
|
||||
|
||||
VkPhysicalDeviceProperties properties{};
|
||||
};
|
||||
|
||||
Extensions extensions{};
|
||||
Features features{};
|
||||
Properties properties{};
|
||||
|
||||
VkPhysicalDeviceFeatures2 features2{};
|
||||
VkPhysicalDeviceProperties2 properties2{};
|
||||
|
||||
// Misc features
|
||||
bool is_optimal_astc_supported{}; ///< Support for all guest ASTC formats.
|
||||
bool is_blit_depth_stencil_supported{}; ///< Support for blitting from and to depth stencil.
|
||||
bool is_warp_potentially_bigger{}; ///< Host warp size can be bigger than guest.
|
||||
bool is_integrated{}; ///< Is GPU an iGPU.
|
||||
bool is_virtual{}; ///< Is GPU a virtual GPU.
|
||||
bool is_non_gpu{}; ///< Is SoftwareRasterizer, FPGA, non-GPU device.
|
||||
bool has_broken_cube_compatibility{}; ///< Has broken cube compatiblity bit
|
||||
bool has_renderdoc{}; ///< Has RenderDoc attached
|
||||
bool has_nsight_graphics{}; ///< Has Nsight Graphics attached
|
||||
bool supports_d24_depth{}; ///< Supports D24 depth buffers.
|
||||
bool cant_blit_msaa{}; ///< Does not support MSAA<->MSAA blitting.
|
||||
bool must_emulate_bgr565{}; ///< Emulates BGR565 by swizzling RGB565 format.
|
||||
bool dynamic_state3_blending{}; ///< Has all blending features of dynamic_state3.
|
||||
bool dynamic_state3_enables{}; ///< Has all enables features of dynamic_state3.
|
||||
u64 device_access_memory{}; ///< Total size of device local memory in bytes.
|
||||
u32 sets_per_pool{}; ///< Sets per Description Pool
|
||||
|
||||
// Telemetry parameters
|
||||
std::string vendor_name; ///< Device's driver name.
|
||||
std::vector<std::string> supported_extensions; ///< Reported Vulkan extensions.
|
||||
std::vector<size_t> valid_heap_memory; ///< Heaps used.
|
||||
std::set<std::string, std::less<>> supported_extensions; ///< Reported Vulkan extensions.
|
||||
std::set<std::string, std::less<>> loaded_extensions; ///< Loaded Vulkan extensions.
|
||||
std::vector<size_t> valid_heap_memory; ///< Heaps used.
|
||||
|
||||
/// Format properties dictionary.
|
||||
std::unordered_map<VkFormat, VkFormatProperties> format_properties;
|
||||
|
||||
@@ -96,8 +96,8 @@ void Load(VkDevice device, DeviceDispatch& dld) noexcept {
|
||||
X(vkCmdDrawIndexed);
|
||||
X(vkCmdDrawIndirect);
|
||||
X(vkCmdDrawIndexedIndirect);
|
||||
X(vkCmdDrawIndirectCountKHR);
|
||||
X(vkCmdDrawIndexedIndirectCountKHR);
|
||||
X(vkCmdDrawIndirectCount);
|
||||
X(vkCmdDrawIndexedIndirectCount);
|
||||
X(vkCmdEndQuery);
|
||||
X(vkCmdEndRenderPass);
|
||||
X(vkCmdEndTransformFeedbackEXT);
|
||||
@@ -221,6 +221,12 @@ void Load(VkDevice device, DeviceDispatch& dld) noexcept {
|
||||
if (!dld.vkResetQueryPool) {
|
||||
Proc(dld.vkResetQueryPool, dld, "vkResetQueryPoolEXT", device);
|
||||
}
|
||||
|
||||
// Support for draw indirect with count is optional in Vulkan 1.2
|
||||
if (!dld.vkCmdDrawIndirectCount) {
|
||||
Proc(dld.vkCmdDrawIndirectCount, dld, "vkCmdDrawIndirectCountKHR", device);
|
||||
Proc(dld.vkCmdDrawIndexedIndirectCount, dld, "vkCmdDrawIndexedIndirectCountKHR", device);
|
||||
}
|
||||
#undef X
|
||||
}
|
||||
|
||||
|
||||
@@ -215,8 +215,8 @@ struct DeviceDispatch : InstanceDispatch {
|
||||
PFN_vkCmdDrawIndexed vkCmdDrawIndexed{};
|
||||
PFN_vkCmdDrawIndirect vkCmdDrawIndirect{};
|
||||
PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect{};
|
||||
PFN_vkCmdDrawIndirectCountKHR vkCmdDrawIndirectCountKHR{};
|
||||
PFN_vkCmdDrawIndexedIndirectCountKHR vkCmdDrawIndexedIndirectCountKHR{};
|
||||
PFN_vkCmdDrawIndirectCount vkCmdDrawIndirectCount{};
|
||||
PFN_vkCmdDrawIndexedIndirectCount vkCmdDrawIndexedIndirectCount{};
|
||||
PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT{};
|
||||
PFN_vkCmdEndQuery vkCmdEndQuery{};
|
||||
PFN_vkCmdEndRenderPass vkCmdEndRenderPass{};
|
||||
@@ -1065,15 +1065,15 @@ public:
|
||||
|
||||
void DrawIndirectCount(VkBuffer src_buffer, VkDeviceSize src_offset, VkBuffer count_buffer,
|
||||
VkDeviceSize count_offset, u32 draw_count, u32 stride) const noexcept {
|
||||
dld->vkCmdDrawIndirectCountKHR(handle, src_buffer, src_offset, count_buffer, count_offset,
|
||||
draw_count, stride);
|
||||
dld->vkCmdDrawIndirectCount(handle, src_buffer, src_offset, count_buffer, count_offset,
|
||||
draw_count, stride);
|
||||
}
|
||||
|
||||
void DrawIndexedIndirectCount(VkBuffer src_buffer, VkDeviceSize src_offset,
|
||||
VkBuffer count_buffer, VkDeviceSize count_offset, u32 draw_count,
|
||||
u32 stride) const noexcept {
|
||||
dld->vkCmdDrawIndexedIndirectCountKHR(handle, src_buffer, src_offset, count_buffer,
|
||||
count_offset, draw_count, stride);
|
||||
dld->vkCmdDrawIndexedIndirectCount(handle, src_buffer, src_offset, count_buffer,
|
||||
count_offset, draw_count, stride);
|
||||
}
|
||||
|
||||
void ClearAttachments(Span<VkClearAttachment> attachments,
|
||||
|
||||
@@ -34,6 +34,8 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
<string></string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.games</string>
|
||||
<key>LSRequiresCarbon</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
@@ -96,9 +96,9 @@ void EmuThread::run() {
|
||||
m_is_running.store(false);
|
||||
m_is_running.notify_all();
|
||||
|
||||
emit DebugModeEntered();
|
||||
EmulationPaused(lk);
|
||||
Common::CondvarWait(m_should_run_cv, lk, stop_token, [&] { return m_should_run; });
|
||||
emit DebugModeLeft();
|
||||
EmulationResumed(lk);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +111,21 @@ void EmuThread::run() {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Unlock while emitting signals so that the main thread can
|
||||
// continue pumping events.
|
||||
|
||||
void EmuThread::EmulationPaused(std::unique_lock<std::mutex>& lk) {
|
||||
lk.unlock();
|
||||
emit DebugModeEntered();
|
||||
lk.lock();
|
||||
}
|
||||
|
||||
void EmuThread::EmulationResumed(std::unique_lock<std::mutex>& lk) {
|
||||
lk.unlock();
|
||||
emit DebugModeLeft();
|
||||
lk.lock();
|
||||
}
|
||||
|
||||
#ifdef HAS_OPENGL
|
||||
class OpenGLSharedContext : public Core::Frontend::GraphicsContext {
|
||||
public:
|
||||
|
||||
@@ -91,6 +91,10 @@ public:
|
||||
m_stop_source.request_stop();
|
||||
}
|
||||
|
||||
private:
|
||||
void EmulationPaused(std::unique_lock<std::mutex>& lk);
|
||||
void EmulationResumed(std::unique_lock<std::mutex>& lk);
|
||||
|
||||
private:
|
||||
Core::System& m_system;
|
||||
|
||||
|
||||
@@ -364,6 +364,11 @@
|
||||
<string>1X (720p/1080p)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1.5X (1080p/1620p) [EXPERIMENTAL]</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2X (1440p/2160p)</string>
|
||||
@@ -389,6 +394,16 @@
|
||||
<string>6X (4320p/6480p)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7X (5040p/7560p)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8X (5760p/8640p)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -22,6 +22,7 @@ ConfigureGraphicsAdvanced::~ConfigureGraphicsAdvanced() = default;
|
||||
void ConfigureGraphicsAdvanced::SetConfiguration() {
|
||||
const bool runtime_lock = !system.IsPoweredOn();
|
||||
ui->use_vsync->setEnabled(runtime_lock);
|
||||
ui->renderer_force_max_clock->setEnabled(runtime_lock);
|
||||
ui->use_asynchronous_shaders->setEnabled(runtime_lock);
|
||||
ui->anisotropic_filtering_combobox->setEnabled(runtime_lock);
|
||||
|
||||
@@ -40,12 +41,12 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
|
||||
Settings::values.max_anisotropy.GetValue());
|
||||
} else {
|
||||
ConfigurationShared::SetPerGameSetting(ui->gpu_accuracy, &Settings::values.gpu_accuracy);
|
||||
ConfigurationShared::SetPerGameSetting(ui->renderer_force_max_clock,
|
||||
&Settings::values.renderer_force_max_clock);
|
||||
ConfigurationShared::SetPerGameSetting(ui->anisotropic_filtering_combobox,
|
||||
&Settings::values.max_anisotropy);
|
||||
ConfigurationShared::SetHighlight(ui->label_gpu_accuracy,
|
||||
!Settings::values.gpu_accuracy.UsingGlobal());
|
||||
ConfigurationShared::SetHighlight(ui->renderer_force_max_clock,
|
||||
!Settings::values.renderer_force_max_clock.UsingGlobal());
|
||||
ConfigurationShared::SetHighlight(ui->af_label,
|
||||
!Settings::values.max_anisotropy.UsingGlobal());
|
||||
}
|
||||
|
||||
@@ -1466,6 +1466,12 @@ void ConfigureInputPlayer::mousePressEvent(QMouseEvent* event) {
|
||||
input_subsystem->GetMouse()->PressButton(0, 0, 0, 0, button);
|
||||
}
|
||||
|
||||
void ConfigureInputPlayer::wheelEvent(QWheelEvent* event) {
|
||||
const int x = event->angleDelta().x();
|
||||
const int y = event->angleDelta().y();
|
||||
input_subsystem->GetMouse()->MouseWheelChange(x, y);
|
||||
}
|
||||
|
||||
void ConfigureInputPlayer::keyPressEvent(QKeyEvent* event) {
|
||||
if (!input_setter || !event) {
|
||||
return;
|
||||
|
||||
@@ -116,6 +116,9 @@ private:
|
||||
/// Handle mouse button press events.
|
||||
void mousePressEvent(QMouseEvent* event) override;
|
||||
|
||||
/// Handle mouse wheel move events.
|
||||
void wheelEvent(QWheelEvent* event) override;
|
||||
|
||||
/// Handle key press events.
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
|
||||
|
||||
@@ -957,6 +957,38 @@ void GMainWindow::InitializeWidgets() {
|
||||
tas_label->setFocusPolicy(Qt::NoFocus);
|
||||
statusBar()->insertPermanentWidget(0, tas_label);
|
||||
|
||||
volume_popup = new QWidget(this);
|
||||
volume_popup->setWindowFlags(Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint | Qt::Popup);
|
||||
volume_popup->setLayout(new QVBoxLayout());
|
||||
volume_popup->setMinimumWidth(200);
|
||||
|
||||
volume_slider = new QSlider(Qt::Horizontal);
|
||||
volume_slider->setObjectName(QStringLiteral("volume_slider"));
|
||||
volume_slider->setMaximum(200);
|
||||
volume_slider->setPageStep(5);
|
||||
connect(volume_slider, &QSlider::valueChanged, this, [this](int percentage) {
|
||||
Settings::values.audio_muted = false;
|
||||
const auto volume = static_cast<u8>(percentage);
|
||||
Settings::values.volume.SetValue(volume);
|
||||
UpdateVolumeUI();
|
||||
});
|
||||
volume_popup->layout()->addWidget(volume_slider);
|
||||
|
||||
volume_button = new QPushButton();
|
||||
volume_button->setObjectName(QStringLiteral("TogglableStatusBarButton"));
|
||||
volume_button->setFocusPolicy(Qt::NoFocus);
|
||||
volume_button->setCheckable(true);
|
||||
UpdateVolumeUI();
|
||||
connect(volume_button, &QPushButton::clicked, this, [&] {
|
||||
UpdateVolumeUI();
|
||||
volume_popup->setVisible(!volume_popup->isVisible());
|
||||
QRect rect = volume_button->geometry();
|
||||
QPoint bottomLeft = statusBar()->mapToGlobal(rect.topLeft());
|
||||
bottomLeft.setY(bottomLeft.y() - volume_popup->geometry().height());
|
||||
volume_popup->setGeometry(QRect(bottomLeft, QSize(rect.width(), rect.height())));
|
||||
});
|
||||
statusBar()->insertPermanentWidget(0, volume_button);
|
||||
|
||||
// setup AA button
|
||||
aa_status_button = new QPushButton();
|
||||
aa_status_button->setObjectName(QStringLiteral("TogglableStatusBarButton"));
|
||||
@@ -1124,30 +1156,9 @@ void GMainWindow::InitializeHotkeys() {
|
||||
&GMainWindow::OnToggleAdaptingFilter);
|
||||
connect_shortcut(QStringLiteral("Change Docked Mode"), &GMainWindow::OnToggleDockedMode);
|
||||
connect_shortcut(QStringLiteral("Change GPU Accuracy"), &GMainWindow::OnToggleGpuAccuracy);
|
||||
connect_shortcut(QStringLiteral("Audio Mute/Unmute"),
|
||||
[] { Settings::values.audio_muted = !Settings::values.audio_muted; });
|
||||
connect_shortcut(QStringLiteral("Audio Volume Down"), [] {
|
||||
const auto current_volume = static_cast<s32>(Settings::values.volume.GetValue());
|
||||
int step = 5;
|
||||
if (current_volume <= 30) {
|
||||
step = 2;
|
||||
}
|
||||
if (current_volume <= 6) {
|
||||
step = 1;
|
||||
}
|
||||
Settings::values.volume.SetValue(std::max(current_volume - step, 0));
|
||||
});
|
||||
connect_shortcut(QStringLiteral("Audio Volume Up"), [] {
|
||||
const auto current_volume = static_cast<s32>(Settings::values.volume.GetValue());
|
||||
int step = 5;
|
||||
if (current_volume < 30) {
|
||||
step = 2;
|
||||
}
|
||||
if (current_volume < 6) {
|
||||
step = 1;
|
||||
}
|
||||
Settings::values.volume.SetValue(current_volume + step);
|
||||
});
|
||||
connect_shortcut(QStringLiteral("Audio Mute/Unmute"), &GMainWindow::OnMute);
|
||||
connect_shortcut(QStringLiteral("Audio Volume Down"), &GMainWindow::OnDecreaseVolume);
|
||||
connect_shortcut(QStringLiteral("Audio Volume Up"), &GMainWindow::OnIncreaseVolume);
|
||||
connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] {
|
||||
Settings::values.use_speed_limit.SetValue(!Settings::values.use_speed_limit.GetValue());
|
||||
});
|
||||
@@ -1839,9 +1850,11 @@ void GMainWindow::OnEmulationStopTimeExpired() {
|
||||
|
||||
void GMainWindow::OnEmulationStopped() {
|
||||
shutdown_timer.stop();
|
||||
emu_thread->disconnect();
|
||||
emu_thread->wait();
|
||||
emu_thread = nullptr;
|
||||
if (emu_thread) {
|
||||
emu_thread->disconnect();
|
||||
emu_thread->wait();
|
||||
emu_thread.reset();
|
||||
}
|
||||
|
||||
if (shutdown_dialog) {
|
||||
shutdown_dialog->deleteLater();
|
||||
@@ -3029,6 +3042,8 @@ void GMainWindow::OnStopGame() {
|
||||
|
||||
if (OnShutdownBegin()) {
|
||||
OnShutdownBeginDialog();
|
||||
} else {
|
||||
OnEmulationStopped();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3458,6 +3473,39 @@ void GMainWindow::OnToggleGpuAccuracy() {
|
||||
UpdateGPUAccuracyButton();
|
||||
}
|
||||
|
||||
void GMainWindow::OnMute() {
|
||||
Settings::values.audio_muted = !Settings::values.audio_muted;
|
||||
UpdateVolumeUI();
|
||||
}
|
||||
|
||||
void GMainWindow::OnDecreaseVolume() {
|
||||
Settings::values.audio_muted = false;
|
||||
const auto current_volume = static_cast<s32>(Settings::values.volume.GetValue());
|
||||
int step = 5;
|
||||
if (current_volume <= 30) {
|
||||
step = 2;
|
||||
}
|
||||
if (current_volume <= 6) {
|
||||
step = 1;
|
||||
}
|
||||
Settings::values.volume.SetValue(std::max(current_volume - step, 0));
|
||||
UpdateVolumeUI();
|
||||
}
|
||||
|
||||
void GMainWindow::OnIncreaseVolume() {
|
||||
Settings::values.audio_muted = false;
|
||||
const auto current_volume = static_cast<s32>(Settings::values.volume.GetValue());
|
||||
int step = 5;
|
||||
if (current_volume < 30) {
|
||||
step = 2;
|
||||
}
|
||||
if (current_volume < 6) {
|
||||
step = 1;
|
||||
}
|
||||
Settings::values.volume.SetValue(current_volume + step);
|
||||
UpdateVolumeUI();
|
||||
}
|
||||
|
||||
void GMainWindow::OnToggleAdaptingFilter() {
|
||||
auto filter = Settings::values.scaling_filter.GetValue();
|
||||
if (filter == Settings::ScalingFilter::LastFilter) {
|
||||
@@ -3726,15 +3774,36 @@ void GMainWindow::UpdateWindowTitle(std::string_view title_name, std::string_vie
|
||||
}
|
||||
}
|
||||
|
||||
std::string GMainWindow::CreateTASFramesString(
|
||||
std::array<size_t, InputCommon::TasInput::PLAYER_NUMBER> frames) const {
|
||||
std::string string = "";
|
||||
size_t maxPlayerIndex = 0;
|
||||
for (size_t i = 0; i < frames.size(); i++) {
|
||||
if (frames[i] != 0) {
|
||||
if (maxPlayerIndex != 0)
|
||||
string += ", ";
|
||||
while (maxPlayerIndex++ != i)
|
||||
string += "0, ";
|
||||
string += std::to_string(frames[i]);
|
||||
}
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
||||
QString GMainWindow::GetTasStateDescription() const {
|
||||
auto [tas_status, current_tas_frame, total_tas_frames] = input_subsystem->GetTas()->GetStatus();
|
||||
std::string tas_frames_string = CreateTASFramesString(total_tas_frames);
|
||||
switch (tas_status) {
|
||||
case InputCommon::TasInput::TasState::Running:
|
||||
return tr("TAS state: Running %1/%2").arg(current_tas_frame).arg(total_tas_frames);
|
||||
return tr("TAS state: Running %1/%2")
|
||||
.arg(current_tas_frame)
|
||||
.arg(QString::fromStdString(tas_frames_string));
|
||||
case InputCommon::TasInput::TasState::Recording:
|
||||
return tr("TAS state: Recording %1").arg(total_tas_frames);
|
||||
return tr("TAS state: Recording %1").arg(total_tas_frames[0]);
|
||||
case InputCommon::TasInput::TasState::Stopped:
|
||||
return tr("TAS state: Idle %1/%2").arg(current_tas_frame).arg(total_tas_frames);
|
||||
return tr("TAS state: Idle %1/%2")
|
||||
.arg(current_tas_frame)
|
||||
.arg(QString::fromStdString(tas_frames_string));
|
||||
default:
|
||||
return tr("TAS State: Invalid");
|
||||
}
|
||||
@@ -3899,6 +3968,18 @@ void GMainWindow::UpdateAAText() {
|
||||
}
|
||||
}
|
||||
|
||||
void GMainWindow::UpdateVolumeUI() {
|
||||
const auto volume_value = static_cast<int>(Settings::values.volume.GetValue());
|
||||
volume_slider->setValue(volume_value);
|
||||
if (Settings::values.audio_muted) {
|
||||
volume_button->setChecked(false);
|
||||
volume_button->setText(tr("VOLUME: MUTE"));
|
||||
} else {
|
||||
volume_button->setChecked(true);
|
||||
volume_button->setText(tr("VOLUME: %1%", "Volume percentage (e.g. 50%)").arg(volume_value));
|
||||
}
|
||||
}
|
||||
|
||||
void GMainWindow::UpdateStatusButtons() {
|
||||
renderer_status_button->setChecked(Settings::values.renderer_backend.GetValue() ==
|
||||
Settings::RendererBackend::Vulkan);
|
||||
@@ -3907,6 +3988,7 @@ void GMainWindow::UpdateStatusButtons() {
|
||||
UpdateDockedButton();
|
||||
UpdateFilterText();
|
||||
UpdateAAText();
|
||||
UpdateVolumeUI();
|
||||
}
|
||||
|
||||
void GMainWindow::UpdateUISettings() {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "common/announce_multiplayer_room.h"
|
||||
#include "common/common_types.h"
|
||||
#include "input_common/drivers/tas_input.h"
|
||||
#include "yuzu/compatibility_list.h"
|
||||
#include "yuzu/hotkeys.h"
|
||||
|
||||
@@ -36,6 +37,8 @@ class QLabel;
|
||||
class MultiplayerState;
|
||||
class QPushButton;
|
||||
class QProgressDialog;
|
||||
class QSlider;
|
||||
class QHBoxLayout;
|
||||
class WaitTreeWidget;
|
||||
enum class GameListOpenTarget;
|
||||
enum class GameListRemoveTarget;
|
||||
@@ -266,6 +269,9 @@ private:
|
||||
void changeEvent(QEvent* event) override;
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
|
||||
std::string CreateTASFramesString(
|
||||
std::array<size_t, InputCommon::TasInput::PLAYER_NUMBER> frames) const;
|
||||
|
||||
#ifdef __unix__
|
||||
void SetupSigInterrupts();
|
||||
static void HandleSigInterrupt(int);
|
||||
@@ -308,6 +314,9 @@ private slots:
|
||||
void OnMenuRecentFile();
|
||||
void OnConfigure();
|
||||
void OnConfigureTas();
|
||||
void OnDecreaseVolume();
|
||||
void OnIncreaseVolume();
|
||||
void OnMute();
|
||||
void OnTasStartStop();
|
||||
void OnTasRecord();
|
||||
void OnTasReset();
|
||||
@@ -360,6 +369,7 @@ private:
|
||||
void UpdateAPIText();
|
||||
void UpdateFilterText();
|
||||
void UpdateAAText();
|
||||
void UpdateVolumeUI();
|
||||
void UpdateStatusBar();
|
||||
void UpdateGPUAccuracyButton();
|
||||
void UpdateStatusButtons();
|
||||
@@ -408,6 +418,9 @@ private:
|
||||
QPushButton* dock_status_button = nullptr;
|
||||
QPushButton* filter_status_button = nullptr;
|
||||
QPushButton* aa_status_button = nullptr;
|
||||
QPushButton* volume_button = nullptr;
|
||||
QWidget* volume_popup = nullptr;
|
||||
QSlider* volume_slider = nullptr;
|
||||
QTimer status_bar_update_timer;
|
||||
|
||||
std::unique_ptr<Config> config;
|
||||
|
||||
Reference in New Issue
Block a user