mirror of
https://github.com/libretro/ppsspp.git
synced 2025-03-03 22:17:08 +00:00
Vulkan: Workaround stencil upload bug on Adreno.
We write a static depth value, which will be ignored, to force the driver to support discard.
This commit is contained in:
parent
9f4cd3fcdb
commit
bd13f6b906
@ -27,6 +27,8 @@
|
||||
#include "GPU/Vulkan/TextureCacheVulkan.h"
|
||||
#include "GPU/Vulkan/VulkanUtil.h"
|
||||
|
||||
// This shader references gl_FragDepth to prevent early fragment tests.
|
||||
// They shouldn't happen since it uses discard, but Adreno detects that incorrectly - see #10634.
|
||||
static const char *stencil_fs = R"(#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#extension GL_ARB_shading_language_420pack : enable
|
||||
@ -38,6 +40,8 @@ layout (location = 0) in vec2 v_texcoord0;
|
||||
layout (location = 0) out vec4 fragColor0;
|
||||
|
||||
void main() {
|
||||
gl_FragDepth = 0.0;
|
||||
|
||||
if (u_stencilValue == 0) {
|
||||
fragColor0 = vec4(0.0);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user