brw: Fix cooperative matrix constant sources other than src0

Code was wrongly using src0 to pick the constant value.

Fixes: bf9ad36f2d ("brw: Properly handle cooperative matrices created with constants")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 6b0e29bc77)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
This commit is contained in:
Caio Oliveira 2026-02-08 15:59:11 -08:00 committed by Marge Bot
parent e0682b4317
commit 99bb93440f
2 changed files with 2 additions and 2 deletions

View file

@ -834,7 +834,7 @@
"description": "brw: Fix cooperative matrix constant sources other than src0",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "bf9ad36f2dfffa3567e67f0da3f0f44c71a7b011",
"notes": null

View file

@ -4407,7 +4407,7 @@ brw_from_nir_emit_cs_intrinsic(nir_to_brw_state &ntb,
*/
const unsigned num_components = nir_src_num_components(nsrc);
const unsigned bit_size = nir_src_bit_size(nsrc);
const nir_const_value *nval = nir_src_as_const_value(instr->src[0]);
const nir_const_value *nval = nir_src_as_const_value(nsrc);
assert(bit_size <= 32);
for (unsigned j = 1; j < num_components; j++)