vk_pipeline_cache: Improve shadow detection
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user