[Mesa-dev] i965 implementation of the ARB_shader_image_load_store built-ins. (v2)

Matt Turner mattst88 at gmail.com
Tue May 5 15:05:02 PDT 2015

On Tue, May 5, 2015 at 2:17 PM, Francisco Jerez <currojerez at riseup.net> wrote:
> Kenneth Graunke <kenneth at whitecape.org> writes:
>> That then begs the question - could we do the format conversion and
>> address calculations in a i965-specific NIR pass?  It could simplify
>> the backend changes.  NIR also has better CSE, which could help for
>> repeated image access.
> I doubt that rewriting things in NIR would be of any help at this point.
> We could have support for ARB_shader_image_load_store already in the
> 10.6 release if we refrain from reimplementing the world in the last
> minute.  And I doubt that an implementation in terms of NIR would have
> simplified anything, it would have required a bunch of intrinsics with
> driver-specific semantics,

Can you give an example? We weren't sure exactly how to do the bounds
checking on IVB in NIR (add an extra uniform, or maybe do the
image-equivalent of textureSize?) but the other work-arounds didn't
seem like they would be difficult to implement in NIR.

> and I must admit that I find generating NIR
> even more annoying than generating i965 IR directly (for an example of
> what a mean see how [1] spends over twenty lines to calculate a simple
> "a + b * c" expression).

That's nothing specific to NIR itself, and it's really already been
solved with the new nir_builder. Take a look at Ken's

More information about the mesa-dev mailing list