Re: [Mesa-dev] [PATCH 2/3] nir: Add a discard optimization pass

2018-07-04 Thread Jason Ekstrand
On Wed, Jul 4, 2018 at 2:22 AM, Grazvydas Ignotas wrote: > On Wed, Jul 4, 2018 at 9:13 AM, Jason Ekstrand > wrote: > > Many fragment shaders do a discard using relatively little information > > but still put the discard fairly far down in the shader for no good > > reason. If the discard is mov

Re: [Mesa-dev] [PATCH 2/3] nir: Add a discard optimization pass

2018-07-04 Thread Grazvydas Ignotas
On Wed, Jul 4, 2018 at 9:13 AM, Jason Ekstrand wrote: > Many fragment shaders do a discard using relatively little information > but still put the discard fairly far down in the shader for no good > reason. If the discard is moved higher up, we can possibly avoid doing > some or almost all of the

[Mesa-dev] [PATCH 2/3] nir: Add a discard optimization pass

2018-07-03 Thread Jason Ekstrand
Many fragment shaders do a discard using relatively little information but still put the discard fairly far down in the shader for no good reason. If the discard is moved higher up, we can possibly avoid doing some or almost all of the work in the shader. When this lets us skip texturing operatio