Roll Tint from d3f75ca0e8
to 90ee6c4360
(56 revisions)
** With manual buildfixes. ** https://dawn.googlesource.com/tint.git/+log/d3f75ca0e8be..90ee6c436017 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/tint-dawn Please CC kainino@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md Bug: None, tint:263 No-Try: True Change-Id: I374db968c616c8a12721cdb9c73a46a3495748c8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29521 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
16e01affcb
commit
6620efb9a8
2
DEPS
2
DEPS
|
@ -90,7 +90,7 @@ deps = {
|
|||
|
||||
# WGSL support
|
||||
'third_party/tint': {
|
||||
'url': '{dawn_git}/tint@d3f75ca0e8be76c9e3c272d71310fa725cdc756a',
|
||||
'url': '{dawn_git}/tint@90ee6c436017621831ec94acaa4091dd67aac2b4',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
|
||||
|
|
|
@ -47,77 +47,77 @@ namespace dawn_native {
|
|||
}
|
||||
|
||||
#ifdef DAWN_ENABLE_WGSL
|
||||
tint::ast::transform::VertexFormat ToTintVertexFormat(wgpu::VertexFormat format) {
|
||||
tint::transform::VertexFormat ToTintVertexFormat(wgpu::VertexFormat format) {
|
||||
switch (format) {
|
||||
case wgpu::VertexFormat::UChar2:
|
||||
return tint::ast::transform::VertexFormat::kVec2U8;
|
||||
return tint::transform::VertexFormat::kVec2U8;
|
||||
case wgpu::VertexFormat::UChar4:
|
||||
return tint::ast::transform::VertexFormat::kVec4U8;
|
||||
return tint::transform::VertexFormat::kVec4U8;
|
||||
case wgpu::VertexFormat::Char2:
|
||||
return tint::ast::transform::VertexFormat::kVec2I8;
|
||||
return tint::transform::VertexFormat::kVec2I8;
|
||||
case wgpu::VertexFormat::Char4:
|
||||
return tint::ast::transform::VertexFormat::kVec4I8;
|
||||
return tint::transform::VertexFormat::kVec4I8;
|
||||
case wgpu::VertexFormat::UChar2Norm:
|
||||
return tint::ast::transform::VertexFormat::kVec2U8Norm;
|
||||
return tint::transform::VertexFormat::kVec2U8Norm;
|
||||
case wgpu::VertexFormat::UChar4Norm:
|
||||
return tint::ast::transform::VertexFormat::kVec4U8Norm;
|
||||
return tint::transform::VertexFormat::kVec4U8Norm;
|
||||
case wgpu::VertexFormat::Char2Norm:
|
||||
return tint::ast::transform::VertexFormat::kVec2I8Norm;
|
||||
return tint::transform::VertexFormat::kVec2I8Norm;
|
||||
case wgpu::VertexFormat::Char4Norm:
|
||||
return tint::ast::transform::VertexFormat::kVec4I8Norm;
|
||||
return tint::transform::VertexFormat::kVec4I8Norm;
|
||||
case wgpu::VertexFormat::UShort2:
|
||||
return tint::ast::transform::VertexFormat::kVec2U16;
|
||||
return tint::transform::VertexFormat::kVec2U16;
|
||||
case wgpu::VertexFormat::UShort4:
|
||||
return tint::ast::transform::VertexFormat::kVec4U16;
|
||||
return tint::transform::VertexFormat::kVec4U16;
|
||||
case wgpu::VertexFormat::Short2:
|
||||
return tint::ast::transform::VertexFormat::kVec2I16;
|
||||
return tint::transform::VertexFormat::kVec2I16;
|
||||
case wgpu::VertexFormat::Short4:
|
||||
return tint::ast::transform::VertexFormat::kVec4I16;
|
||||
return tint::transform::VertexFormat::kVec4I16;
|
||||
case wgpu::VertexFormat::UShort2Norm:
|
||||
return tint::ast::transform::VertexFormat::kVec2U16Norm;
|
||||
return tint::transform::VertexFormat::kVec2U16Norm;
|
||||
case wgpu::VertexFormat::UShort4Norm:
|
||||
return tint::ast::transform::VertexFormat::kVec4U16Norm;
|
||||
return tint::transform::VertexFormat::kVec4U16Norm;
|
||||
case wgpu::VertexFormat::Short2Norm:
|
||||
return tint::ast::transform::VertexFormat::kVec2I16Norm;
|
||||
return tint::transform::VertexFormat::kVec2I16Norm;
|
||||
case wgpu::VertexFormat::Short4Norm:
|
||||
return tint::ast::transform::VertexFormat::kVec4I16Norm;
|
||||
return tint::transform::VertexFormat::kVec4I16Norm;
|
||||
case wgpu::VertexFormat::Half2:
|
||||
return tint::ast::transform::VertexFormat::kVec2F16;
|
||||
return tint::transform::VertexFormat::kVec2F16;
|
||||
case wgpu::VertexFormat::Half4:
|
||||
return tint::ast::transform::VertexFormat::kVec4F16;
|
||||
return tint::transform::VertexFormat::kVec4F16;
|
||||
case wgpu::VertexFormat::Float:
|
||||
return tint::ast::transform::VertexFormat::kF32;
|
||||
return tint::transform::VertexFormat::kF32;
|
||||
case wgpu::VertexFormat::Float2:
|
||||
return tint::ast::transform::VertexFormat::kVec2F32;
|
||||
return tint::transform::VertexFormat::kVec2F32;
|
||||
case wgpu::VertexFormat::Float3:
|
||||
return tint::ast::transform::VertexFormat::kVec3F32;
|
||||
return tint::transform::VertexFormat::kVec3F32;
|
||||
case wgpu::VertexFormat::Float4:
|
||||
return tint::ast::transform::VertexFormat::kVec4F32;
|
||||
return tint::transform::VertexFormat::kVec4F32;
|
||||
case wgpu::VertexFormat::UInt:
|
||||
return tint::ast::transform::VertexFormat::kU32;
|
||||
return tint::transform::VertexFormat::kU32;
|
||||
case wgpu::VertexFormat::UInt2:
|
||||
return tint::ast::transform::VertexFormat::kVec2U32;
|
||||
return tint::transform::VertexFormat::kVec2U32;
|
||||
case wgpu::VertexFormat::UInt3:
|
||||
return tint::ast::transform::VertexFormat::kVec3U32;
|
||||
return tint::transform::VertexFormat::kVec3U32;
|
||||
case wgpu::VertexFormat::UInt4:
|
||||
return tint::ast::transform::VertexFormat::kVec4U32;
|
||||
return tint::transform::VertexFormat::kVec4U32;
|
||||
case wgpu::VertexFormat::Int:
|
||||
return tint::ast::transform::VertexFormat::kI32;
|
||||
return tint::transform::VertexFormat::kI32;
|
||||
case wgpu::VertexFormat::Int2:
|
||||
return tint::ast::transform::VertexFormat::kVec2I32;
|
||||
return tint::transform::VertexFormat::kVec2I32;
|
||||
case wgpu::VertexFormat::Int3:
|
||||
return tint::ast::transform::VertexFormat::kVec3I32;
|
||||
return tint::transform::VertexFormat::kVec3I32;
|
||||
case wgpu::VertexFormat::Int4:
|
||||
return tint::ast::transform::VertexFormat::kVec4I32;
|
||||
return tint::transform::VertexFormat::kVec4I32;
|
||||
}
|
||||
}
|
||||
|
||||
tint::ast::transform::InputStepMode ToTintInputStepMode(wgpu::InputStepMode mode) {
|
||||
tint::transform::InputStepMode ToTintInputStepMode(wgpu::InputStepMode mode) {
|
||||
switch (mode) {
|
||||
case wgpu::InputStepMode::Vertex:
|
||||
return tint::ast::transform::InputStepMode::kVertex;
|
||||
return tint::transform::InputStepMode::kVertex;
|
||||
case wgpu::InputStepMode::Instance:
|
||||
return tint::ast::transform::InputStepMode::kInstance;
|
||||
return tint::transform::InputStepMode::kInstance;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -252,17 +252,17 @@ namespace dawn_native {
|
|||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
||||
}
|
||||
|
||||
tint::ast::transform::VertexPullingTransform transform(&context, &module);
|
||||
auto state = std::make_unique<tint::ast::transform::VertexStateDescriptor>();
|
||||
tint::transform::VertexPullingTransform transform(&context, &module);
|
||||
auto state = std::make_unique<tint::transform::VertexStateDescriptor>();
|
||||
for (uint32_t i = 0; i < vertexState.vertexBufferCount; ++i) {
|
||||
auto& vertexBuffer = vertexState.vertexBuffers[i];
|
||||
tint::ast::transform::VertexBufferLayoutDescriptor layout;
|
||||
tint::transform::VertexBufferLayoutDescriptor layout;
|
||||
layout.array_stride = vertexBuffer.arrayStride;
|
||||
layout.step_mode = ToTintInputStepMode(vertexBuffer.stepMode);
|
||||
|
||||
for (uint32_t j = 0; j < vertexBuffer.attributeCount; ++j) {
|
||||
auto& attribute = vertexBuffer.attributes[j];
|
||||
tint::ast::transform::VertexAttributeDescriptor attr;
|
||||
tint::transform::VertexAttributeDescriptor attr;
|
||||
attr.format = ToTintVertexFormat(attribute.format);
|
||||
attr.offset = attribute.offset;
|
||||
attr.shader_location = attribute.shaderLocation;
|
||||
|
@ -277,7 +277,7 @@ namespace dawn_native {
|
|||
transform.SetPullingBufferBindingSet(pullingBufferBindingSet);
|
||||
|
||||
if (!transform.Run()) {
|
||||
errorStream << "Vertex pulling transform: " << transform.GetError();
|
||||
errorStream << "Vertex pulling transform: " << transform.error();
|
||||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
||||
}
|
||||
|
||||
|
|
|
@ -596,19 +596,19 @@ TEST_F(RenderPipelineValidationTest, EntryPointNameValidation) {
|
|||
DAWN_SKIP_TEST_IF(!HasWGSL());
|
||||
|
||||
wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||
[[builtin position]] var<out> position : vec4<f32>;
|
||||
[[builtin(position)]] var<out> position : vec4<f32>;
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> void {
|
||||
position = vec4<f32>(0.0, 0.0, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
entry_point vertex = vertex_main;
|
||||
|
||||
[[location 0]] var<out> color : vec4<f32>;
|
||||
[[location(0)]] var<out> color : vec4<f32>;
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() -> void {
|
||||
color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
entry_point fragment = fragment_main;
|
||||
)");
|
||||
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
|
@ -650,21 +650,20 @@ TEST_F(RenderPipelineValidationTest, VertexAttribCorrectEntryPoint) {
|
|||
DAWN_SKIP_TEST_IF(!HasWGSL());
|
||||
|
||||
wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||
[[builtin position]] var<out> position : vec4<f32>;
|
||||
[[location 0]] var<in> attrib0 : vec4<f32>;
|
||||
[[location 1]] var<in> attrib1 : vec4<f32>;
|
||||
[[builtin(position)]] var<out> position : vec4<f32>;
|
||||
[[location(0)]] var<in> attrib0 : vec4<f32>;
|
||||
[[location(1)]] var<in> attrib1 : vec4<f32>;
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex0() -> void {
|
||||
position = attrib0;
|
||||
return;
|
||||
}
|
||||
[[stage(vertex)]]
|
||||
fn vertex1() -> void {
|
||||
position = attrib1;
|
||||
return;
|
||||
}
|
||||
|
||||
entry_point vertex = vertex0;
|
||||
entry_point vertex = vertex1;
|
||||
)");
|
||||
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
|
@ -697,24 +696,25 @@ TEST_F(RenderPipelineValidationTest, VertexAttribCorrectEntryPoint) {
|
|||
}
|
||||
|
||||
// Test that fragment output validation is for the correct entryPoint
|
||||
TEST_F(RenderPipelineValidationTest, FragmentOutputCorrectEntryPoint) {
|
||||
//
|
||||
// TODO(crbug.com/tint/263): Re-enable once an issue is fixed with Tint.
|
||||
TEST_F(RenderPipelineValidationTest, DISABLED_FragmentOutputCorrectEntryPoint) {
|
||||
DAWN_SKIP_TEST_IF(!HasWGSL());
|
||||
|
||||
wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||
[[location 0]] var<out> colorFloat : vec4<f32>;
|
||||
[[location 0]] var<out> colorUint : vec4<u32>;
|
||||
[[location(0)]] var<out> colorFloat : vec4<f32>;
|
||||
[[location(0)]] var<out> colorUint : vec4<u32>;
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragmentFloat() -> void {
|
||||
colorFloat = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
return;
|
||||
}
|
||||
[[stage(fragment)]]
|
||||
fn fragmentUint() -> void {
|
||||
colorUint = vec4<u32>(0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
entry_point fragment = fragmentFloat;
|
||||
entry_point fragment = fragmentUint;
|
||||
)");
|
||||
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
|
@ -751,7 +751,7 @@ TEST_F(RenderPipelineValidationTest, DISABLED_BindingsFromCorrectEntryPoint) {
|
|||
};
|
||||
[[binding 0, set 0]] var<uniform> var0 : Uniforms;
|
||||
[[binding 1, set 0]] var<uniform> var1 : Uniforms;
|
||||
[[builtin position]] var<out> position : vec4<f32>;
|
||||
[[builtin(position)]] var<out> position : vec4<f32>;
|
||||
|
||||
fn vertex0() -> void {
|
||||
position = var0.data;
|
||||
|
|
Loading…
Reference in New Issue