Fix compilation of depth MSAA <-> Array shaders on Vulkan

* glslang doesn't like the GL_ARB_sample_shading extension
This commit is contained in:
baldurk
2018-08-02 18:44:31 +01:00
parent 1ab163d1d5
commit 04dc71ce32
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
* THE SOFTWARE.
******************************************************************************/
//#extension_nongles GL_ARB_sample_shading : require
//#extension_glcore GL_ARB_sample_shading : require
layout(binding = 0) uniform sampler2DArray srcDepthArray;
layout(binding = 1) uniform usampler2DArray srcStencilArray;
-2
View File
@@ -21,8 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
******************************************************************************/
//#extension_nongles GL_ARB_sample_shading : require
layout(binding = 0) uniform sampler2DMSArray srcDepthMS;
layout(binding = 1) uniform usampler2DMSArray srcStencilMS;
+7
View File
@@ -98,6 +98,13 @@ void GenerateGLSLShader(std::vector<std::string> &sources, ShaderType type,
ext.erase(ext.find("_gles"), 5);
}
else if(ext.find("#extension_glcore") == 0)
{
if(type != eShaderGLSL)
continue;
ext.erase(ext.find("_glcore"), 7);
}
else if(ext.find("#extension_nongles") == 0)
{
if(type == eShaderGLSLES)