Re: [Mesa-dev] [PATCH 2/3] nir: add conditional discard optimisation (v3)

2016-11-08 Thread Eric Anholt
Dave Airlie writes: > From: Dave Airlie > > This is ported from GLSL and converts > > if (cond) > discard; > > into > discard_if(cond); > > This removes a block, but also is needed by radv > to workaround a bug in the LLVM backend. > > v2: handle if (a) discard_if(b) (nha) > cleanup and dr

[Mesa-dev] [PATCH 2/3] nir: add conditional discard optimisation (v3)

2016-11-07 Thread Dave Airlie
From: Dave Airlie This is ported from GLSL and converts if (cond) discard; into discard_if(cond); This removes a block, but also is needed by radv to workaround a bug in the LLVM backend. v2: handle if (a) discard_if(b) (nha) cleanup and drop pointless loop (Matt) make sure there are