mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
metal: use EXT_vulkan_glsl_relaxed
This commit is contained in:
@@ -250,7 +250,7 @@ Shader::Shader(id<MTLDevice> device, love::graphics::ShaderStage *vertex, love::
|
||||
continue;
|
||||
}
|
||||
|
||||
if (resource.name == "love_UniformsPerDrawBuffer")
|
||||
if (resource.name == "gl_DefaultUniformBlock")
|
||||
{
|
||||
msl.set_decoration(resource.id, spv::DecorationBinding, 0);
|
||||
const SPIRType &type = msl.get_type(resource.base_type_id);
|
||||
|
||||
@@ -154,11 +154,12 @@ ShaderStage::ShaderStage(love::graphics::Graphics *gfx, StageType stage, const s
|
||||
|
||||
// We can't reuse the validation glslang shader object in the base class,
|
||||
// because we need these options set (and the language set to >= 300).
|
||||
glslangShader->setEnvInput(EShSourceGlsl, glslangStage, EShClientNone, 0);
|
||||
glslangShader->setEnvClient(EShClientOpenGL, EShTargetOpenGL_450);
|
||||
glslangShader->setEnvTarget(EShTargetSpv, EShTargetSpv_1_0);
|
||||
glslangShader->setEnvInput(EShSourceGlsl, glslangStage, EShClientVulkan, 450);
|
||||
glslangShader->setEnvClient(EShClientVulkan, EShTargetVulkan_1_2);
|
||||
glslangShader->setEnvTarget(EShTargetSpv, EShTargetSpv_1_5);
|
||||
glslangShader->setAutoMapLocations(true);
|
||||
glslangShader->setAutoMapBindings(true);
|
||||
glslangShader->setEnvInputVulkanRulesRelaxed();
|
||||
|
||||
const char *csrc = source.c_str();
|
||||
int srclen = (int) source.length();
|
||||
|
||||
Reference in New Issue
Block a user