Add two new fields to angle::Format.
One field determines if a format is a compressed format
(called Block format for angle::Format, but basically the same).
The second field is the number of bytes in the format, so we
can do calculations on pixel size.
Both of these will make life cleaner in the Vulkan back-end.
Also solves some TODOs in the vk format table init.
Bug: angleproject:2318
Bug: angleproject:2358
Change-Id: I8b021b959c5892c86635e0225012295e5e830256
Reviewed-on: https://chromium-review.googlesource.com/987524
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
index 4386028..164b380 100644
--- a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
+++ b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
@@ -278,10 +278,7 @@
0, &mapPointer));
const angle::Format &angleFormat = renderTarget->image->getFormat().textureFormat();
-
- // TODO(jmadill): Use pixel bytes from the ANGLE format directly.
- const auto &glFormat = gl::GetSizedInternalFormatInfo(angleFormat.glInternalFormat);
- int outputPitch = glFormat.pixelBytes * area.width;
+ GLuint outputPitch = angleFormat.pixelBytes * area.width;
// Get the staging image pitch and use it to pack the pixels later.
VkSubresourceLayout subresourceLayout;