From 3a4f8e083f307cdc6c003dddf932a24bec2b65ba Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Mon, 11 Mar 2024 14:53:29 -0700 Subject: [PATCH 1/2] [Impeller] use DefaultUniformAlignment for compute buffers. --- impeller/entity/geometry/point_field_geometry.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/impeller/entity/geometry/point_field_geometry.cc b/impeller/entity/geometry/point_field_geometry.cc index 534ee53bf92a0..5a71c233074a1 100644 --- a/impeller/entity/geometry/point_field_geometry.cc +++ b/impeller/entity/geometry/point_field_geometry.cc @@ -156,8 +156,8 @@ GeometryResult PointFieldGeometry::GetPositionBufferGPU( host_buffer.Emplace(points_.data(), points_.size() * sizeof(Point), DefaultUniformAlignment()); - BufferView geometry_buffer = - host_buffer.Emplace(nullptr, total * sizeof(Point), alignof(Point)); + BufferView geometry_buffer = host_buffer.Emplace( + nullptr, total * sizeof(Point), DefaultUniformAlignment()); BufferView output; { @@ -185,8 +185,8 @@ GeometryResult PointFieldGeometry::GetPositionBufferGPU( } if (texture_coverage.has_value() && effect_transform.has_value()) { - BufferView geometry_uv_buffer = - host_buffer.Emplace(nullptr, total * sizeof(Vector4), alignof(Vector4)); + BufferView geometry_uv_buffer = host_buffer.Emplace( + nullptr, total * sizeof(Vector4), DefaultUniformAlignment()); using UV = UvComputeShader; From 9f666668f1e726ad63bdd399bfde49d0fda3d841 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Mon, 11 Mar 2024 15:06:55 -0700 Subject: [PATCH 2/2] turn on validation. --- impeller/playground/playground_impl.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/impeller/playground/playground_impl.cc b/impeller/playground/playground_impl.cc index 75846e64b1991..c126c9d3efdde 100644 --- a/impeller/playground/playground_impl.cc +++ b/impeller/playground/playground_impl.cc @@ -35,6 +35,7 @@ std::unique_ptr PlaygroundImpl::Create( #endif // IMPELLER_ENABLE_OPENGLES #if IMPELLER_ENABLE_VULKAN case PlaygroundBackend::kVulkan: + switches.enable_vulkan_validation = true; return std::make_unique(switches); #endif // IMPELLER_ENABLE_VULKAN default: