From 781c5a76d97c542b94a575a0d933df008d735693 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Tue, 14 May 2024 03:29:38 +0300 Subject: [PATCH] rsx: Fix processing of deferred indexed draw parameter updates --- rpcs3/Emu/RSX/NV47/HW/common.cpp | 4 ++-- rpcs3/Emu/RSX/NV47/HW/common.h | 2 +- rpcs3/Emu/RSX/NV47/HW/nv4097.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/RSX/NV47/HW/common.cpp b/rpcs3/Emu/RSX/NV47/HW/common.cpp index f02b3ab7da..ee901bcd72 100644 --- a/rpcs3/Emu/RSX/NV47/HW/common.cpp +++ b/rpcs3/Emu/RSX/NV47/HW/common.cpp @@ -30,7 +30,7 @@ namespace rsx REGS(ctx)->register_vertex_info[attrib_index].data[channel_select] = value; } - void push_draw_parameter_change(rsx::context* ctx, rsx::command_barrier_type type, u32 reg, u32 arg) + void push_draw_parameter_change(rsx::context* ctx, rsx::command_barrier_type type, u32 reg, u32 arg0, u32 arg1, u32 index) { // NOTE: We can't test against latch here, since a previous change may be buffered in a pending barrier. if (!RSX(ctx)->in_begin_end || REGS(ctx)->current_draw_clause.empty()) @@ -42,7 +42,7 @@ namespace rsx REGS(ctx)->decode(reg, REGS(ctx)->latch); // Insert barrier to reinsert the value later - REGS(ctx)->current_draw_clause.insert_command_barrier(type, arg); + REGS(ctx)->current_draw_clause.insert_command_barrier(type, arg0, arg1, index); } u32 get_report_data_impl([[maybe_unused]] rsx::context* ctx, u32 offset) diff --git a/rpcs3/Emu/RSX/NV47/HW/common.h b/rpcs3/Emu/RSX/NV47/HW/common.h index 04589d651e..bdcc367de0 100644 --- a/rpcs3/Emu/RSX/NV47/HW/common.h +++ b/rpcs3/Emu/RSX/NV47/HW/common.h @@ -15,7 +15,7 @@ namespace rsx void push_vertex_data(rsx::context* ctx, u32 attrib_index, u32 channel_select, int count, rsx::vertex_base_type vtype, u32 value); - void push_draw_parameter_change(rsx::context* ctx, rsx::command_barrier_type type, u32 reg, u32 arg); + void push_draw_parameter_change(rsx::context* ctx, rsx::command_barrier_type type, u32 reg, u32 arg0, u32 arg1 = 0u, u32 index = 0u); void set_fragment_texture_dirty_bit(rsx::context* ctx, u32 index); diff --git a/rpcs3/Emu/RSX/NV47/HW/nv4097.h b/rpcs3/Emu/RSX/NV47/HW/nv4097.h index d6c1a33f2d..68a2ddb9df 100644 --- a/rpcs3/Emu/RSX/NV47/HW/nv4097.h +++ b/rpcs3/Emu/RSX/NV47/HW/nv4097.h @@ -217,7 +217,7 @@ namespace rsx { static void impl(context* ctx, u32 reg, u32 arg) { - util::push_draw_parameter_change(ctx, vertex_array_offset_modifier_barrier, reg, arg); + util::push_draw_parameter_change(ctx, vertex_array_offset_modifier_barrier, reg, arg, 0, index); } };