From 21f78454bf3ed4cda389a4e589010363332edee9 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Wed, 28 Aug 2024 13:11:08 -0700 Subject: [PATCH] intel/brw: Fix Gfx9 3-src validation to handle FIXED_GRF Note this validation path is not being used at the moment, but will in a later commit. Reviewed-by: Ian Romanick Part-of: --- src/intel/compiler/brw_fs_validate.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/intel/compiler/brw_fs_validate.cpp b/src/intel/compiler/brw_fs_validate.cpp index a38cf32b00c..60aff9ec04f 100644 --- a/src/intel/compiler/brw_fs_validate.cpp +++ b/src/intel/compiler/brw_fs_validate.cpp @@ -270,10 +270,13 @@ brw_fs_validate(const fs_visitor &s) * This is applicable to 32b datatypes and 16b datatype. 64b * datatypes cannot use the replicate control. */ - fsv_assert_lte(inst->src[i].vstride, 1); - - if (brw_type_size_bytes(inst->src[i].type) > 4) - fsv_assert_eq(inst->src[i].vstride, 1); + const unsigned stride_in_bytes = byte_stride(inst->src[i]); + const unsigned size_in_bytes = brw_type_size_bytes(inst->src[i].type); + if (stride_in_bytes == 0) { + fsv_assert_lte(size_in_bytes, 4); + } else { + fsv_assert_eq(stride_in_bytes, size_in_bytes); + } } } }