[D3D12] Default to RTV on Intel ARC GPUs

This commit is contained in:
Gliniak
2025-05-21 20:31:36 +02:00
committed by Radosław Gliński
parent ada971aefc
commit 37e3fe9eb6
3 changed files with 49 additions and 6 deletions

View File

@@ -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) {

View File

@@ -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_;