diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-09-17 03:19:06 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-09-17 03:19:06 +0000 |
| commit | c4e90c3f0025628c0951f368d0d4b54f13a87b3d (patch) | |
| tree | cae1b894626f4a60f82352f4e66b041342d79d09 /Graphics/GraphicsEngine | |
| parent | D3D12 backend: implemented proper detection of DXIL bytecode (diff) | |
| download | DiligentCore-c4e90c3f0025628c0951f368d0d4b54f13a87b3d.tar.gz DiligentCore-c4e90c3f0025628c0951f368d0d4b54f13a87b3d.zip | |
Removed AdapterAttribs struct that was a duplicate of GraphicsAdapterInfo. Moved few members to GraphicsAdapterInfo
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/interface/APIInfo.h | 2 | ||||
| -rw-r--r-- | Graphics/GraphicsEngine/interface/GraphicsTypes.h | 65 | ||||
| -rw-r--r-- | Graphics/GraphicsEngine/src/APIInfo.cpp | 2 |
3 files changed, 32 insertions, 37 deletions
diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h index 72fec4c3..4baac91d 100644 --- a/Graphics/GraphicsEngine/interface/APIInfo.h +++ b/Graphics/GraphicsEngine/interface/APIInfo.h @@ -58,7 +58,7 @@ struct APIInfo size_t RectSize DEFAULT_INITIALIZER(0); size_t CopyTextureAttribsSize DEFAULT_INITIALIZER(0); size_t DeviceObjectAttribsSize DEFAULT_INITIALIZER(0); - size_t AdapterAttribsSize DEFAULT_INITIALIZER(0); + size_t GraphicsAdapterInfoSize DEFAULT_INITIALIZER(0); size_t DisplayModeAttribsSize DEFAULT_INITIALIZER(0); size_t SwapChainDescSize DEFAULT_INITIALIZER(0); size_t FullScreenModeDescSize DEFAULT_INITIALIZER(0); diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index fff72240..b87cce67 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1183,35 +1183,6 @@ DILIGENT_TYPED_ENUM(ADAPTER_TYPE, Uint8) ADAPTER_TYPE_HARDWARE }; -/// Adapter attributes -struct AdapterAttribs -{ - /// Adapter type. See Diligent::ADAPTER_TYPE. - ADAPTER_TYPE AdapterType DEFAULT_INITIALIZER(ADAPTER_TYPE_UNKNOWN); - - /// A string that contains the adapter description - char Description[128] DEFAULT_INITIALIZER({}); - - /// Dedicated video memory, in bytes - size_t DedicatedVideoMemory DEFAULT_INITIALIZER(0); - - /// Dedicated system memory, in bytes - size_t DedicatedSystemMemory DEFAULT_INITIALIZER(0); - - /// Dedicated shared memory, in bytes - size_t SharedSystemMemory DEFAULT_INITIALIZER(0); - - /// The PCI ID of the hardware vendor - Uint32 VendorId DEFAULT_INITIALIZER(0); - - /// The PCI ID of the hardware device - Uint32 DeviceId DEFAULT_INITIALIZER(0); - - /// Number of outputs this device has - Uint32 NumOutputs DEFAULT_INITIALIZER(0); -}; -typedef struct AdapterAttribs AdapterAttribs; - /// Flags indicating how an image is stretched to fit a given monitor's resolution. /// \sa <a href = "https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/bb173066(v=vs.85)">DXGI_MODE_SCALING enumeration on MSDN</a>, @@ -1683,22 +1654,46 @@ DILIGENT_TYPED_ENUM(ADAPTER_VENDOR, Uint8) /// Graphics adapter properties struct GraphicsAdapterInfo { + /// A string that contains the adapter description. + char Description[128] DEFAULT_INITIALIZER({}); + /// Adapter type, see Diligent::ADAPTER_TYPE. - ADAPTER_TYPE Type DEFAULT_INITIALIZER(ADAPTER_TYPE_UNKNOWN); + ADAPTER_TYPE Type DEFAULT_INITIALIZER(ADAPTER_TYPE_UNKNOWN); /// Adapter vendor, see Diligent::ADAPTER_VENDOR. - ADAPTER_VENDOR Vendor DEFAULT_INITIALIZER(ADAPTER_VENDOR_UNKNOWN); + ADAPTER_VENDOR Vendor DEFAULT_INITIALIZER(ADAPTER_VENDOR_UNKNOWN); + + /// The PCI ID of the hardware vendor (if available). + Uint32 VendorId DEFAULT_INITIALIZER(0); + + /// The PCI ID of the hardware device (if available). + Uint32 DeviceId DEFAULT_INITIALIZER(0); - /// The amount of local video memory, in bytes, that is not accessible by CPU. + /// Number of video outputs this adapter has (if available). + Uint32 NumOutputs DEFAULT_INITIALIZER(0); - /// \note On some devices it may not be possible to query the memory size, + /// The amount of local video memory that is inaccessible by CPU, in bytes. + + /// \note Device-local memory is where USAGE_DEFAULT and USAGE_STATIC resources + /// are typically allocated. + /// + /// On some devices it may not be possible to query the memory size, /// in which case all memory sizes will be zero. Uint64 DeviceLocalMemory DEFAULT_INITIALIZER(0); - /// The amount of host-visible memory, in bytes, that can be accessed by CPU. + + /// The amount of host-visible memory that can be accessed by CPU and is visible by GPU, in bytes. + + /// \note Host-visible memory is where USAGE_DYNAMIC and USAGE_STAGING resources + /// are typically allocated. Uint64 HostVisibileMemory DEFAULT_INITIALIZER(0); - /// The amount of unified memory, in bytes, that can be directly accessed by both CPU and GPU. + + /// The amount of unified memory that can be directly accessed by both CPU and GPU, in bytes. + + /// \note Unified memory is where USAGE_UNIFIED resources are typically allocated, but + /// resourecs with other usages may be allocated as well if there is no corresponding + /// memory type. Uint64 UnifiedMemory DEFAULT_INITIALIZER(0); }; typedef struct GraphicsAdapterInfo GraphicsAdapterInfo; diff --git a/Graphics/GraphicsEngine/src/APIInfo.cpp b/Graphics/GraphicsEngine/src/APIInfo.cpp index d0d16ad9..f71b943e 100644 --- a/Graphics/GraphicsEngine/src/APIInfo.cpp +++ b/Graphics/GraphicsEngine/src/APIInfo.cpp @@ -68,7 +68,7 @@ static APIInfo InitAPIInfo() INIT_STRUCTURE_SIZE(Rect); INIT_STRUCTURE_SIZE(CopyTextureAttribs); INIT_STRUCTURE_SIZE(DeviceObjectAttribs); - INIT_STRUCTURE_SIZE(AdapterAttribs); + INIT_STRUCTURE_SIZE(GraphicsAdapterInfo); INIT_STRUCTURE_SIZE(DisplayModeAttribs); INIT_STRUCTURE_SIZE(SwapChainDesc); INIT_STRUCTURE_SIZE(FullScreenModeDesc); |
