[Mesa-dev] [PATCH] tgsi: don't set tgsi_info::uses_bindless_images for constbufs and hw atomics

Marek Olšák maraeo at gmail.com
Thu Feb 21 16:09:03 UTC 2019


On Thu, Feb 21, 2019, 12:08 AM Ilia Mirkin <imirkin at alum.mit.edu> wrote:

> I don't think that's right... this is used in e.g.
>
>    case TGSI_OPCODE_RESQ:
>       if (tgsi_is_bindless_image_file(fullinst->Src[0].Register.File))
>          info->uses_bindless_images = true;
>       break;
>
> And if you call RESQ with a src0 that is not IMAGE or BUFFER, then
> that's a bindless reference.
>

No it's not. TEMP, CONST, IN, and OUT are bindless references. CONSTBUF
isn't.

Marek


> I think the problem is that this is interacting poorly with the load
> constbuf stuff -- probably needs a bit of subtlety there.
>
>   -ilia
>
> On Thu, Feb 21, 2019 at 12:03 AM Marek Olšák <maraeo at gmail.com> wrote:
> >
> > From: Marek Olšák <marek.olsak at amd.com>
> >
> > This might have decreased performance for radeonsi/tgsi, because most
> > most shaders claimed they used bindless.
> >
> > Cc: 18.3 19.0 <mesa-stable at lists.freedesktop.org>
> > ---
> >  src/gallium/auxiliary/tgsi/tgsi_scan.h | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h
> b/src/gallium/auxiliary/tgsi/tgsi_scan.h
> > index 580c73a2814..51d85af4fcb 100644
> > --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
> > +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
> > @@ -214,18 +214,20 @@ tgsi_scan_arrays(const struct tgsi_token *tokens,
> >  void
> >  tgsi_scan_tess_ctrl(const struct tgsi_token *tokens,
> >                      const struct tgsi_shader_info *info,
> >                      struct tgsi_tessctrl_info *out);
> >
> >  static inline bool
> >  tgsi_is_bindless_image_file(unsigned file)
> >  {
> >     return file != TGSI_FILE_IMAGE &&
> >            file != TGSI_FILE_MEMORY &&
> > -          file != TGSI_FILE_BUFFER;
> > +          file != TGSI_FILE_BUFFER &&
> > +          file != TGSI_FILE_CONSTBUF &&
> > +          file != TGSI_FILE_HW_ATOMIC;
> >  }
> >
> >  #ifdef __cplusplus
> >  } // extern "C"
> >  #endif
> >
> >  #endif /* TGSI_SCAN_H */
> > --
> > 2.17.1
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190221/34218c14/attachment.html>


More information about the mesa-dev mailing list