* During capture we don't insert references as we're recording descriptor binds,
just once at queue submit time, as an optimisation. However this loses
ordering relative to more direct references. Since descriptor binds are more
conservative (either read, or read before write) we ensure to insert them
first before any direct references like copies or fills which could mark the
resource as completely written before read.
* When searching for the start of a range of instructions mapped to a single
line when stepping backwards, we need to ignore instructions that don't have
any debug info because they will look like a 'different' smaller stack.
* If we have an OpAccessChain which only looks up a resource index and not
anything else, we need to ensure that both we don't consume the first index
next time, AND that we preserve the resource index for future access chains.
Serialize the presented texture (presentedImage) as part of "presentDrawable" serialization.
Use the present texture resource ID in the action name ie. "presentDrawable(Texture 23219)"
Track the most recently presented image and use that in SystemChunk::CaptureEnd if the PresentedImage serialized data is empty resource.
Track the CAMetalDrawable's created via the hooked CAMetalLayer::nextDrawable() method.
Implements TODO in WrappedMTLCommandBuffer::presentDrawable
"remove the (CA::MetalDrawable*) cast. Associate created texture and layer in hooked nextDrawable with MTL::Drawable*"
Deduplicating code between BeginRenderPassAndApplyState and
FinishSuspendedRenderPass. Fixes a bug where FinishSuspendedRenderPass
was using the depth attachment for stencil.
This change, along with changes in the GPA library, allows the user
to collect AMD counters from a Samsung Xclipse GPU. Previous to this,
the AMD counters could be collected only from GPUs with an AMD PCI
vendor ID.
Most of the changes are related to the fact that the Xclipse GPU has
a unique (Samsung) PCI vendor ID, but is ultimately an AMD
(RDNA2) derivative. So, we need the code to take the AMD path
while technically being its own (non-AMD) GPU.
bool WrappedMTLDevice::ProcessChunk(ReadSerialiser &ser, MetalChunk chunk)
SystemChunk::InitialContentsList is handled but not implemented
Added declarations for dummy objects used for serialization replay
WrappedMTLBuffer *m_DummyBuffer;
WrappedMTLCommandBuffer *m_DummyReplayCommandBuffer;
WrappedMTLCommandQueue *m_DummyReplayCommandQueue;
WrappedMTLLibrary *m_DummyReplayLibrary;
WrappedMTLRenderCommandEncoder *m_DummyReplayRenderCommandEncoder;
WrappedMTLBlitCommandEncoder *m_DummyReplayBlitCommandEncoder;
The dummy objects are not created in this commit.
This change exposes the
VkPipelineViewportDepthClipControlCreateInfoEXT::negativeOneToOne
pipeline state in the UI. While not a per-viewport state, this state is
output alongside viewport information.
If the extension is not used, or if this flag is false, [0, 1] is shown
as the depth clip range. If the flag is true, [-1, 1] is shown.
This is supported by OpenGL, and on Vulkan with
VK_EXT_primitive_topology_list_restart. On Vulkan, all drivers are
known to support this even without
VK_EXT_primitive_topology_list_restart. On D3D, primitive restart is
only supported for strip topologies.
Previously, RenderDoc specifically disabled primitive restart for
non-strip topologies. In this change, that is no longer done. If the
app enables primitive restart, so will RenderDoc behave accordingly. It
would be the responsibility of the app to avoid primitive restart if the
API doesn't allow it.
To be consistent with replay created textures set MTL::TextureUsageShaderRead on textures created during capture. This override is not serialized.
PR Feedback
* This helps those who have chosen the dark theme where rich resource text uses
the default window text colour assuming it's a contrasting colour against the
background (except when highlighted).