Fix validation errors in Animometer's shader

This commit is contained in:
Corentin Wallez 2017-06-05 16:23:18 -04:00 committed by Corentin Wallez
parent 4efaf32d1b
commit ca9af201b5
2 changed files with 3 additions and 2 deletions

View File

@ -57,7 +57,7 @@ void init() {
float scalarOffset; float scalarOffset;
} c; } c;
out vec4 v_color; layout(location = 0) out vec4 v_color;
const vec4 positions[3] = vec4[3]( const vec4 positions[3] = vec4[3](
vec4( 0.0f, 0.1f, 0.0f, 1.0f), vec4( 0.0f, 0.1f, 0.0f, 1.0f),
@ -96,7 +96,7 @@ void init() {
nxt::ShaderModule fsModule = CreateShaderModule(device, nxt::ShaderStage::Fragment, R"( nxt::ShaderModule fsModule = CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450 #version 450
out vec4 fragColor; out vec4 fragColor;
in vec4 v_color; layout(location = 0) in vec4 v_color;
void main() { void main() {
fragColor = v_color; fragColor = v_color;
})" })"

View File

@ -29,6 +29,7 @@ namespace backend {
void ShaderModuleBase::ExtractSpirvInfo(const spirv_cross::Compiler& compiler) { void ShaderModuleBase::ExtractSpirvInfo(const spirv_cross::Compiler& compiler) {
// TODO(cwallez@chromium.org): make errors here builder-level // 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(); const auto& resources = compiler.get_shader_resources();
switch (compiler.get_execution_model()) { switch (compiler.get_execution_model()) {