[Mesa-dev] [PATCH] R600/SI: Make sure M0 is always initialized when DS instructions are used
Michel Dänzer
michel at daenzer.net
Sun Feb 9 23:53:09 PST 2014
On Fre, 2014-02-07 at 13:54 -0800, Tom Stellard wrote:
> On Fri, Feb 07, 2014 at 11:46:55AM +0900, Michel Dänzer wrote:
> > On Don, 2014-02-06 at 09:40 -0800, Tom Stellard wrote:
> > > From: Tom Stellard <thomas.stellard at amd.com>
> > >
> > > DS instructions that access local memory can only uses addresses that
> > > are less than or equal to the value of M0. When M0 is uninitialized,
> > > then we experience undefined behavior.
> >
> > [...]
> >
> > > @@ -488,10 +490,6 @@ bool SILowerControlFlowPass::runOnMachineFunction(MachineFunction &MF) {
> > >
> > > case AMDGPU::DS_READ_B32:
> > > NeedWQM = true;
> > > - // Fall through
> > > - case AMDGPU::DS_WRITE_B32:
> > > - case AMDGPU::DS_ADD_U32_RTN:
> > > - NeedM0 = true;
> > > break;
> > >
> > > case AMDGPU::V_INTERP_P1_F32:
> >
> > It might make sense to set NeedWQM for all DS instructions as well. But
> > if you do that, please also fix the test at the end of this function to
> > only emit S_WQM_B64 for pixel shaders.
>
> Sure, I can do that.
Thanks. BTW, feel free to do that in a separate change, of course. This
change is
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
as it is.
> Do we use LDS instructions at all for vertex or geometry shaders?
Not that I know of.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the mesa-dev
mailing list