Add ability to save .rdc file thumbnail in formats other than JPEG

By default RenderDoc saves captured frame thumbnail image as JPEG which
is lossy compression and makes it difficult to use as a reference image
for testing. Added an option to save thumbnails in different formats.

In order not to change the binary serialization format of .rdc files, if
the thumbnail format is not JPEG, a default JPEG thumbnail is still
saved in the file header as before, while the actual thumbnail is saved
as an additional chunk in the binary sections list. Older versions of
RenderDoc will just ignore this section and still use the legacy JPEG
thumbnail.

Change-Id: Icbf4fbd629719b49868fb785a656f6c7c9946ef9
This commit is contained in:
akharlamov
2018-11-14 18:32:07 +00:00
committed by Baldur Karlsson
parent ad7e01876c
commit a1a0b1a7ec
11 changed files with 159 additions and 21 deletions
+1
View File
@@ -852,6 +852,7 @@ std::string DoStringise(const SectionType &el)
STRINGISE_ENUM_CLASS_NAMED(Notes, "renderdoc/ui/notes");
STRINGISE_ENUM_CLASS_NAMED(ResourceRenames, "renderdoc/ui/resrenames");
STRINGISE_ENUM_CLASS_NAMED(AMDRGPProfile, "amd/rgp/profile");
STRINGISE_ENUM_CLASS_NAMED(ExtendedThumbnail, "renderdoc/internal/exthumb");
}
END_ENUM_STRINGISE();
}
+8
View File
@@ -76,6 +76,13 @@ version of RenderDoc that addes a new section type. They should be considered eq
This section contains a .rgp profile from AMD's RGP tool, which can be extracted and loaded.
The name for this section will be "amd/rgp/profile".
.. data:: ExtendedThumbnail
This section contains a thumbnail in format other than JPEG. For example, when it needs to be
lossless.
The name for this section will be "renderdoc/internal/exthumb".
)");
enum class SectionType : uint32_t
{
@@ -87,6 +94,7 @@ enum class SectionType : uint32_t
Notes,
ResourceRenames,
AMDRGPProfile,
ExtendedThumbnail,
Count,
};