[Vulkan] add no_discard_stencil_in_transfer_pipelines support
This commit is contained in:
@@ -37,7 +37,6 @@ DEFINE_bool(
|
||||
"Allow stencil reference output usage on Direct3D 12 on Intel GPUs - not "
|
||||
"working on UHD Graphics 630 as of March 2021 (driver 27.20.0100.8336).",
|
||||
"GPU");
|
||||
DEFINE_bool(no_discard_stencil_in_transfer_pipelines, false, "bleh", "GPU");
|
||||
// TODO(Triang3l): Make ROV the default when it's optimized better (for
|
||||
// instance, using static shader modifications to pass render target
|
||||
// parameters).
|
||||
|
||||
@@ -84,3 +84,8 @@ DEFINE_int32(anisotropic_override, -1,
|
||||
" 4 = Force 8x anisotropic filtering\n"
|
||||
" 5 = Force 16x anisotropic filtering",
|
||||
"GPU");
|
||||
|
||||
DEFINE_bool(no_discard_stencil_in_transfer_pipelines, false,
|
||||
"Skip stencil bit discard in render target transfer pipelines. "
|
||||
"May improve performance on some GPUs.",
|
||||
"GPU");
|
||||
|
||||
@@ -34,6 +34,8 @@ DECLARE_int32(anisotropic_override);
|
||||
|
||||
DECLARE_bool(disassemble_pm4);
|
||||
|
||||
DECLARE_bool(no_discard_stencil_in_transfer_pipelines);
|
||||
|
||||
#define XE_GPU_FINE_GRAINED_DRAW_SCOPES 1
|
||||
|
||||
#endif // XENIA_GPU_GPU_FLAGS_H_
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/math.h"
|
||||
#include "xenia/gpu/draw_util.h"
|
||||
#include "xenia/gpu/gpu_flags.h"
|
||||
#include "xenia/gpu/registers.h"
|
||||
#include "xenia/gpu/spirv_builder.h"
|
||||
#include "xenia/gpu/spirv_compatibility.h"
|
||||
@@ -4281,7 +4282,7 @@ VkShaderModule VulkanRenderTargetCache::GetTransferShader(
|
||||
}
|
||||
} break;
|
||||
case TransferOutput::kStencilBit: {
|
||||
if (packed) {
|
||||
if (packed && !cvars::no_discard_stencil_in_transfer_pipelines) {
|
||||
// Kill the sample if the needed stencil bit is not set.
|
||||
assert_true(push_constants_member_stencil_mask != UINT32_MAX);
|
||||
id_vector_temp.clear();
|
||||
|
||||
Reference in New Issue
Block a user