[Mesa-dev] [PATCH 0/8] nir: Require numbers of components to always match

Kenneth Graunke kenneth at whitecape.org
Thu Mar 9 05:59:29 UTC 2017


On Friday, March 3, 2017 5:12:24 PM PST Jason Ekstrand wrote:
> When NIR was first created, we were a bit lazy about numbers of components.
> The rule was that a source couldn't consume more components than the thing
> it was reading from.  However, this leads to a lot of confusion because you
> now have a thing sourcing from a vec4 but only reading two of the
> components.
> 
> The solution to this is to disallow that case and require that the number
> of components always match.  The one exception is ALU instructions because
> they're designed to naturally swizzle things around like mad.  We already
> require this restriction for phi instructions.  This series adds it for
> intrinsics, texture instructions, and deref indirects.
> 
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Connor Abbott <cwabbott0 at gmaial.com>
> 
> Jason Ekstrand (8):
>   nir/intrinsics: Make load_barycentric_input take a 2-component coor
>   nir/copy_prop: Respect the source's number of components
>   nir/spirv: Restrict the number of channels in texture coordinates
>   nir/lower_tex: Use tex_instr_dest_size for txs destinations
>   anv/apply_dynamic_offsets: Only use one channel for computed offsets
>   i965/fs: Use num_components from the SSA def in image intrinsics
>   nir: Make image_size a variable-width intrinsic
>   nir/validate: Validate that bit sizes and components always match

Patches 1 and 3-8 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

Patch 2's probably fine too, but I didn't pay much attention to it,
as Eric already reviewed it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170308/445774c3/attachment.sig>


More information about the mesa-dev mailing list