From 99bb93440f34423e1b6c17b1416ab3491631f3c2 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Sun, 8 Feb 2026 15:59:11 -0800 Subject: [PATCH] brw: Fix cooperative matrix constant sources other than src0 Code was wrongly using src0 to pick the constant value. Fixes: bf9ad36f2df ("brw: Properly handle cooperative matrices created with constants") Reviewed-by: Lionel Landwerlin (cherry picked from commit 6b0e29bc771a2e9ec93df99b7550b54ea7e098b5) Part-of: --- .pick_status.json | 2 +- src/intel/compiler/brw/brw_from_nir.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c1fd1311b9e..a5c416e5288 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/intel/compiler/brw/brw_from_nir.cpp b/src/intel/compiler/brw/brw_from_nir.cpp index f123b910258..4667600bc4c 100644 --- a/src/intel/compiler/brw/brw_from_nir.cpp +++ b/src/intel/compiler/brw/brw_from_nir.cpp @@ -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++)