KhronosGroup / SPIRV-Cross

SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
Apache License 2.0
2.02k stars 558 forks source link

support GLSL and HLSL output of new SPIR-V FullyCoveredEXT built in.. #388

Open oscarbg opened 6 years ago

oscarbg commented 6 years ago

Now that glslang supports generating SPIR-V FullyCoveredEXT from GLSL shaders that make use of gl_FragFullyCoveredNV builtin from GL_NV_conservative_raster_underestimation would be nice to have SPIR-V cross support SPIR-V FullyCoveredEXT builtin (from SPV_EXT_fragment_fully_covered ext.) on GLSL and HLSL output backends to generate equivalent gl_FragFullyCoveredNV (needs GL_NV_conservative_raster_underestimation ext.) and SV_InnerCoverage respectively.. note I asked also to glslang devs to be able to generate FullyCoveredEXT from HLSL shaders having SV_InnerCoverage to close the loop: https://github.com/KhronosGroup/glslang/issues/1220 right now GLSL like this should only be testable on NV card Titan V.. HLSL output should be also testable on AMD Vega and latests Intel Skylake and later IGPUs.

HansKristian-Work commented 6 years ago

So ... basically you're asking for support for GL_NV_conservative_raster extensions? Probably best to rename the issue to that to make it clearer what the scope of the work is.

oscarbg commented 6 years ago

Well not exactly.. for GLSL output yes.. for HLSL output support we only need conser. raster tier 3 and there is multivendor support for that AMD, Intel and AMD have GPUs supporting that.. also note this SPIR builtin is from Vulkan EXT_conservative_raster ext that should be supported from also the same three vendors at least only that right now NV is the first to support it in Vulkan.. so the problem right now is OpenGL support is exposed only via NV ext.. but hope eventually we will get some OGL ARB or EXT ext supporting that..