ARM buildfix

This commit is contained in:
Henrik Rydgård 2017-11-22 11:01:42 +01:00
parent 6f80a164b4
commit e6be86ce74
7 changed files with 42 additions and 42 deletions

View File

@ -208,7 +208,7 @@ void GPU_D3D11::CheckGPUFeatures() {
features |= GPU_PREFER_CPU_DOWNLOAD;
// Accurate depth is required on AMD so we ignore the compat flag to disable it on those. See #9545
if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth || draw_->GetDeviceCaps().vendor == Draw::GPUVendor::AMD) {
if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth || draw_->GetDeviceCaps().vendor == Draw::GPUVendor::VENDOR_AMD) {
features |= GPU_SUPPORTS_ACCURATE_DEPTH; // Breaks text in PaRappa for some reason.
}

View File

@ -189,7 +189,7 @@ void GPU_DX9::CheckGPUFeatures() {
features |= GPU_PREFER_CPU_DOWNLOAD;
// Accurate depth is required on AMD so we ignore the compat flag to disable it on those. See #9545
if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth || draw_->GetDeviceCaps().vendor == Draw::GPUVendor::AMD) {
if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth || draw_->GetDeviceCaps().vendor == Draw::GPUVendor::VENDOR_AMD) {
features |= GPU_SUPPORTS_ACCURATE_DEPTH;
}

View File

@ -251,14 +251,14 @@ enum InfoField {
};
enum class GPUVendor {
UNKNOWN,
NVIDIA,
INTEL,
AMD,
ARM, // Mali
QUALCOMM,
IMGTEC, // PowerVR
BROADCOM, // Raspberry
VENDOR_UNKNOWN,
VENDOR_NVIDIA,
VENDOR_INTEL,
VENDOR_AMD,
VENDOR_ARM, // Mali
VENDOR_QUALCOMM,
VENDOR_IMGTEC, // PowerVR
VENDOR_BROADCOM, // Raspberry
};
enum class NativeObject {

View File

@ -243,14 +243,14 @@ D3D11DrawContext::D3D11DrawContext(ID3D11Device *device, ID3D11DeviceContext *de
adapter->GetDesc(&desc);
adapterDesc_ = ConvertWStringToUTF8(desc.Description);
switch (desc.VendorId) {
case 0x10DE: caps_.vendor = GPUVendor::NVIDIA; break;
case 0x10DE: caps_.vendor = GPUVendor::VENDOR_NVIDIA; break;
case 0x1002:
case 0x1022: caps_.vendor = GPUVendor::AMD; break;
case 0x1022: caps_.vendor = GPUVendor::VENDOR_AMD; break;
case 0x163C:
case 0x8086:
case 0x8087: caps_.vendor = GPUVendor::INTEL; break;
case 0x8087: caps_.vendor = GPUVendor::VENDOR_INTEL; break;
default:
caps_.vendor = GPUVendor::UNKNOWN;
caps_.vendor = GPUVendor::VENDOR_UNKNOWN;
}
adapter->Release();
}

View File

@ -589,14 +589,14 @@ D3D9Context::D3D9Context(IDirect3D9 *d3d, IDirect3D9Ex *d3dEx, int adapterId, ID
ELOG("Failed to get adapter identifier: %d", adapterId);
}
switch (identifier_.VendorId) {
case 0x10DE: caps_.vendor = GPUVendor::NVIDIA; break;
case 0x10DE: caps_.vendor = GPUVendor::VENDOR_NVIDIA; break;
case 0x1002:
case 0x1022: caps_.vendor = GPUVendor::AMD; break;
case 0x1022: caps_.vendor = GPUVendor::VENDOR_AMD; break;
case 0x163C:
case 0x8086:
case 0x8087: caps_.vendor = GPUVendor::INTEL; break;
case 0x8087: caps_.vendor = GPUVendor::VENDOR_INTEL; break;
default:
caps_.vendor = GPUVendor::UNKNOWN;
caps_.vendor = GPUVendor::VENDOR_UNKNOWN;
}
if (!FAILED(device->GetDeviceCaps(&d3dCaps_))) {

View File

@ -546,14 +546,14 @@ public:
case VENDORSTRING: return (const char *)glGetString(GL_VENDOR);
case VENDOR:
switch (caps_.vendor) {
case GPUVendor::AMD: return "VENDOR_AMD";
case GPUVendor::IMGTEC: return "VENDOR_POWERVR";
case GPUVendor::NVIDIA: return "VENDOR_NVIDIA";
case GPUVendor::INTEL: return "VENDOR_INTEL";
case GPUVendor::QUALCOMM: return "VENDOR_ADRENO";
case GPUVendor::ARM: return "VENDOR_ARM";
case GPUVendor::BROADCOM: return "VENDOR_BROADCOM";
case GPUVendor::UNKNOWN:
case GPUVendor::VENDOR_AMD: return "VENDOR_AMD";
case GPUVendor::VENDOR_IMGTEC: return "VENDOR_POWERVR";
case GPUVendor::VENDOR_NVIDIA: return "VENDOR_NVIDIA";
case GPUVendor::VENDOR_INTEL: return "VENDOR_INTEL";
case GPUVendor::VENDOR_QUALCOMM: return "VENDOR_ADRENO";
case GPUVendor::VENDOR_ARM: return "VENDOR_ARM";
case GPUVendor::VENDOR_BROADCOM: return "VENDOR_BROADCOM";
case GPUVendor::VENDOR_UNKNOWN:
default:
return "VENDOR_UNKNOWN";
}
@ -611,16 +611,16 @@ OpenGLContext::OpenGLContext() {
caps_.framebufferDepthBlitSupported = caps_.framebufferBlitSupported;
switch (gl_extensions.gpuVendor) {
case GPU_VENDOR_AMD: caps_.vendor = GPUVendor::AMD; break;
case GPU_VENDOR_NVIDIA: caps_.vendor = GPUVendor::NVIDIA; break;
case GPU_VENDOR_ARM: caps_.vendor = GPUVendor::ARM; break;
case GPU_VENDOR_QUALCOMM: caps_.vendor = GPUVendor::QUALCOMM; break;
case GPU_VENDOR_BROADCOM: caps_.vendor = GPUVendor::BROADCOM; break;
case GPU_VENDOR_INTEL: caps_.vendor = GPUVendor::INTEL; break;
case GPU_VENDOR_IMGTEC: caps_.vendor = GPUVendor::IMGTEC; break;
case GPU_VENDOR_AMD: caps_.vendor = GPUVendor::VENDOR_AMD; break;
case GPU_VENDOR_NVIDIA: caps_.vendor = GPUVendor::VENDOR_NVIDIA; break;
case GPU_VENDOR_ARM: caps_.vendor = GPUVendor::VENDOR_ARM; break;
case GPU_VENDOR_QUALCOMM: caps_.vendor = GPUVendor::VENDOR_QUALCOMM; break;
case GPU_VENDOR_BROADCOM: caps_.vendor = GPUVendor::VENDOR_BROADCOM; break;
case GPU_VENDOR_INTEL: caps_.vendor = GPUVendor::VENDOR_INTEL; break;
case GPU_VENDOR_IMGTEC: caps_.vendor = GPUVendor::VENDOR_IMGTEC; break;
case GPU_VENDOR_UNKNOWN:
default:
caps_.vendor = GPUVendor::UNKNOWN;
caps_.vendor = GPUVendor::VENDOR_UNKNOWN;
break;
}
}
@ -949,7 +949,7 @@ bool OpenGLContext::CopyFramebufferToMemorySync(Framebuffer *src, int channelBit
}
// Apply the correct alignment.
glPixelStorei(GL_PACK_ALIGNMENT, alignment);
if (!gl_extensions.IsGLES || (gl_extensions.GLES3 && caps_.vendor != GPUVendor::NVIDIA)) {
if (!gl_extensions.IsGLES || (gl_extensions.GLES3 && caps_.vendor != GPUVendor::VENDOR_NVIDIA)) {
// Some drivers seem to require we specify this. See #8254.
glPixelStorei(GL_PACK_ROW_LENGTH, pixelStride);
}

View File

@ -689,14 +689,14 @@ VKContext::VKContext(VulkanContext *vulkan, bool splitSubmit)
caps_.preferredDepthBufferFormat = DataFormat::D24_S8; // TODO: Ask vulkan.
switch (vulkan->GetPhysicalDeviceProperties().vendorID) {
case VULKAN_VENDOR_AMD: caps_.vendor = GPUVendor::AMD; break;
case VULKAN_VENDOR_ARM: caps_.vendor = GPUVendor::ARM; break;
case VULKAN_VENDOR_IMGTEC: caps_.vendor = GPUVendor::IMGTEC; break;
case VULKAN_VENDOR_NVIDIA: caps_.vendor = GPUVendor::NVIDIA; break;
case VULKAN_VENDOR_QUALCOMM: caps_.vendor = GPUVendor::QUALCOMM; break;
case VULKAN_VENDOR_INTEL: caps_.vendor = GPUVendor::INTEL; break;
case VULKAN_VENDOR_AMD: caps_.vendor = GPUVendor::VENDOR_AMD; break;
case VULKAN_VENDOR_ARM: caps_.vendor = GPUVendor::VENDOR_ARM; break;
case VULKAN_VENDOR_IMGTEC: caps_.vendor = GPUVendor::VENDOR_IMGTEC; break;
case VULKAN_VENDOR_NVIDIA: caps_.vendor = GPUVendor::VENDOR_NVIDIA; break;
case VULKAN_VENDOR_QUALCOMM: caps_.vendor = GPUVendor::VENDOR_QUALCOMM; break;
case VULKAN_VENDOR_INTEL: caps_.vendor = GPUVendor::VENDOR_INTEL; break;
default:
caps_.vendor = GPUVendor::UNKNOWN;
caps_.vendor = GPUVendor::VENDOR_UNKNOWN;
}
device_ = vulkan->GetDevice();