[Mesa-dev] [PATCH 0/7] RFC: adapt nir_gather_xfb_info to be used by ARB_gl_spirv

Alejandro Piñeiro apinheiro at igalia.com
Thu Nov 8 13:22:11 UTC 2018


ARB_gl_spirv has its own NIR-based xfb gathering info. Since
nir_gather_xfb_info landed on master, I have been trying to get to use
it, in order to reuse code.

Although I consider this series a WIP, I prefer to share what I have
right now, just in case the idea of adapt nir_gather_xfb_info is
discarded. Having said so, this series also includes a fix ("nir: fix
output offset compute for dvec3/4"). That patch can be used even if we
discard the rest of the series.

The main difference between the custom ARB_gl_spirv code and the NIR
general pass are varyings, as the new pass is focused on outputs. As
far as I understand, varyings is just needed for OpenGL.

So although I was able to modify the new pass to be reused, and all
tests we have are passing, I'm not really happy with the current
patches. The original idea is that it would be ok to reuse, as far as
we didn't need to add too much info, or needed to change too much that
pass. So I focused on modifying the code as less as possible. But that
lead to some debatable decisions. It is more detailed on the patches
with RFC. 

BR


Alejandro Piñeiro (7):
  spirv/nir: update Xfb decoration comment
  nir: don't assert when xfb_buffer/stride is present but not xfb_offset
  nir: fix output offset compute for dvec3/4
  nir: add component_offset at nir_xfb_info
  RFC: nir: adding varyings on nir_xfb_info and gather_info
  RFC: nir/xfb_info: arrays of basic types adds just one varying
  nir/linker: use nir_gather_xfb_info

 src/compiler/glsl/gl_nir_link_xfb.c    | 252 ++++++++++-----------------------
 src/compiler/nir/nir_gather_xfb_info.c | 101 +++++++++++--
 src/compiler/nir/nir_xfb_info.h        |  25 ++--
 src/compiler/spirv/spirv_to_nir.c      |   2 +-
 4 files changed, 180 insertions(+), 200 deletions(-)

-- 
2.14.1



More information about the mesa-dev mailing list