Module: Mesa
Branch: main
Commit: e6c1e0e51887e778cde75bbf9d4df780cffcfdc9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e6c1e0e51887e778cde75bbf9d4df780cffcfdc9

Author: Karmjit Mahil <[email protected]>
Date:   Sat Sep 23 16:46:30 2023 +0100

pvr: Fix MRT index in PBE state

The same MRT index was incorrectly being set for all render
targets, in the PBE state.

Signed-off-by: Karmjit Mahil <[email protected]>
Reviewed-by: Frank Binns <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>

---

 src/imagination/vulkan/pvr_cmd_buffer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/imagination/vulkan/pvr_cmd_buffer.c 
b/src/imagination/vulkan/pvr_cmd_buffer.c
index 42af3c17a3b..23708609790 100644
--- a/src/imagination/vulkan/pvr_cmd_buffer.c
+++ b/src/imagination/vulkan/pvr_cmd_buffer.c
@@ -1319,8 +1319,7 @@ pvr_setup_emit_state(const struct pvr_device_info 
*dev_info,
       return;
    }
 
-   emit_state->emit_count = hw_render->eot_surface_count;
-
+   emit_state->emit_count = 0;
    for (uint32_t i = 0; i < hw_render->eot_surface_count; i++) {
       const struct pvr_framebuffer *framebuffer = 
render_pass_info->framebuffer;
       const struct pvr_renderpass_hwsetup_eot_surface *surface =
@@ -1349,7 +1348,7 @@ pvr_setup_emit_state(const struct pvr_device_info 
*dev_info,
 
       pvr_setup_pbe_state(dev_info,
                           framebuffer,
-                          surface->mrt_idx,
+                          emit_state->emit_count,
                           mrt_resource,
                           iview,
                           &render_pass_info->render_area,
@@ -1357,6 +1356,7 @@ pvr_setup_emit_state(const struct pvr_device_info 
*dev_info,
                           samples,
                           emit_state->pbe_cs_words[i],
                           emit_state->pbe_reg_words[i]);
+      emit_state->emit_count += 1;
    }
 }
 

Reply via email to