diff --git a/examples/Animometer.cpp b/examples/Animometer.cpp index 2af862a4e5..0ea4457427 100644 --- a/examples/Animometer.cpp +++ b/examples/Animometer.cpp @@ -57,7 +57,7 @@ void init() { float scalarOffset; } c; - out vec4 v_color; + layout(location = 0) out vec4 v_color; const vec4 positions[3] = vec4[3]( vec4( 0.0f, 0.1f, 0.0f, 1.0f), @@ -96,7 +96,7 @@ void init() { nxt::ShaderModule fsModule = CreateShaderModule(device, nxt::ShaderStage::Fragment, R"( #version 450 out vec4 fragColor; - in vec4 v_color; + layout(location = 0) in vec4 v_color; void main() { fragColor = v_color; })" diff --git a/src/backend/common/ShaderModule.cpp b/src/backend/common/ShaderModule.cpp index 0769712b81..50b46dbcba 100644 --- a/src/backend/common/ShaderModule.cpp +++ b/src/backend/common/ShaderModule.cpp @@ -29,6 +29,7 @@ namespace backend { void ShaderModuleBase::ExtractSpirvInfo(const spirv_cross::Compiler& compiler) { // TODO(cwallez@chromium.org): make errors here builder-level + // currently errors here do not prevent the shadermodule from being used const auto& resources = compiler.get_shader_resources(); switch (compiler.get_execution_model()) {