vk_pipeline_cache: Improve shadow detection

This commit is contained in:
GPUCode
2023-09-11 01:26:44 +03:00
parent 5c3f6e3b72
commit f17f127f46

View File

@@ -390,7 +390,11 @@ void PipelineCache::UseFragmentShader(const Pica::Regs& regs) {
if (new_shader) {
const bool use_spirv = Settings::values.spirv_shader_gen.GetValue();
if (use_spirv && !config.state.shadow_rendering.Value()) {
const auto texture0_type = config.state.texture0_type.Value();
const bool is_shadow = texture0_type == Pica::TexturingRegs::TextureConfig::Shadow2D ||
texture0_type == Pica::TexturingRegs::TextureConfig::ShadowCube ||
config.state.shadow_rendering.Value();
if (use_spirv && !is_shadow) {
const std::vector code = GenerateFragmentShaderSPV(config);
shader.module = CompileSPV(code, instance.GetDevice());
shader.MarkDone();