Skip to content

Commit

Permalink
fix(p5r): fix reshade 6.2.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
clshortfuse committed Aug 19, 2024
1 parent 97d042a commit e084229
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/games/p5r/addon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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();
}
Expand All @@ -369,7 +369,7 @@ bool OnDrawIndexed(
auto& shader_replace_device_data = device->get_private_data<renodx::mods::shader::DeviceData>();
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();
{
Expand Down Expand Up @@ -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<uint32_t>(stages) & static_cast<uint32_t>(reshade::api::pipeline_stage::output_merger)) == 0u) return;
auto& data = cmd_list->get_private_data<CommandListData>();
data.last_output_merger = pipeline;
}
Expand Down

0 comments on commit e084229

Please sign in to comment.