Roll shaderc
diff --git a/examples/Animometer.cpp b/examples/Animometer.cpp
index 1ee7207..87fc342 100644
--- a/examples/Animometer.cpp
+++ b/examples/Animometer.cpp
@@ -102,12 +102,11 @@
nxt::ShaderModule fsModule = utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
layout(location = 0) in vec4 v_color;
void main() {
fragColor = v_color;
- })"
- );
+ })");
renderpass = CreateDefaultRenderPass(device);
depthStencilView = CreateDefaultDepthStencilView(device);
diff --git a/examples/CHelloTriangle.cpp b/examples/CHelloTriangle.cpp
index 4052820..613da0b 100644
--- a/examples/CHelloTriangle.cpp
+++ b/examples/CHelloTriangle.cpp
@@ -52,7 +52,7 @@
const char* fs =
"#version 450\n"
- "out vec4 fragColor;"
+ "layout(location = 0) out vec4 fragColor;"
"void main() {\n"
" fragColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
"}\n";
diff --git a/examples/ComputeBoids.cpp b/examples/ComputeBoids.cpp
index 1b874fa..f9ce84f 100644
--- a/examples/ComputeBoids.cpp
+++ b/examples/ComputeBoids.cpp
@@ -109,7 +109,7 @@
nxt::ShaderModule fsModule = utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(1.0);
}
diff --git a/examples/HelloCompute.cpp b/examples/HelloCompute.cpp
index 9dcafc0..cb57e9f 100644
--- a/examples/HelloCompute.cpp
+++ b/examples/HelloCompute.cpp
@@ -93,17 +93,17 @@
})"
);
- nxt::ShaderModule fsModule = utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
+ nxt::ShaderModule fsModule =
+ utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450
layout(set = 0, binding = 0) uniform myBlock {
int a;
float b;
} myUbo;
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(1.0, myUbo.a / 255.0, myUbo.b, 1.0);
- })"
- );
+ })");
nxt::BindGroupLayout bgl = device.CreateBindGroupLayoutBuilder()
.SetBindingsType(nxt::ShaderStageBit::Fragment, nxt::BindingType::UniformBuffer, 0, 1)
diff --git a/examples/HelloDepthStencil.cpp b/examples/HelloDepthStencil.cpp
index 6d3fbb8..6f17ad9 100644
--- a/examples/HelloDepthStencil.cpp
+++ b/examples/HelloDepthStencil.cpp
@@ -142,20 +142,19 @@
nxt::ShaderModule fsModule = utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450
layout(location = 2) in vec3 f_col;
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(f_col, 1.0);
- })"
- );
+ })");
- nxt::ShaderModule fsReflectionModule = utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
+ nxt::ShaderModule fsReflectionModule =
+ utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450
layout(location = 2) in vec3 f_col;
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(mix(f_col, vec3(0.5, 0.5, 0.5), 0.5), 1.0);
- })"
- );
+ })");
auto inputState = device.CreateInputStateBuilder()
.SetAttribute(0, 0, nxt::VertexFormat::FloatR32G32B32, 0)
diff --git a/examples/HelloIndices.cpp b/examples/HelloIndices.cpp
index 1e56a05..95104b7 100644
--- a/examples/HelloIndices.cpp
+++ b/examples/HelloIndices.cpp
@@ -64,11 +64,10 @@
nxt::ShaderModule fsModule = utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(1.0, 0.0, 0.0, 1.0);
- })"
- );
+ })");
auto inputState = device.CreateInputStateBuilder()
.SetAttribute(0, 0, nxt::VertexFormat::FloatR32G32B32A32, 0)
diff --git a/examples/HelloInstancing.cpp b/examples/HelloInstancing.cpp
index 3c09e90..2b5eeb7 100644
--- a/examples/HelloInstancing.cpp
+++ b/examples/HelloInstancing.cpp
@@ -68,11 +68,10 @@
nxt::ShaderModule fsModule = utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(1.0, 0.0, 0.0, 1.0);
- })"
- );
+ })");
auto inputState = device.CreateInputStateBuilder()
.SetAttribute(0, 0, nxt::VertexFormat::FloatR32G32B32A32, 0)
diff --git a/examples/HelloTriangle.cpp b/examples/HelloTriangle.cpp
index 18821d3..f8883d3 100644
--- a/examples/HelloTriangle.cpp
+++ b/examples/HelloTriangle.cpp
@@ -102,11 +102,10 @@
layout(set = 0, binding = 0) uniform sampler mySampler;
layout(set = 0, binding = 1) uniform texture2D myTexture;
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = texture(sampler2D(myTexture, mySampler), gl_FragCoord.xy / vec2(640.0, 480.0));
- })"
- );
+ })");
auto inputState = device.CreateInputStateBuilder()
.SetAttribute(0, 0, nxt::VertexFormat::FloatR32G32B32A32, 0)
diff --git a/examples/HelloUBO.cpp b/examples/HelloUBO.cpp
index cda8767..44b10e2 100644
--- a/examples/HelloUBO.cpp
+++ b/examples/HelloUBO.cpp
@@ -50,11 +50,10 @@
int a;
float b;
} myUbo;
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(1.0, myUbo.a / 255.0, myUbo.b, 1.0);
- })"
- );
+ })");
nxt::BindGroupLayout bgl = device.CreateBindGroupLayoutBuilder()
.SetBindingsType(nxt::ShaderStageBit::Fragment, nxt::BindingType::UniformBuffer, 0, 1)
diff --git a/src/tests/end2end/PrimitiveTopologyTests.cpp b/src/tests/end2end/PrimitiveTopologyTests.cpp
index 659b192..c688415 100644
--- a/src/tests/end2end/PrimitiveTopologyTests.cpp
+++ b/src/tests/end2end/PrimitiveTopologyTests.cpp
@@ -180,11 +180,10 @@
fsModule = utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(0.0, 1.0, 0.0, 1.0);
- })"
- );
+ })");
inputState = device.CreateInputStateBuilder()
.SetAttribute(0, 0, nxt::VertexFormat::FloatR32G32B32A32, 0)
diff --git a/src/tests/end2end/RenderPassLoadOpTests.cpp b/src/tests/end2end/RenderPassLoadOpTests.cpp
index 6e5cae0..68349c7 100644
--- a/src/tests/end2end/RenderPassLoadOpTests.cpp
+++ b/src/tests/end2end/RenderPassLoadOpTests.cpp
@@ -88,7 +88,7 @@
)";
const char* fsSource = R"(
#version 450
- out vec4 color;
+ layout(location = 0) out vec4 color;
void main() {
color = vec4(0.f, 0.f, 1.f, 1.f);
}
diff --git a/src/tests/unittests/validation/InputStateValidationTests.cpp b/src/tests/unittests/validation/InputStateValidationTests.cpp
index 8c3bc6f..7fbd77e 100644
--- a/src/tests/unittests/validation/InputStateValidationTests.cpp
+++ b/src/tests/unittests/validation/InputStateValidationTests.cpp
@@ -32,7 +32,7 @@
nxt::ShaderModuleBuilder fsModuleBuilder = AssertWillBeSuccess(device.CreateShaderModuleBuilder());
utils::FillShaderModuleBuilder(fsModuleBuilder, nxt::ShaderStage::Fragment, R"(
#version 450
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(1.0, 0.0, 0.0, 1.0);
}
diff --git a/src/tests/unittests/validation/RenderPipelineValidationTests.cpp b/src/tests/unittests/validation/RenderPipelineValidationTests.cpp
index 39cfdee..f5414d2 100644
--- a/src/tests/unittests/validation/RenderPipelineValidationTests.cpp
+++ b/src/tests/unittests/validation/RenderPipelineValidationTests.cpp
@@ -38,11 +38,10 @@
fsModule = utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(0.0, 1.0, 0.0, 1.0);
- })"
- );
+ })");
}
nxt::RenderPipelineBuilder& AddDefaultStates(nxt::RenderPipelineBuilder&& builder) {
diff --git a/src/tests/unittests/validation/VertexBufferValidationTests.cpp b/src/tests/unittests/validation/VertexBufferValidationTests.cpp
index de548a7..98bc3e6 100644
--- a/src/tests/unittests/validation/VertexBufferValidationTests.cpp
+++ b/src/tests/unittests/validation/VertexBufferValidationTests.cpp
@@ -25,11 +25,10 @@
fsModule = utils::CreateShaderModule(device, nxt::ShaderStage::Fragment, R"(
#version 450
- out vec4 fragColor;
+ layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(0.0, 1.0, 0.0, 1.0);
- })"
- );
+ })");
}
void MakeRenderPassAndFrameBuffer(uint32_t subpassCount) {
diff --git a/third_party/glslang b/third_party/glslang
index f00c245..b5b0846 160000
--- a/third_party/glslang
+++ b/third_party/glslang
@@ -1 +1 @@
-Subproject commit f00c245a5f697cde2257e1280969429314a84958
+Subproject commit b5b08462442239e6537315ea1405b6afcd53043e
diff --git a/third_party/shaderc b/third_party/shaderc
index 01921d4..c607253 160000
--- a/third_party/shaderc
+++ b/third_party/shaderc
@@ -1 +1 @@
-Subproject commit 01921d49da5d4d4311f3e2bd1ae2a27834974ab6
+Subproject commit c60725343fd6c0822bb7f580661d2ec6460391c0
diff --git a/third_party/spirv-headers b/third_party/spirv-headers
index 661ad91..0610978 160000
--- a/third_party/spirv-headers
+++ b/third_party/spirv-headers
@@ -1 +1 @@
-Subproject commit 661ad91124e6af2272afd00f804d8aa276e17107
+Subproject commit 061097878467b8e040fbf153a837d844ef9f9f96
diff --git a/third_party/spirv-tools b/third_party/spirv-tools
index 06d4fd5..90862fe 160000
--- a/third_party/spirv-tools
+++ b/third_party/spirv-tools
@@ -1 +1 @@
-Subproject commit 06d4fd52c244ee5abf6819f721b9f68e5a3fcdb0
+Subproject commit 90862fe4b1c6763b32ce683d2d32c2f281f577cf