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

Author: Jason Ekstrand <[email protected]>
Date:   Tue May  4 09:38:55 2021 -0500

intel/vec4: Update nr_params in pack_uniform_registers

This is where we re-arrange and re-pack the params.

Reviewed-by: Kenneth Graunke <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10571>

---

 src/intel/compiler/brw_vec4.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/intel/compiler/brw_vec4.cpp b/src/intel/compiler/brw_vec4.cpp
index 8cf74f526fa..b1178f23168 100644
--- a/src/intel/compiler/brw_vec4.cpp
+++ b/src/intel/compiler/brw_vec4.cpp
@@ -775,6 +775,7 @@ vec4_visitor::pack_uniform_registers()
 
    ralloc_free(param);
    this->uniforms = new_uniform_count;
+   stage_prog_data->nr_params = new_uniform_count * 4;
 
    /* Now, update the instructions for our repacked uniforms. */
    foreach_block_and_inst(block, vec4_instruction, inst, cfg) {
@@ -1834,8 +1835,6 @@ vec4_visitor::setup_uniforms(int reg)
    for (int i = 0; i < 4; i++)
       reg += stage_prog_data->ubo_ranges[i].length;
 
-   stage_prog_data->nr_params = this->uniforms * 4;
-
    prog_data->base.curb_read_length =
       reg - prog_data->base.dispatch_grf_start_reg;
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to