mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-26 15:53:35 +01:00
Don't try to texture from depth if not supported by backend. Works around #13621
This commit is contained in:
1 parent
34efa1281b
commit
575ae376a9
4 files changed
+7
-1
No files matched your search
@@ -569,6 +569,10 @@ std::vector<AttachCandidate> TextureCacheCommon::GetFramebufferCandidates(const
|
||||
std::vector<AttachCandidate> candidates;
|
||||
|
||||
FramebufferNotificationChannel channel = Memory::IsDepthTexVRAMAddress(entry.addr) ? FramebufferNotificationChannel::NOTIFY_FB_DEPTH : FramebufferNotificationChannel::NOTIFY_FB_COLOR;
|
||||
if (channel == FramebufferNotificationChannel::NOTIFY_FB_DEPTH && !gstate_c.Supports(GPU_SUPPORTS_DEPTH_TEXTURE)) {
|
||||
// Depth texture not supported. Don't try to match it, fall back to the memory behind..
|
||||
return std::vector<AttachCandidate>();
|
||||
}
|
||||
|
||||
const std::vector<VirtualFramebuffer *> &framebuffers = framebufferManager_->Framebuffers();
|
||||
|
||||
|
||||
@@ -140,6 +140,7 @@ void GPU_D3D11::CheckGPUFeatures() {
|
||||
features |= GPU_SUPPORTS_ANISOTROPY;
|
||||
#endif
|
||||
|
||||
features |= GPU_SUPPORTS_DEPTH_TEXTURE;
|
||||
features |= GPU_SUPPORTS_OES_TEXTURE_NPOT;
|
||||
if (draw_->GetDeviceCaps().dualSourceBlend)
|
||||
features |= GPU_SUPPORTS_DUALSOURCE_BLEND;
|
||||
|
||||
+1
-1
@@ -480,7 +480,7 @@ enum {
|
||||
GPU_SUPPORTS_16BIT_FORMATS = FLAG_BIT(13),
|
||||
GPU_SUPPORTS_DEPTH_CLAMP = FLAG_BIT(14),
|
||||
GPU_SUPPORTS_32BIT_INT_FSHADER = FLAG_BIT(15),
|
||||
// Free bit: 16
|
||||
GPU_SUPPORTS_DEPTH_TEXTURE = FLAG_BIT(16),
|
||||
GPU_SUPPORTS_ACCURATE_DEPTH = FLAG_BIT(17),
|
||||
GPU_SUPPORTS_VAO = FLAG_BIT(18),
|
||||
GPU_SUPPORTS_COPY_IMAGE = FLAG_BIT(19),
|
||||
|
||||
@@ -231,6 +231,7 @@ void GPU_Vulkan::CheckGPUFeatures() {
|
||||
features |= GPU_SUPPORTS_INSTANCE_RENDERING;
|
||||
features |= GPU_SUPPORTS_VERTEX_TEXTURE_FETCH;
|
||||
features |= GPU_SUPPORTS_TEXTURE_FLOAT;
|
||||
features |= GPU_SUPPORTS_DEPTH_TEXTURE;
|
||||
|
||||
if (vulkan_->GetDeviceInfo().canBlitToPreferredDepthStencilFormat) {
|
||||
features |= GPU_SUPPORTS_FRAMEBUFFER_BLIT_TO_DEPTH;
|
||||
|
||||
Reference in new issue
Block a user