[Mesa-dev] [PATCH 1/3] nir: allow nir search type check to see through bcsel

Ian Romanick idr at freedesktop.org
Thu Jul 19 19:05:46 UTC 2018


On 07/18/2018 11:17 PM, Ian Romanick wrote:
> Oh man... I was also recently looking at that same compute shader, and I
> wrote nearly identical patches the early part of last week.  The bcsel
> patches caused a bit of pain for i965.  I came up with a different way
> to handle that particular problem... either way, I eventually abandoned
> the whole approach.  Adding a bunch of one-off cases for weird
> combinations of logic expressions (and that shader has some doozies!)
> just isn't scalable.
> 
> I've pushed a branch logic-expression-frobbing to my cgit with all that
> work.
> 
> In the mean time, I have been working code that generically optimizes
> logical expressions.  I'm hoping to get that sent out next week.  So
> far, it looks like it should be able to achieve the same affect on this
> particular shader.  This new pass should make most, if not all, of the
> logic expression algebraic optimizations in nir_opt_algebraic.
> 
> As soon as I can run shader-db, I'll post a branch.

It can't run shader-db, but opt-minimize-Boolean has what I've done so
far.  You may find the TEST_F(quine_mccluskey_test, real_world_shader)
test interesting. :)


More information about the mesa-dev mailing list