mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-22 06:26:30 +00:00
Support mesh output from different view indices on vulkan
* When using VK_KHR_multiview you can select which view to view the mesh data from.
This commit is contained in:
@@ -134,6 +134,8 @@ struct MeshDisplay
|
||||
bool showWholePass;
|
||||
DOCUMENT("The index of the currently selected instance in the drawcall.");
|
||||
uint32_t curInstance;
|
||||
DOCUMENT("The index of the currently selected multiview view in the drawcall.");
|
||||
uint32_t curView;
|
||||
|
||||
DOCUMENT("The index of the vertex to highlight, or :data:`NoHighlight` to select no vertex.");
|
||||
uint32_t highlightVert;
|
||||
|
||||
@@ -133,6 +133,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
DOCUMENT("Returns the number of views being broadcast to simultaneously during rendering.");
|
||||
uint32_t MultiviewBroadcastCount() const;
|
||||
|
||||
DOCUMENT(R"(Determines whether or not the current capture supports binding arrays of resources.
|
||||
|
||||
:return: A boolean indicating if binding arrays of resources is supported.
|
||||
|
||||
@@ -382,6 +382,16 @@ ResourceId PipeState::GetGraphicsPipelineObject() const
|
||||
return ResourceId();
|
||||
}
|
||||
|
||||
uint32_t PipeState::MultiviewBroadcastCount() const
|
||||
{
|
||||
if(IsCaptureLoaded() && IsCaptureVK())
|
||||
{
|
||||
return std::max((uint32_t)m_Vulkan->currentPass.renderpass.multiviews.size(), 1U);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
rdcstr PipeState::GetShaderEntryPoint(ShaderStage stage) const
|
||||
{
|
||||
if(IsCaptureLoaded() && IsCaptureVK())
|
||||
|
||||
@@ -1124,12 +1124,13 @@ texture to something compatible with the target file format.
|
||||
|
||||
DOCUMENT(R"(Retrieve the generated data from one of the geometry processing shader stages.
|
||||
|
||||
:param int instance: The index of the instance to retrieve data for.
|
||||
:param int instance: The index of the instance to retrieve data for, or 0 for non-instanced draws.
|
||||
:param int view: The index of the multiview view to retrieve data for, or 0 if multiview is disabled.
|
||||
:param MeshDataStage stage: The stage of the geometry processing pipeline to retrieve data from.
|
||||
:return: The information describing where the post-transform data is stored.
|
||||
:rtype: MeshFormat
|
||||
)");
|
||||
virtual MeshFormat GetPostVSData(uint32_t instance, MeshDataStage stage) = 0;
|
||||
virtual MeshFormat GetPostVSData(uint32_t instance, uint32_t view, MeshDataStage stage) = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the contents of a range of a buffer as a ``bytes``.
|
||||
|
||||
|
||||
@@ -573,6 +573,13 @@ struct RenderPass
|
||||
If there is no depth-stencil attachment, this index is ``-1``.
|
||||
)");
|
||||
int32_t depthstencilAttachment = -1;
|
||||
|
||||
DOCUMENT(R"(If multiview is enabled, contains a list of view indices to be broadcast to during
|
||||
rendering.
|
||||
|
||||
If the list is empty, multiview is disabled and rendering is as normal.
|
||||
)");
|
||||
rdcarray<uint32_t> multiviews;
|
||||
};
|
||||
|
||||
DOCUMENT("Describes a single attachment in a framebuffer object.");
|
||||
|
||||
Reference in New Issue
Block a user