Module: Mesa Branch: main Commit: 367729a7321566cc61bbcc2d13405d20a881149d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=367729a7321566cc61bbcc2d13405d20a881149d
Author: Eric Anholt <[email protected]> Date: Mon May 3 21:07:53 2021 -0700 tgsi_exec: Drop unused destination dimension support. As you can see, nothing used the index2d value we computed. Turns out this does remove some unused code from release builds. Reviewed-by: Adam Jackson <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10605> --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 72 ---------------------------------- 1 file changed, 72 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index d5424a2bb75..50a8efcc6b7 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -1734,7 +1734,6 @@ store_dest_dstret(struct tgsi_exec_machine *mach, { static union tgsi_exec_channel null; union tgsi_exec_channel *dst; - union tgsi_exec_channel index2D; int offset = 0; /* indirection offset */ int index; @@ -1775,77 +1774,6 @@ store_dest_dstret(struct tgsi_exec_machine *mach, offset = indir_index.i[0]; } - /* There is an extra source register that is a second - * subscript to a register file. Effectively it means that - * the register file is actually a 2D array of registers. - * - * file[3][1], - * where: - * [3] = Dimension.Index - */ - if (reg->Register.Dimension) { - index2D.i[0] = - index2D.i[1] = - index2D.i[2] = - index2D.i[3] = reg->Dimension.Index; - - /* Again, the second subscript index can be addressed indirectly - * identically to the first one. - * Nothing stops us from indirectly addressing the indirect register, - * but there is no need for that, so we won't exercise it. - * - * file[ind[4].y+3][1], - * where: - * ind = DimIndirect.File - * [4] = DimIndirect.Index - * .y = DimIndirect.SwizzleX - */ - if (reg->Dimension.Indirect) { - union tgsi_exec_channel index2; - union tgsi_exec_channel indir_index; - const uint execmask = mach->ExecMask; - unsigned swizzle; - uint i; - - index2.i[0] = - index2.i[1] = - index2.i[2] = - index2.i[3] = reg->DimIndirect.Index; - - swizzle = reg->DimIndirect.Swizzle; - fetch_src_file_channel(mach, - reg->DimIndirect.File, - swizzle, - &index2, - &ZeroVec, - &indir_index); - - index2D.i[0] += indir_index.i[0]; - index2D.i[1] += indir_index.i[1]; - index2D.i[2] += indir_index.i[2]; - index2D.i[3] += indir_index.i[3]; - - /* for disabled execution channels, zero-out the index to - * avoid using a potential garbage value. - */ - for (i = 0; i < TGSI_QUAD_SIZE; i++) { - if ((execmask & (1 << i)) == 0) { - index2D.i[i] = 0; - } - } - } - - /* If by any chance there was a need for a 3D array of register - * files, we would have to check whether Dimension is followed - * by a dimension register and continue the saga. - */ - } else { - index2D.i[0] = - index2D.i[1] = - index2D.i[2] = - index2D.i[3] = 0; - } - switch (reg->Register.File) { case TGSI_FILE_NULL: dst = &null; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
