mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Flag shader blending as broken on Adreno for now.
This commit is contained in:
parent
5f5277a409
commit
262a306b9a
10 changed files with 30 additions and 13 deletions
|
@ -789,7 +789,6 @@ VKContext::VKContext(VulkanContext *vulkan, bool splitSubmit)
|
|||
caps_.textureNPOTFullySupported = true;
|
||||
caps_.fragmentShaderDepthWriteSupported = true;
|
||||
caps_.logicOpSupported = vulkan->GetDeviceFeatures().enabled.logicOp != 0;
|
||||
caps_.framebufferFetchSupported = true; // Limited, through input attachments and self-dependencies.
|
||||
|
||||
auto deviceProps = vulkan->GetPhysicalDeviceProperties(vulkan_->GetCurrentPhysicalDeviceIndex()).properties;
|
||||
switch (deviceProps.vendorID) {
|
||||
|
@ -813,6 +812,11 @@ VKContext::VKContext(VulkanContext *vulkan, bool splitSubmit)
|
|||
// Color write mask not masking write in certain scenarios with a depth test, see #10421.
|
||||
// Known still present on driver 0x80180000 and Adreno 5xx (possibly more.)
|
||||
bugs_.Infest(Bugs::COLORWRITEMASK_BROKEN_WITH_DEPTHTEST);
|
||||
|
||||
// Trying to follow all the rules in https://registry.khronos.org/vulkan/specs/1.3/html/vkspec.html#synchronization-pipeline-barriers-subpass-self-dependencies
|
||||
// and https://registry.khronos.org/vulkan/specs/1.3/html/vkspec.html#renderpass-feedbackloop, but still it doesn't
|
||||
// quite work - artifacts on triangle boundaries on Adreno.
|
||||
bugs_.Infest(Bugs::SUBPASS_FEEDBACK_BROKEN);
|
||||
} else if (caps_.vendor == GPUVendor::VENDOR_AMD) {
|
||||
// See issue #10074, and also #10065 (AMD) and #10109 for the choice of the driver version to check for.
|
||||
if (deviceProps.driverVersion < 0x00407000) {
|
||||
|
@ -839,6 +843,10 @@ VKContext::VKContext(VulkanContext *vulkan, bool splitSubmit)
|
|||
}
|
||||
}
|
||||
|
||||
// Limited, through input attachments and self-dependencies.
|
||||
// We turn it off here already if buggy.
|
||||
caps_.framebufferFetchSupported = !bugs_.Has(Bugs::SUBPASS_FEEDBACK_BROKEN);
|
||||
|
||||
caps_.deviceID = deviceProps.deviceID;
|
||||
device_ = vulkan->GetDevice();
|
||||
|
||||
|
|
|
@ -681,6 +681,7 @@ const char *Bugs::GetBugName(uint32_t bug) {
|
|||
case MALI_STENCIL_DISCARD_BUG: return "MALI_STENCIL_DISCARD_BUG";
|
||||
case RASPBERRY_SHADER_COMP_HANG: return "RASPBERRY_SHADER_COMP_HANG";
|
||||
case MALI_CONSTANT_LOAD_BUG: return "MALI_CONSTANT_LOAD_BUG";
|
||||
case SUBPASS_FEEDBACK_BROKEN: return "SUBPASS_FEEDBACK_BROKEN";
|
||||
default: return "(N/A)";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -332,6 +332,7 @@ public:
|
|||
MALI_STENCIL_DISCARD_BUG = 8,
|
||||
RASPBERRY_SHADER_COMP_HANG = 9,
|
||||
MALI_CONSTANT_LOAD_BUG = 10,
|
||||
SUBPASS_FEEDBACK_BROKEN = 11,
|
||||
MAX_BUG,
|
||||
};
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ public:
|
|||
disabled_ = *value_ < 0;
|
||||
}
|
||||
|
||||
const char *tag() const { return "SliderPopup"; }
|
||||
const char *tag() const override { return "SliderPopup"; }
|
||||
|
||||
Event OnChange;
|
||||
|
||||
|
@ -216,7 +216,7 @@ public:
|
|||
: PopupScreen(title, "OK", "Cancel"), units_(units), value_(value), originalValue_(*value), minValue_(minValue), maxValue_(maxValue), step_(step), changing_(false), liveUpdate_(liveUpdate) {}
|
||||
void CreatePopupContents(UI::ViewGroup *parent) override;
|
||||
|
||||
const char *tag() const { return "SliderFloatPopup"; }
|
||||
const char *tag() const override { return "SliderFloatPopup"; }
|
||||
|
||||
Event OnChange;
|
||||
|
||||
|
@ -245,7 +245,7 @@ public:
|
|||
: PopupScreen(title, "OK", "Cancel"), value_(value), placeholder_(placeholder), maxLen_(maxLen) {}
|
||||
virtual void CreatePopupContents(ViewGroup *parent) override;
|
||||
|
||||
const char *tag() const { return "TextEditPopup"; }
|
||||
const char *tag() const override { return "TextEditPopup"; }
|
||||
|
||||
Event OnChange;
|
||||
|
||||
|
|
|
@ -153,23 +153,21 @@ void DrawEngineD3D11::ApplyDrawState(int prim) {
|
|||
// We ignore the logicState on D3D since there's no support, the emulation of it is blend-and-shader only.
|
||||
|
||||
if (pipelineState_.FramebufferRead()) {
|
||||
FBOTexState fboTexBindState_ = FBO_TEX_NONE;
|
||||
ApplyFramebufferRead(&fboTexBindState_);
|
||||
FBOTexState fboTexBindState = FBO_TEX_NONE;
|
||||
ApplyFramebufferRead(&fboTexBindState);
|
||||
// The shader takes over the responsibility for blending, so recompute.
|
||||
ApplyStencilReplaceAndLogicOpIgnoreBlend(blendState.replaceAlphaWithStencil, blendState);
|
||||
|
||||
if (fboTexBindState_ == FBO_TEX_COPY_BIND_TEX) {
|
||||
if (fboTexBindState == FBO_TEX_COPY_BIND_TEX) {
|
||||
framebufferManager_->BindFramebufferAsColorTexture(1, framebufferManager_->GetCurrentRenderVFB(), BINDFBCOLOR_MAY_COPY);
|
||||
// No sampler required, we do a plain Load in the pixel shader.
|
||||
fboTexBound_ = true;
|
||||
fboTexBindState_ = FBO_TEX_NONE;
|
||||
fboTexBindState = FBO_TEX_NONE;
|
||||
|
||||
framebufferManager_->RebindFramebuffer("RebindFramebuffer - ApplyDrawState");
|
||||
// Must dirty blend state here so we re-copy next time. Example: Lunar's spell effects.
|
||||
dirtyRequiresRecheck_ |= DIRTY_BLEND_STATE;
|
||||
gstate_c.Dirty(DIRTY_BLEND_STATE);
|
||||
} else if (fboTexBindState_ == FBO_TEX_READ_FRAMEBUFFER) {
|
||||
fboTexBindState_ = FBO_TEX_NONE;
|
||||
}
|
||||
|
||||
dirtyRequiresRecheck_ |= DIRTY_FRAGMENTSHADER_STATE;
|
||||
|
|
|
@ -389,6 +389,7 @@ VkDescriptorSet DrawEngineVulkan::GetOrCreateDescriptorSet(VkImageView imageView
|
|||
key.base_ = base;
|
||||
key.light_ = light;
|
||||
key.bone_ = bone;
|
||||
key.secondaryIsInputAttachment = boundSecondaryIsInputAttachment_;
|
||||
|
||||
FrameData &frame = GetCurFrame();
|
||||
// See if we already have this descriptor set cached.
|
||||
|
|
|
@ -217,6 +217,8 @@ private:
|
|||
|
||||
// Secondary texture for shader blending
|
||||
VkImageView boundSecondary_ = VK_NULL_HANDLE;
|
||||
bool boundSecondaryIsInputAttachment_ = false;
|
||||
|
||||
// CLUT texture for shader depal
|
||||
VkImageView boundDepal_ = VK_NULL_HANDLE;
|
||||
bool boundDepalSmoothed_ = false;
|
||||
|
|
|
@ -229,8 +229,10 @@ void GPU_Vulkan::CheckGPUFeatures() {
|
|||
features |= GPU_SUPPORTS_TEXTURE_FLOAT;
|
||||
features |= GPU_SUPPORTS_DEPTH_TEXTURE;
|
||||
|
||||
// input attachments
|
||||
features |= GPU_SUPPORTS_ANY_FRAMEBUFFER_FETCH;
|
||||
// through input attachments, when not broken.
|
||||
if (draw_->GetDeviceCaps().framebufferFetchSupported) {
|
||||
features |= GPU_SUPPORTS_ANY_FRAMEBUFFER_FETCH;
|
||||
}
|
||||
|
||||
auto &enabledFeatures = vulkan->GetDeviceFeatures().enabled;
|
||||
if (enabledFeatures.depthClamp) {
|
||||
|
|
|
@ -368,6 +368,7 @@ void DrawEngineVulkan::BindShaderBlendTex() {
|
|||
bool bindResult = framebufferManager_->BindFramebufferAsColorTexture(1, framebufferManager_->GetCurrentRenderVFB(), BINDFBCOLOR_MAY_COPY);
|
||||
_dbg_assert_(bindResult);
|
||||
boundSecondary_ = (VkImageView)draw_->GetNativeObject(Draw::NativeObject::BOUND_TEXTURE1_IMAGEVIEW);
|
||||
boundSecondaryIsInputAttachment_ = false;
|
||||
fboTexBound_ = true;
|
||||
fboTexBindState_ = FBO_TEX_NONE;
|
||||
|
||||
|
@ -376,7 +377,10 @@ void DrawEngineVulkan::BindShaderBlendTex() {
|
|||
} else if (fboTexBindState_ == FBO_TEX_READ_FRAMEBUFFER) {
|
||||
draw_->BindCurrentFramebufferForColorInput();
|
||||
boundSecondary_ = (VkImageView)draw_->GetNativeObject(Draw::NativeObject::BOUND_FRAMEBUFFER_COLOR_IMAGEVIEW);
|
||||
boundSecondaryIsInputAttachment_ = true;
|
||||
fboTexBindState_ = FBO_TEX_NONE;
|
||||
} else {
|
||||
boundSecondary_ = VK_NULL_HANDLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
virtual void update() override;
|
||||
virtual bool key(const KeyInput &key) override;
|
||||
|
||||
const char *tag() const { return "install_zip"; }
|
||||
const char *tag() const override { return "install_zip"; }
|
||||
|
||||
protected:
|
||||
virtual void CreateViews() override;
|
||||
|
|
Loading…
Add table
Reference in a new issue