diff --git a/src/intel/compiler/brw_fs_builder.h b/src/intel/compiler/brw_fs_builder.h index 52872e6263c..038cb0bab14 100644 --- a/src/intel/compiler/brw_fs_builder.h +++ b/src/intel/compiler/brw_fs_builder.h @@ -151,6 +151,15 @@ namespace brw { return bld; } + /** + * Construct a builder for SIMD8-as-scalar + */ + fs_builder + scalar_group() const + { + return exec_all().group(8 * reg_unit(shader->devinfo), 0); + } + /** * Construct a builder with the given debug annotation info. */ diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index af0b4f6ca65..373b33e73db 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -6027,7 +6027,7 @@ fs_nir_emit_intrinsic(nir_to_brw_state &ntb, /* Since the image size is always uniform, we can just emit a SIMD8 * query instruction and splat the result out. */ - const fs_builder ubld = bld.exec_all().group(8 * reg_unit(devinfo), 0); + const fs_builder ubld = bld.scalar_group(); brw_reg tmp = ubld.vgrf(BRW_TYPE_UD, 4); fs_inst *inst = ubld.emit(SHADER_OPCODE_IMAGE_SIZE_LOGICAL, @@ -6507,7 +6507,7 @@ fs_nir_emit_intrinsic(nir_to_brw_state &ntb, * for SURFTYPE_BUFFER, we can just use the SIMD8 variant regardless of * the dispatch width. */ - const fs_builder ubld = bld.exec_all().group(8 * reg_unit(devinfo), 0); + const fs_builder ubld = bld.scalar_group(); brw_reg ret_payload = ubld.vgrf(BRW_TYPE_UD, 4); /* Set LOD = 0 */