[Mesa-dev] [PATCH 2/2] radeonsi: Use buffer_load intrinsics instead of llvm.SI.vs.load.input

Tom Stellard tom at stellard.net
Sat Nov 19 00:13:37 UTC 2016


On Sat, Nov 19, 2016 at 01:09:00AM +0100, Marek Olšák wrote:
> On Wed, Nov 16, 2016 at 4:38 PM, Tom Stellard <tom at stellard.net> wrote:
> > On Wed, Nov 16, 2016 at 11:13:45AM +0100, Nicolai Hähnle wrote:
> >> Have you looked at the shader-db impact?
> >>
> >
> > shader-db is mostly unchanged.  There are a few decreases in SGPR usage and
> > code size, and a 4 byte increase in code size for one shader.
> >
> >> I do think we should eventually do this, but llvm.SI.vs.load.input is
> >> ReadNone while llvm.amdgcn.buffer.load.* is only ReadOnly, so as long as we
> >> can't teach LLVM properly about no-aliasing and speculability, there may be
> >> performance regressions.
> >>
> >
> > Ideally llvm.amdgcn.buffer.load.* would be ReadOnly and ArgMemOnly, but I think
> > as long as it has non-pointer arguments this combination behaves the same as
> > ReadNone, which would be incorrect.
> 
> Why would it be incorrect?
> 

Because llvm.amdgcn.buffer.load.* can be used in a lot of different
ways, so it is possible that the memory it is reading from has been
modified by the shader.

-Tom

> Marek


More information about the mesa-dev mailing list