[Mesa-dev] [RFC 0/2] VK_EXT_shader_stencil_export

Gustavo Lima Chaves gustavo.lima.chaves at intel.com
Mon Feb 12 02:26:39 UTC 2018

I've been seeking to add this extension support on my free time and
have now come to a point where some input could really help.

At vtn_get_builtin_location(), is that existing one used for the
extension what we want? Should we also check the shader stage we're in
there too, once it's meant for fragment shaders?

The new ExecutionModeStencilRefReplacingEXT execution mode seems to
have no support in the code base yet. I'm still trying to figure out
what it should do in the meantime (the original
ARB_shader_stencil_export had no mentions of modes, I'm afraid).

When it comes to testing, I started simple with
https://github.com/glima/VK-GL-CTS/tree/stencil_export . The idea
there is just to assert that a custom value is really written to a
FragStencilRefEXT-decorated output variable. I'm still not positive
that I should go the createTestsForAllStages() path there--maybe
something like addTessCtrlTest() for fragment tests would be more
reasonable. I also know there are issues in the tests, but I hope
anyone more familiar with vtn_get_builtin_location() will be able to
help sort it out.

BTW, when said tests come to a better/final shape, do people really
take pull requests for VK-GL-CTS from github? All commits in there
seem to have Google's gerrit annotations, so I'm confused about that.

Thanks a lot.

Gustavo Lima Chaves (2):
  spirv: add/hookup SpvCapabilityStencilExportEXT
  anv: enable VK_EXT_shader_stencil_export

 src/compiler/shader_info.h         | 1 +
 src/compiler/spirv/spirv_to_nir.c  | 4 ++++
 src/compiler/spirv/vtn_variables.c | 4 ++++
 src/intel/vulkan/anv_extensions.py | 1 +
 src/intel/vulkan/anv_pipeline.c    | 1 +
 5 files changed, 11 insertions(+)


More information about the mesa-dev mailing list