video_core: Implement vulkan clear specified channel

This commit is contained in:
FengChen 2023-01-12 22:42:56 +08:00 committed by Feng Chen
parent 2efe42fc93
commit 818631a412
6 changed files with 152 additions and 20 deletions

View file

@ -45,6 +45,8 @@ set(SHADER_FILES
smaa_neighborhood_blending.vert
smaa_neighborhood_blending.frag
vulkan_blit_depth_stencil.frag
vulkan_color_clear.frag
vulkan_color_clear.vert
vulkan_fidelityfx_fsr_easu_fp16.comp
vulkan_fidelityfx_fsr_easu_fp32.comp
vulkan_fidelityfx_fsr_rcas_fp16.comp

View file

@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#version 460 core
layout (push_constant) uniform PushConstants {
vec4 clear_color;
};
layout(location = 0) out vec4 color;
void main() {
color = clear_color;
}

View file

@ -0,0 +1,10 @@
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#version 460 core
void main() {
float x = float((gl_VertexIndex & 1) << 2);
float y = float((gl_VertexIndex & 2) << 1);
gl_Position = vec4(x - 1.0, y - 1.0, 0.0, 1.0);
}