From 6118b94f9e1c1a8422d475a9fcc3dcfa3410248f Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 3 Mar 2023 00:23:29 +1000 Subject: [PATCH] GS/Vulkan: Fix a bunch of validation warnings None of these were errors, but it's still good to have clean output. --- bin/resources/shaders/vulkan/convert.glsl | 16 +++++++++++----- bin/resources/shaders/vulkan/tfx.glsl | 2 +- pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp | 1 - 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/bin/resources/shaders/vulkan/convert.glsl b/bin/resources/shaders/vulkan/convert.glsl index c911b36008..d58b7ea58e 100644 --- a/bin/resources/shaders/vulkan/convert.glsl +++ b/bin/resources/shaders/vulkan/convert.glsl @@ -23,7 +23,17 @@ layout(location = 0) in vec2 v_tex; #if defined(ps_convert_rgba8_16bits) || defined(ps_convert_float32_32bits) layout(location = 0) out uint o_col0; -#else +#elif !defined(ps_datm1) && \ + !defined(ps_datm0) && \ + !defined(ps_convert_rgba8_float32) && \ + !defined(ps_convert_rgba8_float24) && \ + !defined(ps_convert_rgba8_float16) && \ + !defined(ps_convert_rgb5a1_float16) && \ + !defined(ps_convert_rgba8_float32_biln) && \ + !defined(ps_convert_rgba8_float24_biln) && \ + !defined(ps_convert_rgba8_float16_biln) && \ + !defined(ps_convert_rgb5a1_float16_biln) && \ + !defined(ps_depth_copy) layout(location = 0) out vec4 o_col0; #endif @@ -69,8 +79,6 @@ void ps_convert_rgba8_16bits() #ifdef ps_datm1 void ps_datm1() { - o_col0 = vec4(0, 0, 0, 0); - if(sample_c(v_tex).a < (127.5f / 255.0f)) // >= 0x80 pass discard; @@ -80,8 +88,6 @@ void ps_datm1() #ifdef ps_datm0 void ps_datm0() { - o_col0 = vec4(0, 0, 0, 0); - if((127.5f / 255.0f) < sample_c(v_tex).a) // < 0x80 pass (== 0x80 should not pass) discard; } diff --git a/bin/resources/shaders/vulkan/tfx.glsl b/bin/resources/shaders/vulkan/tfx.glsl index 4a453e2851..95ccb63df1 100644 --- a/bin/resources/shaders/vulkan/tfx.glsl +++ b/bin/resources/shaders/vulkan/tfx.glsl @@ -387,7 +387,7 @@ layout(location = 0) in VSOutput #if !defined(DISABLE_DUAL_SOURCE) && !PS_NO_COLOR1 layout(location = 0, index = 0) out vec4 o_col0; layout(location = 0, index = 1) out vec4 o_col1; -#else +#elif !PS_NO_COLOR layout(location = 0) out vec4 o_col0; #endif diff --git a/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp b/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp index 53db24c9c0..d5e9db1fa4 100644 --- a/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp +++ b/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp @@ -1143,7 +1143,6 @@ static void AddUtilityVertexAttributes(Vulkan::GraphicsPipelineBuilder& gpb) gpb.AddVertexBuffer(0, sizeof(GSVertexPT1)); gpb.AddVertexAttribute(0, 0, VK_FORMAT_R32G32B32A32_SFLOAT, 0); gpb.AddVertexAttribute(1, 0, VK_FORMAT_R32G32_SFLOAT, 16); - gpb.AddVertexAttribute(2, 0, VK_FORMAT_R8G8B8A8_UNORM, 28); gpb.SetPrimitiveTopology(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP); }