Fixed implicit type conversion for type specialization

This commit is contained in:
Mateusz Karbowiak
2024-10-05 21:22:36 +02:00
parent 32b09538ba
commit db06f4f72e
11 changed files with 31 additions and 31 deletions

View File

@@ -106,9 +106,9 @@ GPUDevice* GPUDeviceDX11::Create()
#else
D3D_FEATURE_LEVEL maxAllowedFeatureLevel = D3D_FEATURE_LEVEL_11_0;
#endif
if (CommandLine::Options.D3D10)
if (CommandLine::Options.D3D10.IsTrue())
maxAllowedFeatureLevel = D3D_FEATURE_LEVEL_10_0;
else if (CommandLine::Options.D3D11)
else if (CommandLine::Options.D3D11.IsTrue())
maxAllowedFeatureLevel = D3D_FEATURE_LEVEL_11_0;
#if !USE_EDITOR && PLATFORM_WINDOWS
auto winSettings = WindowsPlatformSettings::Get();
@@ -209,11 +209,11 @@ GPUDevice* GPUDeviceDX11::Create()
}
GPUAdapterDX selectedAdapter = adapters[selectedAdapterIndex];
uint32 vendorId = 0;
if (CommandLine::Options.NVIDIA)
if (CommandLine::Options.NVIDIA.IsTrue())
vendorId = GPU_VENDOR_ID_NVIDIA;
else if (CommandLine::Options.AMD)
else if (CommandLine::Options.AMD.IsTrue())
vendorId = GPU_VENDOR_ID_AMD;
else if (CommandLine::Options.Intel)
else if (CommandLine::Options.Intel.IsTrue())
vendorId = GPU_VENDOR_ID_INTEL;
if (vendorId != 0)
{

View File

@@ -161,11 +161,11 @@ GPUDevice* GPUDeviceDX12::Create()
}
GPUAdapterDX selectedAdapter = adapters[selectedAdapterIndex];
uint32 vendorId = 0;
if (CommandLine::Options.NVIDIA)
if (CommandLine::Options.NVIDIA.IsTrue())
vendorId = GPU_VENDOR_ID_NVIDIA;
else if (CommandLine::Options.AMD)
else if (CommandLine::Options.AMD.IsTrue())
vendorId = GPU_VENDOR_ID_AMD;
else if (CommandLine::Options.Intel)
else if (CommandLine::Options.Intel.IsTrue())
vendorId = GPU_VENDOR_ID_INTEL;
if (vendorId != 0)
{
@@ -425,7 +425,7 @@ bool GPUDeviceDX12::Init()
#if !BUILD_RELEASE
// Prevent the GPU from overclocking or under-clocking to get consistent timings
if (CommandLine::Options.ShaderProfile)
if (CommandLine::Options.ShaderProfile.IsTrue())
{
_device->SetStablePowerState(TRUE);
}