mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Support LZ4 compression of stripped separate debug blobs
This commit is contained in:
@@ -208,4 +208,8 @@ This optional information is generated by the compiler, but is not required for
|
||||
|
||||
The simplest solution is just to avoid stripping the data when using RenderDoc, but that isn't always possible. Instead RenderDoc allows you to use API-specific methods to specify where the unstripped data can be found. This means you can save the unstripped shader to a debug location and then either store this location with the shader, or specify it at runtime. On replay RenderDoc will expect the data to be available at that location and it will load it up instead.
|
||||
|
||||
For details on this method, check out :doc:`tips_tricks`.
|
||||
The path you specify (with the stripped shader, or at runtime) can be either absolute or relative. If it's relative, you must configure a shader search path in the :doc:`../window/options_window`.
|
||||
|
||||
The stripped shader file stored on disk can also be compressed with LZ4 to save space as often most of the size is made up for shader source text which compresses well. To do this, simply compress the contents of the file and prepend the pathname (either absolute or relative, specified in the shader blob or at runtime) with ``lz4#``.
|
||||
|
||||
For example code using this method, check out :doc:`tips_tricks`.
|
||||
|
||||
@@ -78,7 +78,9 @@ This page is a random hodge-podge of different tips and tricks that might not be
|
||||
GUID RENDERDOC_ShaderDebugMagicValue = RENDERDOC_ShaderDebugMagicValue_value; // GUID value in renderdoc_app.h
|
||||
|
||||
ID3D11VertexShader *shader = ...;
|
||||
std::string pathName = ...; // path name is in UTF-8
|
||||
std::string pathName = "/path/to/saved/blob"; // path name is in UTF-8
|
||||
// path name can also be prefixed with lz4# to indicate the blob is compressed
|
||||
pathName = "lz4#/path/to/saved/blob";
|
||||
|
||||
// string parameter must be NULL-terminated, and in UTF-8
|
||||
shader->SetPrivateData(RENDERDOC_ShaderDebugMagicValue, (UINT)pathName.length(), pathName.c_str());
|
||||
|
||||
Reference in New Issue
Block a user