Suppress 32-bit MSVC warning.
../../third_party/SwiftShader/src\Yarn/Pool.hpp(254): note: see reference to function template instantiation 'std::shared_ptr<yarn::BoundedPool<sw::DrawCall::BatchData,16,yarn::PoolPolicy::Preserve>::Storage> std::make_shared<yarn::BoundedPool<sw::DrawCall::BatchData,16,yarn::PoolPolicy::Preserve>::Storage,>(void)' being compiled
C:\dev\depot_tools\win_toolchain\vs_files\418b3076791776573a815eb298c8aa590307af63\win_sdk\bin\..\..\VC\Tools\MSVC\14.16.27023\include\memory(1866): warning C4316: 'std::_Ref_count_obj<_Ty>': object allocated on the heap may not be aligned 16
with
[
_Ty=yarn::BoundedPool<sw::DrawCall::BatchData,16,yarn::PoolPolicy::Preserve>::Storage
]
../../third_party/SwiftShader/src/Vulkan/VkQueue.cpp(122): warning C4316: 'sw::Renderer': object allocated on the heap may not be aligned 16
Bug: angleproject:3876
Bug: b/140251624
Bug: b/140575360
Change-Id: I3016b8ba4e6557c9b7f1c27a387f03ff307e17de
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/36048
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 212afb2..8dd0a2b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -57,6 +57,13 @@
cflags += [
"/wd4309", # Truncation of constant value. See PixelRoutine.cpp casts of signed shorts.
]
+
+ if (target_cpu == "x86") {
+ cflags += [
+ # TODO(b/140575360): Fix when posssible.
+ "/wd4316", # object allocated on the heap may not be aligned. See Renderer and Pool.
+ ]
+ }
}
} else {
cflags = [