Place format info in angle::Format.
Some bits of information, like the copy functions and mipmap gen
functions, can be shared across back-ends in the angle::Format
class.
Also name the info struct angle::Format, and use an enum class
angle::Format::ID to identify the particular format.
This patch introduces a new table generator for angle formats
and updates the D3D11 generator accordingly.
BUG=angleproject:1455
Change-Id: I13b8b98822b1186c6a9e436dc232c18fef50980c
Reviewed-on: https://chromium-review.googlesource.com/365824
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/renderer_utils.h b/src/libANGLE/renderer/renderer_utils.h
index c95292e..403333e 100644
--- a/src/libANGLE/renderer/renderer_utils.h
+++ b/src/libANGLE/renderer/renderer_utils.h
@@ -25,6 +25,16 @@
namespace rx
{
+using MipGenerationFunction = void (*)(size_t sourceWidth,
+ size_t sourceHeight,
+ size_t sourceDepth,
+ const uint8_t *sourceData,
+ size_t sourceRowPitch,
+ size_t sourceDepthPitch,
+ uint8_t *destData,
+ size_t destRowPitch,
+ size_t destDepthPitch);
+
typedef void (*ColorReadFunction)(const uint8_t *source, uint8_t *dest);
typedef void (*ColorWriteFunction)(const uint8_t *source, uint8_t *dest);
typedef void (*ColorCopyFunction)(const uint8_t *source, uint8_t *dest);