mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Added ability to disable discrete GPU selection.
This commit is contained in:
@@ -5078,7 +5078,7 @@ namespace bgfx
|
||||
}
|
||||
} // namespace bgfx
|
||||
|
||||
#if BX_PLATFORM_WINDOWS
|
||||
#if BGFX_CONFIG_PREFER_DISCRETE_GPU
|
||||
extern "C"
|
||||
{
|
||||
// When laptop setup has integrated and discrete GPU, following driver workarounds will
|
||||
@@ -5094,7 +5094,7 @@ extern "C"
|
||||
//
|
||||
__declspec(dllexport) uint32_t AmdPowerXpressRequestHighPerformance = UINT32_C(1);
|
||||
}
|
||||
#endif // BX_PLATFORM_WINDOWS
|
||||
#endif // BGFX_CONFIG_PREFER_DISCRETE_GPU
|
||||
|
||||
#define BGFX_TEXTURE_FORMAT_BIMG(_fmt) \
|
||||
BX_STATIC_ASSERT(uint32_t(bgfx::TextureFormat::_fmt) == uint32_t(bimg::TextureFormat::_fmt) )
|
||||
|
||||
@@ -361,4 +361,10 @@ BX_STATIC_ASSERT(bx::isPowerOf2(BGFX_CONFIG_MAX_VIEWS), "BGFX_CONFIG_MAX_VIEWS m
|
||||
# define BGFX_CONFIG_MAX_BACK_BUFFERS 4
|
||||
#endif // BGFX_CONFIG_MAX_BACK_BUFFERS
|
||||
|
||||
#ifndef BGFX_CONFIG_PREFER_DISCRETE_GPU
|
||||
// On laptops with integrated and discrete GPU, prefer selection of discrete GPU.
|
||||
// nVidia and AMD, on Windows only.
|
||||
# define BGFX_CONFIG_PREFER_DISCRETE_GPU BX_PLATFORM_WINDOWS
|
||||
#endif // BGFX_CONFIG_PREFER_DISCRETE_GPU
|
||||
|
||||
#endif // BGFX_CONFIG_H_HEADER_GUARD
|
||||
|
||||
Reference in New Issue
Block a user