mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[D3D12] Default to RTV on Intel ARC GPUs
This commit is contained in:
parent
ada971aefc
commit
37e3fe9eb6
|
|
@ -228,10 +228,13 @@ bool D3D12RenderTargetCache::Initialize() {
|
|||
// TODO(Triang3l): Make ROV the default when it's optimized better (for
|
||||
// instance, using static shader modifications to pass render target
|
||||
// parameters).
|
||||
path_ = provider.GetAdapterVendorID() ==
|
||||
ui::GraphicsProvider::GpuVendorID::kIntel
|
||||
? Path::kPixelShaderInterlock
|
||||
: Path::kHostRenderTargets;
|
||||
|
||||
path_ = Path::kHostRenderTargets;
|
||||
if (provider.GetAdapterVendorID() ==
|
||||
ui::GraphicsProvider::GpuVendorID::kIntel &&
|
||||
!provider.IsIntelArcGpu()) {
|
||||
path_ = Path::kPixelShaderInterlock;
|
||||
}
|
||||
#else
|
||||
// The AMD shader compiler crashes very often with Xenia's custom
|
||||
// output-merger code as of March 2021.
|
||||
|
|
@ -444,8 +447,7 @@ bool D3D12RenderTargetCache::Initialize() {
|
|||
cvars::native_stencil_value_output &&
|
||||
provider.IsPSSpecifiedStencilReferenceSupported() &&
|
||||
(cvars::native_stencil_value_output_d3d12_intel ||
|
||||
provider.GetAdapterVendorID() !=
|
||||
ui::GraphicsProvider::GpuVendorID::kIntel);
|
||||
!provider.IsIntelArcGpu());
|
||||
|
||||
if (path_ == Path::kHostRenderTargets) {
|
||||
// Host render targets.
|
||||
|
|
|
|||
|
|
@ -292,6 +292,8 @@ bool D3D12Provider::Initialize() {
|
|||
return false;
|
||||
}
|
||||
adapter_vendor_id_ = GpuVendorID(adapter_desc.VendorId);
|
||||
adapter_device_id_ = adapter_desc.DeviceId;
|
||||
|
||||
int adapter_name_mb_size = WideCharToMultiByte(
|
||||
CP_UTF8, 0, adapter_desc.Description, -1, nullptr, 0, nullptr, nullptr);
|
||||
if (adapter_name_mb_size != 0) {
|
||||
|
|
|
|||
|
|
@ -101,6 +101,44 @@ class D3D12Provider : public GraphicsProvider {
|
|||
// Adapter info.
|
||||
GpuVendorID GetAdapterVendorID() const { return adapter_vendor_id_; }
|
||||
|
||||
bool IsIntelArcGpu() const {
|
||||
if (adapter_vendor_id_ != GpuVendorID::kIntel) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Desktop IDs - Alchemist
|
||||
if (adapter_device_id_ >= 0x56A0 && adapter_device_id_ <= 0x56BD) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Mobile IDs - Alchemist
|
||||
if (adapter_device_id_ >= 0x5690 && adapter_device_id_ <= 0x5697) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Desktop IDs - Battlemage
|
||||
if (adapter_device_id_ >= 0xE20B && adapter_device_id_ <= 0xE20C) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Meteor Lake
|
||||
if (adapter_device_id_ >= 0x7D40 && adapter_device_id_ <= 0x7DD5) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Lunar Lake
|
||||
if (adapter_device_id_ >= 0x6420 && adapter_device_id_ <= 0x64B0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Arrow Lake
|
||||
if (adapter_device_id_ >= 0x7D41 && adapter_device_id_ <= 0x7D67) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Device features.
|
||||
D3D12_HEAP_FLAGS GetHeapFlagCreateNotZeroed() const {
|
||||
return heap_flag_create_not_zeroed_;
|
||||
|
|
@ -197,6 +235,7 @@ class D3D12Provider : public GraphicsProvider {
|
|||
uint32_t descriptor_sizes_[D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES];
|
||||
|
||||
GpuVendorID adapter_vendor_id_;
|
||||
uint32_t adapter_device_id_;
|
||||
|
||||
D3D12_HEAP_FLAGS heap_flag_create_not_zeroed_;
|
||||
D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER programmable_sample_positions_tier_;
|
||||
|
|
|
|||
Loading…
Reference in a new issue