mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-29 02:41:08 +00:00
Add optional debug dumping of postvs SPIR-V
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
#include <algorithm>
|
||||
#include "core/settings.h"
|
||||
#include "driver/shaders/spirv/spirv_editor.h"
|
||||
#include "driver/shaders/spirv/spirv_op_helpers.h"
|
||||
#include "vk_core.h"
|
||||
@@ -32,6 +33,9 @@
|
||||
#include "vk_replay.h"
|
||||
#include "vk_shader_cache.h"
|
||||
|
||||
RDOC_DEBUG_CONFIG(rdcstr, Vulkan_Debug_PostVSDumpDirPath, "",
|
||||
"Path to dump gnerated SPIR-V compute shaders for fetching post-vs.");
|
||||
|
||||
#undef None
|
||||
|
||||
struct VkXfbQueryResult
|
||||
@@ -1984,10 +1988,16 @@ void VulkanReplay::FetchVSOut(uint32_t eventId, VulkanRenderState &state)
|
||||
m_pDriver->vkUpdateDescriptorSets(dev, numWrites, descWrites, 0, NULL);
|
||||
}
|
||||
|
||||
if(!Vulkan_Debug_PostVSDumpDirPath().empty())
|
||||
FileIO::WriteAll(Vulkan_Debug_PostVSDumpDirPath() + "/debug_postvs_vert.spv", modSpirv);
|
||||
|
||||
ConvertToMeshOutputCompute(*refl, *pipeInfo.shaders[0].patchData,
|
||||
pipeInfo.shaders[0].entryPoint.c_str(), attrInstDivisor, drawcall,
|
||||
numVerts, numViews, modSpirv, bufStride);
|
||||
|
||||
if(!Vulkan_Debug_PostVSDumpDirPath().empty())
|
||||
FileIO::WriteAll(Vulkan_Debug_PostVSDumpDirPath() + "/debug_postvs_comp.spv", modSpirv);
|
||||
|
||||
VkComputePipelineCreateInfo compPipeInfo = {VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
|
||||
|
||||
// repoint pipeline layout
|
||||
|
||||
Reference in New Issue
Block a user