Updated BGFX_PCI_ID docs to reflect GPU priority & added missing enums (#2888)

* Add new BGFX_PCI_ID enums

* Updated BGFX_PCI_ID docs to reflect GPU priority & added missing enums

* Updated bgx.idl; minor corrections; ran GENie
This commit is contained in:
ichordev 2022-08-24 02:30:01 +10:00 committed by GitHub
parent 6cb74deed4
commit e9e9605304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 21 deletions

View File

@ -897,19 +897,21 @@ struct bgfx_init_t
bgfx_renderer_type_t type;
/**
* Vendor PCI id. If set to `BGFX_PCI_ID_NONE` it will select the first
* device.
* Vendor PCI ID. If set to `BGFX_PCI_ID_NONE`, discrete and integrated
* GPUs will be prioritised.
* - `BGFX_PCI_ID_NONE` - Autoselect adapter.
* - `BGFX_PCI_ID_SOFTWARE_RASTERIZER` - Software rasterizer.
* - `BGFX_PCI_ID_AMD` - AMD adapter.
* - `BGFX_PCI_ID_APPLE` - Apple adapter.
* - `BGFX_PCI_ID_INTEL` - Intel adapter.
* - `BGFX_PCI_ID_NVIDIA` - nVidia adapter.
* - `BGFX_PCI_ID_NVIDIA` - NVIDIA adapter.
* - `BGFX_PCI_ID_MICROSOFT` - Microsoft adapter.
*/
ushort vendorId;
/**
* Device id. If set to 0 it will select first device, or device with
* matching id.
* Device ID. If set to 0 it will select first device, or device with
* matching ID.
*/
ushort deviceId;
ulong capabilities; /// Capabilities initialization mask (default: UINT64_MAX).

View File

@ -27,8 +27,10 @@ Initialization and Shutdown
.. doxygendefine:: BGFX_PCI_ID_NONE
.. doxygendefine:: BGFX_PCI_ID_SOFTWARE_RASTERIZER
.. doxygendefine:: BGFX_PCI_ID_AMD
.. doxygendefine:: BGFX_PCI_ID_APPLE
.. doxygendefine:: BGFX_PCI_ID_INTEL
.. doxygendefine:: BGFX_PCI_ID_NVIDIA
.. doxygendefine:: BGFX_PCI_ID_MICROSOFT
.. doxygenstruct:: bgfx::CallbackI
:members:

View File

@ -651,17 +651,19 @@ namespace bgfx
/// See: `bgfx::RendererType`
RendererType::Enum type;
/// Vendor PCI id. If set to `BGFX_PCI_ID_NONE` it will select the first
/// device.
/// - `BGFX_PCI_ID_NONE` - Autoselect adapter.
/// Vendor PCI ID. If set to `BGFX_PCI_ID_NONE`, discrete and integrated
/// GPUs will be prioritised.
/// - `BGFX_PCI_ID_NONE` - Auto-select adapter.
/// - `BGFX_PCI_ID_SOFTWARE_RASTERIZER` - Software rasterizer.
/// - `BGFX_PCI_ID_AMD` - AMD adapter.
/// - `BGFX_PCI_ID_APPLE` - Apple adapter.
/// - `BGFX_PCI_ID_INTEL` - Intel adapter.
/// - `BGFX_PCI_ID_NVIDIA` - nVidia adapter.
/// - `BGFX_PCI_ID_NVIDIA` - NVIDIA adapter.
/// - `BGFX_PCI_ID_MICROSOFT` - Microsoft adapter.
uint16_t vendorId;
/// Device id. If set to 0 it will select first device, or device with
/// matching id.
/// Device ID. If set to 0 it will select first device, or device with
/// matching ID.
uint16_t deviceId;
uint64_t capabilities; //!< Capabilities initialization mask (default: UINT64_MAX).

View File

@ -659,19 +659,21 @@ typedef struct bgfx_init_s
bgfx_renderer_type_t type;
/**
* Vendor PCI id. If set to `BGFX_PCI_ID_NONE` it will select the first
* device.
* Vendor PCI ID. If set to `BGFX_PCI_ID_NONE`, discrete and integrated
* GPUs will be prioritised.
* - `BGFX_PCI_ID_NONE` - Autoselect adapter.
* - `BGFX_PCI_ID_SOFTWARE_RASTERIZER` - Software rasterizer.
* - `BGFX_PCI_ID_AMD` - AMD adapter.
* - `BGFX_PCI_ID_APPLE` - Apple adapter.
* - `BGFX_PCI_ID_INTEL` - Intel adapter.
* - `BGFX_PCI_ID_NVIDIA` - nVidia adapter.
* - `BGFX_PCI_ID_NVIDIA` - NVIDIA adapter.
* - `BGFX_PCI_ID_MICROSOFT` - Microsoft adapter.
*/
uint16_t vendorId;
/**
* Device id. If set to 0 it will select first device, or device with
* matching id.
* Device ID. If set to 0 it will select first device, or device with
* matching ID.
*/
uint16_t deviceId;
uint64_t capabilities; /** Capabilities initialization mask (default: UINT64_MAX). */

View File

@ -793,16 +793,18 @@ struct.Init { ctor }
--- a default rendering backend will be selected appropriate to the platform.
--- See: `bgfx::RendererType`
.vendorId "uint16_t" --- Vendor PCI id. If set to `BGFX_PCI_ID_NONE` it will select the first
--- device.
.vendorId "uint16_t" --- Vendor PCI ID. If set to `BGFX_PCI_ID_NONE`, discrete and integrated
--- GPUs will be prioritised.
--- - `BGFX_PCI_ID_NONE` - Autoselect adapter.
--- - `BGFX_PCI_ID_SOFTWARE_RASTERIZER` - Software rasterizer.
--- - `BGFX_PCI_ID_AMD` - AMD adapter.
--- - `BGFX_PCI_ID_APPLE` - Apple adapter.
--- - `BGFX_PCI_ID_INTEL` - Intel adapter.
--- - `BGFX_PCI_ID_NVIDIA` - nVidia adapter.
--- - `BGFX_PCI_ID_NVIDIA` - NVIDIA adapter.
--- - `BGFX_PCI_ID_MICROSOFT` - Microsoft adapter.
.deviceId "uint16_t" --- Device id. If set to 0 it will select first device, or device with
--- matching id.
.deviceId "uint16_t" --- Device ID. If set to 0 it will select first device, or device with
--- matching ID.
.capabilities "uint64_t" --- Capabilities initialization mask (default: UINT64_MAX).
.debug "bool" --- Enable device for debugging.
.profile "bool" --- Enable device for profiling.