[Mesa-dev] [PATCH v2 01/12] ac: do not force enable IDXEN for 16-bit SSBO loads
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Wed Mar 13 10:51:24 UTC 2019
NAK. The entire thing about an index being used and possibly still
constant 0 (and hence the index being constant 0 is not a sign to use
the raw intrinsics) is why we now have both structurized and raw
intrinsics. Don't just introduce that mistake again ....
On Wed, Mar 13, 2019 at 11:47 AM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> The struct version enables IDXEN, while the raw one disables it.
> When vindex is unused, the raw version is enough.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/common/ac_llvm_build.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
> index bc64f0bb7e3..8960b5ad4ff 100644
> --- a/src/amd/common/ac_llvm_build.c
> +++ b/src/amd/common/ac_llvm_build.c
> @@ -1383,11 +1383,13 @@ ac_build_tbuffer_load_short(struct ac_llvm_context *ctx,
> LLVMValueRef res;
>
> if (HAVE_LLVM >= 0x0800) {
> + bool structurized = vindex && vindex != ctx->i32_0;
> +
> voffset = LLVMBuildAdd(ctx->builder, voffset, immoffset, "");
>
> res = ac_build_llvm8_tbuffer_load(ctx, rsrc, vindex, voffset,
> soffset, 1, dfmt, nfmt, glc,
> - false, true, true);
> + false, true, structurized);
> } else {
> const char *name = "llvm.amdgcn.tbuffer.load.i32";
> LLVMTypeRef type = ctx->i32;
> --
> 2.21.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list