From e0842297862a326a5ffd547b463a53820b993c2b Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Mon, 19 Aug 2024 14:03:26 -0400 Subject: [PATCH] fix(p5r): fix reshade 6.2.0 support --- src/games/p5r/addon.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/games/p5r/addon.cpp b/src/games/p5r/addon.cpp index 42e66fa1..4b44ea0a 100644 --- a/src/games/p5r/addon.cpp +++ b/src/games/p5r/addon.cpp @@ -341,7 +341,7 @@ bool OnDrawIndexed( read_only_lock.unlock(); { const std::unique_lock lock(data.mutex); - device->create_pipeline({0xFFFFFFFFFFFFFFFF}, 1, &subobjects, &data.min_alpha_pipeline); + device->create_pipeline(shader_state.pipeline_layout, 1, &subobjects, &data.min_alpha_pipeline); } read_only_lock.lock(); } @@ -360,7 +360,7 @@ bool OnDrawIndexed( read_only_lock.unlock(); { const std::unique_lock lock(data.mutex); - device->create_pipeline({0xFFFFFFFFFFFFFFFF}, 1, &subobjects, &data.max_alpha_pipeline); + device->create_pipeline(shader_state.pipeline_layout, 1, &subobjects, &data.max_alpha_pipeline); } read_only_lock.lock(); } @@ -369,7 +369,7 @@ bool OnDrawIndexed( auto& shader_replace_device_data = device->get_private_data(); const std::shared_lock lock(shader_replace_device_data.mutex); if ( - auto pair = shader_replace_device_data.modded_pipeline_layouts.find(0xFFFFFFFFFFFFFFFF); + auto pair = shader_replace_device_data.modded_pipeline_layouts.find(shader_state.pipeline_layout.handle); pair != shader_replace_device_data.modded_pipeline_layouts.end()) { read_only_lock.unlock(); { @@ -429,7 +429,7 @@ void OnBindPipeline( reshade::api::command_list* cmd_list, reshade::api::pipeline_stage stages, reshade::api::pipeline pipeline) { - if (stages != reshade::api::pipeline_stage::output_merger) return; + if ((static_cast(stages) & static_cast(reshade::api::pipeline_stage::output_merger)) == 0u) return; auto& data = cmd_list->get_private_data(); data.last_output_merger = pipeline; }