mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
Dual source blend: Remove bad #ifdef that killed dual src code on Android... oops. Re-enable on nVidia Shield TV/Tablet. Fixes #10136 properly.
This commit is contained in:
parent
2498ce5e3e
commit
2dda2bfa78
@ -784,12 +784,10 @@ static const BlendEq eqLookup[] = {
|
||||
|
||||
static BlendFactor toDualSource(BlendFactor blendfunc) {
|
||||
switch (blendfunc) {
|
||||
#if !defined(USING_GLES2) // TODO: Remove when we have better headers
|
||||
case BlendFactor::SRC_ALPHA:
|
||||
return BlendFactor::SRC1_ALPHA;
|
||||
case BlendFactor::ONE_MINUS_SRC_ALPHA:
|
||||
return BlendFactor::ONE_MINUS_SRC1_ALPHA;
|
||||
#endif
|
||||
default:
|
||||
return blendfunc;
|
||||
}
|
||||
|
@ -245,14 +245,7 @@ void GPU_GLES::CheckGPUFeatures() {
|
||||
features |= GPU_SUPPORTS_DUALSOURCE_BLEND;
|
||||
}
|
||||
} else {
|
||||
#ifdef __ANDROID__
|
||||
// This appears to be broken on nVidia Shield TV.
|
||||
if (gl_extensions.gpuVendor != GPU_VENDOR_NVIDIA) {
|
||||
features |= GPU_SUPPORTS_DUALSOURCE_BLEND;
|
||||
}
|
||||
#else
|
||||
features |= GPU_SUPPORTS_DUALSOURCE_BLEND;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,12 +214,8 @@ void GPU_Vulkan::CheckGPUFeatures() {
|
||||
}
|
||||
if (vulkan_->GetFeaturesEnabled().dualSrcBlend) {
|
||||
switch (vulkan_->GetPhysicalDeviceProperties().vendorID) {
|
||||
case VULKAN_VENDOR_NVIDIA:
|
||||
// Workaround for Shield TV and Shield Tablet driver bug.
|
||||
if (strcmp(vulkan_->GetPhysicalDeviceProperties().deviceName, "NVIDIA Tegra X1") != 0 &&
|
||||
strcmp(vulkan_->GetPhysicalDeviceProperties().deviceName, "NVIDIA Tegra K1") != 0)
|
||||
features |= GPU_SUPPORTS_DUALSOURCE_BLEND;
|
||||
break;
|
||||
// We thought we had a bug here on nVidia but turns out we accidentally #ifdef-ed out crucial
|
||||
// code on Android.
|
||||
case VULKAN_VENDOR_INTEL:
|
||||
// Workaround for Intel driver bug.
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user