3#include "pixelbullet/application/specification.h"
10namespace pixelbullet::application_internal
14 std::optional<uint32_t> gpu_index;
15 std::optional<GraphicsDevicePreference> gpu_preference;
18enum class LaunchGpuSelectorSource : uint8_t
21 ExplicitGpuPreference,
29 std::filesystem::path path;
30 std::optional<SavedGpuLaunchDefault> saved_default;
31 std::string warning_message;
37 std::filesystem::path path;
38 std::optional<SavedGpuLaunchDefault> saved_default;
39 LaunchGpuSelectorSource selector_source = LaunchGpuSelectorSource::ImplicitAuto;
40 bool applied_saved_default =
false;
41 std::string warning_message;
44class ScopedPendingLaunchGpuDefaults
48 ~ScopedPendingLaunchGpuDefaults();
50 ScopedPendingLaunchGpuDefaults(
const ScopedPendingLaunchGpuDefaults&) =
delete;
51 ScopedPendingLaunchGpuDefaults& operator=(
const ScopedPendingLaunchGpuDefaults&) =
delete;
52 ScopedPendingLaunchGpuDefaults(ScopedPendingLaunchGpuDefaults&&) =
delete;
53 ScopedPendingLaunchGpuDefaults& operator=(ScopedPendingLaunchGpuDefaults&&) =
delete;
56 bool installed_ =
false;
60[[nodiscard]] std::filesystem::path BuildLaunchGpuDefaultsPath(
const std::filesystem::path& binary_path,
61 const std::filesystem::path& app_data_root);
62[[nodiscard]] std::filesystem::path GetDefaultLaunchGpuDefaultsPath(
const std::filesystem::path& binary_path);
64[[nodiscard]]
bool SaveLaunchGpuDefault(
const std::filesystem::path& path,
const SavedGpuLaunchDefault& saved_default,
65 std::string* error_message);
66[[nodiscard]]
bool ClearLaunchGpuDefault(
const std::filesystem::path& path, std::string* error_message);
69 const std::filesystem::path& app_data_root);
Definition specification.h:79
Definition specification.h:69
Definition launch_gpu_defaults_internal.h:28
Definition launch_gpu_defaults_internal.h:35
Definition launch_gpu_defaults_internal.h:13