3#include "pixelbullet/application/specification.h"
4#include "pixelbullet/graphics/gpu_session.h"
11namespace pixelbullet::application_internal
15 std::optional<uint32_t> gpu_index;
16 std::optional<GraphicsDevicePreference> gpu_preference;
19enum class LaunchGpuSelectorSource : uint8_t
22 ExplicitGpuPreference,
30 std::filesystem::path path;
31 std::optional<SavedGpuLaunchDefault> saved_default;
32 std::string warning_message;
38 std::filesystem::path path;
39 std::optional<SavedGpuLaunchDefault> saved_default;
40 LaunchGpuSelectorSource selector_source = LaunchGpuSelectorSource::ImplicitAuto;
41 bool applied_saved_default =
false;
42 std::string warning_message;
45class ScopedPendingLaunchGpuDefaults
49 ~ScopedPendingLaunchGpuDefaults();
51 ScopedPendingLaunchGpuDefaults(
const ScopedPendingLaunchGpuDefaults&) =
delete;
52 ScopedPendingLaunchGpuDefaults& operator=(
const ScopedPendingLaunchGpuDefaults&) =
delete;
53 ScopedPendingLaunchGpuDefaults(ScopedPendingLaunchGpuDefaults&&) =
delete;
54 ScopedPendingLaunchGpuDefaults& operator=(ScopedPendingLaunchGpuDefaults&&) =
delete;
57 bool installed_ =
false;
61[[nodiscard]] std::filesystem::path BuildLaunchGpuDefaultsPath(
const std::filesystem::path& binary_path,
62 const std::filesystem::path& app_data_root);
63[[nodiscard]] std::filesystem::path GetDefaultLaunchGpuDefaultsPath(
const std::filesystem::path& binary_path);
65[[nodiscard]]
bool SaveLaunchGpuDefault(
const std::filesystem::path& path,
const SavedGpuLaunchDefault& saved_default,
66 std::string* error_message);
67[[nodiscard]]
bool ClearLaunchGpuDefault(
const std::filesystem::path& path, std::string* error_message);
70 const std::filesystem::path& app_data_root);
Definition specification.h:61
Definition specification.h:53
Definition gpu_session.h:23
Definition gpu_selection.h:18
Definition launch_gpu_defaults_internal.h:29
Definition launch_gpu_defaults_internal.h:36
Definition launch_gpu_defaults_internal.h:14