nir: add two new texture ops for multisample fragment color/mask fetches
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 7 Jan 2020 07:39:39 +0000 (08:39 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jan 2020 10:48:02 +0000 (10:48 +0000)
commit603e6ba972dae06fe0a198fc00b6aa4a0a33d479
treebc3332f8fc331fc787bc1c2d50c16451cc4ed21c
parentdea29b3818ecd813f5b96d44d54d0d3966af1665
nir: add two new texture ops for multisample fragment color/mask fetches

This introduces:
   - nir_texop_fragment_mask_fetch (fetch a fragment mask from a
     compressed multisampled color surface)
   - nir_texop_fragment_fetch (fetch a color fragment for a
     particular sample at corresponding fragment mask index).

These two texture operations are necessary for implementing
SPV_AMD_shader_fragment_mask.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3304>
src/compiler/nir/nir.h
src/compiler/nir/nir_print.c