mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-03 19:55:56 +00:00
Remove legacy tint::transform API codepaths
https://dawn-review.googlesource.com/c/tint/+/34800 has been merged, and rolled into Dawn and Chromium. Bug: tint:390 Bug: tint:389 Change-Id: Ibbbb7f664b2c0e132c5ac25f24bc8f7cb24fc460 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34900 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
ab5821d016
commit
5816894706
@ -271,13 +271,8 @@ namespace dawn_native {
|
|||||||
|
|
||||||
tint::transform::Manager transformManager;
|
tint::transform::Manager transformManager;
|
||||||
{
|
{
|
||||||
# if DAWN_USE_NEW_TINT_TRANSFORM_API // TODO(bclayton) - Remove once API migration is complete
|
|
||||||
auto transform = std::make_unique<tint::transform::VertexPulling>();
|
auto transform = std::make_unique<tint::transform::VertexPulling>();
|
||||||
tint::transform::VertexStateDescriptor state;
|
tint::transform::VertexStateDescriptor state;
|
||||||
# else // DAWN_USE_NEW_TINT_TRANSFORM_API
|
|
||||||
auto transform = std::make_unique<tint::transform::VertexPullingTransform>(&module);
|
|
||||||
auto state = std::make_unique<tint::transform::VertexStateDescriptor>();
|
|
||||||
# endif // DAWN_USE_NEW_TINT_TRANSFORM_API
|
|
||||||
|
|
||||||
for (uint32_t i = 0; i < vertexState.vertexBufferCount; ++i) {
|
for (uint32_t i = 0; i < vertexState.vertexBufferCount; ++i) {
|
||||||
auto& vertexBuffer = vertexState.vertexBuffers[i];
|
auto& vertexBuffer = vertexState.vertexBuffers[i];
|
||||||
@ -295,11 +290,7 @@ namespace dawn_native {
|
|||||||
layout.attributes.push_back(std::move(attr));
|
layout.attributes.push_back(std::move(attr));
|
||||||
}
|
}
|
||||||
|
|
||||||
# if DAWN_USE_NEW_TINT_TRANSFORM_API // TODO(bclayton) - Remove once API migration is complete
|
|
||||||
state.push_back(std::move(layout));
|
state.push_back(std::move(layout));
|
||||||
# else // DAWN_USE_NEW_TINT_TRANSFORM_API
|
|
||||||
state->vertex_buffers.push_back(std::move(layout));
|
|
||||||
# endif // DAWN_USE_NEW_TINT_TRANSFORM_API
|
|
||||||
}
|
}
|
||||||
transform->SetVertexState(std::move(state));
|
transform->SetVertexState(std::move(state));
|
||||||
transform->SetEntryPoint(entryPoint);
|
transform->SetEntryPoint(entryPoint);
|
||||||
@ -307,7 +298,6 @@ namespace dawn_native {
|
|||||||
transformManager.append(std::move(transform));
|
transformManager.append(std::move(transform));
|
||||||
}
|
}
|
||||||
|
|
||||||
# if DAWN_USE_NEW_TINT_TRANSFORM_API // TODO(bclayton) - Remove once API migration is complete
|
|
||||||
auto result = transformManager.Run(&module);
|
auto result = transformManager.Run(&module);
|
||||||
if (result.diagnostics.contains_errors()) {
|
if (result.diagnostics.contains_errors()) {
|
||||||
errorStream << "Vertex pulling transform: "
|
errorStream << "Vertex pulling transform: "
|
||||||
@ -315,12 +305,6 @@ namespace dawn_native {
|
|||||||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
||||||
}
|
}
|
||||||
module = std::move(result.module);
|
module = std::move(result.module);
|
||||||
# else // DAWN_USE_NEW_TINT_TRANSFORM_API
|
|
||||||
if (!transformManager.Run(&module)) {
|
|
||||||
errorStream << "Vertex pulling transform: " << transformManager.error();
|
|
||||||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
|
||||||
}
|
|
||||||
# endif // DAWN_USE_NEW_TINT_TRANSFORM_API
|
|
||||||
|
|
||||||
tint::TypeDeterminer type_determiner(&module);
|
tint::TypeDeterminer type_determiner(&module);
|
||||||
if (!type_determiner.Determine()) {
|
if (!type_determiner.Determine()) {
|
||||||
|
@ -221,7 +221,6 @@ namespace dawn_native { namespace d3d12 {
|
|||||||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
# if DAWN_USE_NEW_TINT_TRANSFORM_API // TODO(bclayton) - Remove once API migration is complete
|
|
||||||
tint::transform::Manager transformManager;
|
tint::transform::Manager transformManager;
|
||||||
transformManager.append(std::make_unique<tint::transform::BoundArrayAccessors>());
|
transformManager.append(std::make_unique<tint::transform::BoundArrayAccessors>());
|
||||||
auto result = transformManager.Run(&module);
|
auto result = transformManager.Run(&module);
|
||||||
@ -231,16 +230,6 @@ namespace dawn_native { namespace d3d12 {
|
|||||||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
||||||
}
|
}
|
||||||
module = std::move(result.module);
|
module = std::move(result.module);
|
||||||
# else // DAWN_USE_NEW_TINT_TRANSFORM_API
|
|
||||||
tint::transform::Manager transformManager;
|
|
||||||
transformManager.append(
|
|
||||||
std::make_unique<tint::transform::BoundArrayAccessorsTransform>(&module));
|
|
||||||
if (!transformManager.Run(&module)) {
|
|
||||||
errorStream << "Bound Array Accessors Transform: " << transformManager.error()
|
|
||||||
<< std::endl;
|
|
||||||
return DAWN_VALIDATION_ERROR(errorStream.str().c_str());
|
|
||||||
}
|
|
||||||
# endif // DAWN_USE_NEW_TINT_TRANSFORM_API
|
|
||||||
|
|
||||||
ASSERT(remappedEntryPointName != nullptr);
|
ASSERT(remappedEntryPointName != nullptr);
|
||||||
tint::inspector::Inspector inspector(module);
|
tint::inspector::Inspector inspector(module);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user