[D3D12] Add max GPU virtual address bits to D3D12Provider

This commit is contained in:
Triang3l 2018-11-26 08:02:15 +03:00
parent a03dd839f0
commit f3d34c1d88
2 changed files with 24 additions and 8 deletions

View File

@ -212,11 +212,22 @@ D3D12Provider::InitializationResult D3D12Provider::Initialize() {
programmable_sample_positions_tier_ =
uint32_t(options2.ProgrammableSamplePositionsTier);
}
XELOGD3D(
"Direct3D 12 device supports tiled resources tier %u, programmable "
"sample positions tier %u; rasterizer-ordered views %ssupported",
tiled_resources_tier_, programmable_sample_positions_tier_,
rasterizer_ordered_views_supported_ ? "" : "un");
virtual_address_bits_per_resource_ = 0;
D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT virtual_address_support;
if (SUCCEEDED(device->CheckFeatureSupport(
D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT, &virtual_address_support,
sizeof(virtual_address_support)))) {
virtual_address_bits_per_resource_ =
virtual_address_support.MaxGPUVirtualAddressBitsPerResource;
}
XELOGD3D("Direct3D 12 device features:");
XELOGD3D("* Max GPU virtual address bits per resource: %u",
virtual_address_bits_per_resource_);
XELOGD3D("* Programmable sample positions: tier %u",
programmable_sample_positions_tier_);
XELOGD3D("* Rasterizer-ordered views: %s",
rasterizer_ordered_views_supported_ ? "yes" : "no");
XELOGD3D("* Tiled resources: tier %u", tiled_resources_tier_);
// Get the graphics analysis interface, will silently fail if PIX is not
// attached.

View File

@ -62,12 +62,16 @@ class D3D12Provider : public GraphicsProvider {
return start;
}
// Device features.
uint32_t GetProgrammableSamplePositionsTier() const {
return programmable_sample_positions_tier_;
}
bool AreRasterizerOrderedViewsSupported() const {
return rasterizer_ordered_views_supported_;
}
uint32_t GetTiledResourcesTier() const { return tiled_resources_tier_; }
uint32_t GetProgrammableSamplePositionsTier() const {
return programmable_sample_positions_tier_;
uint32_t GetVirtualAddressBitsPerResource() const {
return virtual_address_bits_per_resource_;
}
// Proxies for Direct3D 12 functions since they are loaded dynamically.
@ -122,9 +126,10 @@ class D3D12Provider : public GraphicsProvider {
uint32_t descriptor_size_rtv_;
uint32_t descriptor_size_dsv_;
uint32_t programmable_sample_positions_tier_;
bool rasterizer_ordered_views_supported_;
uint32_t tiled_resources_tier_;
uint32_t programmable_sample_positions_tier_;
uint32_t virtual_address_bits_per_resource_;
};
} // namespace d3d12