Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a883e93
Update VK_Resource_Usage python to verify new resource usage
Zorro666 Sep 15, 2026
ff4d785
Added helper function VulkanEventNode::AddUniqueResourceUsage
Zorro666 Aug 22, 2026
5c6a5ff
Adding more ResourceUsage enum values
Zorro666 Nov 5, 2026
0e4fcbf
Added helper function VulkanEventNode::AddResourceBind
Zorro666 Nov 5, 2026
9262575
Added helper function AddEventResourceBind
Zorro666 Nov 10, 2026
5edaa81
Add new member BakedCmdBufferInfo::commandBuffer
Zorro666 Nov 5, 2026
6f4b98e
Vulkan extend AddUsage() to handle all pipeline bound resources
Zorro666 Nov 5, 2026
aec1fd4
Vulkan Add Resource Usage to Queue APIs
Zorro666 Nov 9, 2026
b07ef38
Vulkan Add Resource Usage to Fence/Event/Semaphore APIs
Zorro666 Nov 9, 2026
aa755f9
Vulkan Add Resource Usage to vkResetQueryPool
Zorro666 Nov 9, 2026
5994c15
Vulkan Add Resource Usage to vkDeviceWaitIdle
Zorro666 Nov 9, 2026
77740a3
Vulkan Add Resource Usage to DescriptorSet APIs
Zorro666 Nov 9, 2026
2ccf4fc
Vulkan Add Resource Usage for Command Buffer APIs
Zorro666 Nov 11, 2026
bf18794
Vulkan Add Resource Usage to CaptureEnd for the presented image
Zorro666 Nov 9, 2026
88a7091
Vulkan return resource usage for all Resources not just images/buffers
Zorro666 Nov 5, 2026
865a8c6
DO NOT MERGE: JAKE DEBUG UE5 INF SIM
Zorro666 Oct 26, 2026
c320af7
Added D3D11 shader debug tests for SampleBias, SampleCmp
Zorro666 Dec 14, 2025
29e154e
Added D3D12 shader debug tests for SampleBias, SampleCmp
Zorro666 Dec 13, 2025
2121b74
WIP FIX FIR SAMPLECMP SHADER DEBUG
Zorro666 Dec 14, 2025
2986ac8
FIXUP: Added D3D12 shader debug tests for SampleBias, SampleCmp
Zorro666 Apr 7, 2026
323c78c
DO NOT MERGE: RELEASE ASSERTS DEBUGBREAK
Zorro666 Aug 12, 2025
879be5c
DO NOT MERGE: assert m_BakedCmdBufferInfo does not contain 0 id
Zorro666 Mar 23, 2026
453cb1f
DO NOT MERGE: Enable ASAN
Zorro666 Sep 6, 2026
7df14a9
DO NOT MERGE: Revert "Enable ASAN"
Zorro666 Sep 10, 2026
812b9c9
DO NOT MERGE: HACKS FOR TESTING VK_RESOURCE_USAGE TEST
Zorro666 Aug 21, 2026
e912c14
DO NOT MERGE: ASSERT adding an event with no resource usage
Zorro666 Nov 5, 2026
b459363
DO NOT MERGE: ASSERT adding resource usage for ResourceId()
Zorro666 Nov 5, 2026
b572ca2
DO NOT MERGE: ALL_RESOURCE_USAGE PYTHON TEST
Zorro666 Apr 16, 2026
801385b
DO NOT MERGE: FATAL ERROR for invalid Resorce Usage
Zorro666 Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions qrenderdoc/Code/QRDUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,39 @@ QString ToQStr(const ResourceUsage usage, const GraphicsAPI apitype)
case ResourceUsage::Barrier: return lit("Barrier");

case ResourceUsage::CPUWrite: return lit("CPU Write");

case ResourceUsage::Pipeline: return lit("PSO");
case ResourceUsage::PipelineLayout: return lit("PSO Layout");
case ResourceUsage::VS_Shader: return lit("VS - Shader");
case ResourceUsage::HS_Shader: return lit("HS - Shader");
case ResourceUsage::DS_Shader: return lit("DS - Shader");
case ResourceUsage::GS_Shader: return lit("GS - Shader");
case ResourceUsage::PS_Shader: return lit("PS - Shader");
case ResourceUsage::CS_Shader: return lit("CS - Shader");
case ResourceUsage::TS_Shader: return lit("AS - Shader");
case ResourceUsage::MS_Shader: return lit("MS - Shader");
case ResourceUsage::DescriptorSet: return lit("Descriptor Set");
case ResourceUsage::DescriptorSetLayout: return lit("Descriptor Set Layout");
case ResourceUsage::RenderPass: return lit("Render Pass");
case ResourceUsage::Framebuffer: return lit("Framebuffer");
case ResourceUsage::Sampler: return lit("Sampler");
case ResourceUsage::ImageView: return lit("ImageView");
case ResourceUsage::BufferView: return lit("BufferView");
case ResourceUsage::Bind: return lit("Bind");
case ResourceUsage::UnBind: return lit("UnBind");
case ResourceUsage::GetStatus: return lit("Get Status");
case ResourceUsage::ReadCounter: return lit("Read Counter");
case ResourceUsage::DescriptorSetWrite: return lit("Descriptor Set Write");
case ResourceUsage::SparseBindingUpdate: return lit("Sparse Binding Update");
case ResourceUsage::Reset: return lit("Reset");
case ResourceUsage::Signal: return lit("Signal");
case ResourceUsage::Wait: return lit("Wait");
case ResourceUsage::Submit: return lit("Submit");
case ResourceUsage::Begin: return lit("Begin");
case ResourceUsage::End: return lit("End");
case ResourceUsage::Recorded: return lit("Recorded");
case ResourceUsage::Marker: return lit("Marker");
case ResourceUsage::Present: return lit("Present");
}
}
else if(apitype == GraphicsAPI::OpenGL || apitype == GraphicsAPI::Vulkan)
Expand Down Expand Up @@ -1687,6 +1720,39 @@ QString ToQStr(const ResourceUsage usage, const GraphicsAPI apitype)
case ResourceUsage::Barrier: return lit("Barrier");

case ResourceUsage::CPUWrite: return lit("CPU Write");

case ResourceUsage::Pipeline: return lit("PSO");
case ResourceUsage::PipelineLayout: return lit("PSO Layout");
case ResourceUsage::VS_Shader: return lit("VS - Shader");
case ResourceUsage::HS_Shader: return lit("HS - Shader");
case ResourceUsage::DS_Shader: return lit("TCS - Shader");
case ResourceUsage::GS_Shader: return lit("TES - Shader");
case ResourceUsage::PS_Shader: return lit("FS - Shader");
case ResourceUsage::CS_Shader: return lit("CS - Shader");
case ResourceUsage::TS_Shader: return lit("TS - Shader");
case ResourceUsage::MS_Shader: return lit("MS - Shader");
case ResourceUsage::DescriptorSet: return lit("Descriptor Set");
case ResourceUsage::DescriptorSetLayout: return lit("Descriptor Set Layout");
case ResourceUsage::RenderPass: return lit("Render Pass");
case ResourceUsage::Framebuffer: return lit("Framebuffer");
case ResourceUsage::Sampler: return lit("Sampler");
case ResourceUsage::ImageView: return lit("ImageView");
case ResourceUsage::BufferView: return lit("BufferView");
case ResourceUsage::Bind: return lit("Bind");
case ResourceUsage::UnBind: return lit("UnBind");
case ResourceUsage::GetStatus: return lit("Get Status");
case ResourceUsage::ReadCounter: return lit("Read Counter");
case ResourceUsage::DescriptorSetWrite: return lit("Descriptor Set Write");
case ResourceUsage::SparseBindingUpdate: return lit("Sparse Binding Update");
case ResourceUsage::Reset: return lit("Reset");
case ResourceUsage::Signal: return lit("Signal");
case ResourceUsage::Wait: return lit("Wait");
case ResourceUsage::Submit: return lit("Submit");
case ResourceUsage::Begin: return lit("Begin");
case ResourceUsage::End: return lit("End");
case ResourceUsage::Recorded: return lit("Recorded");
case ResourceUsage::Marker: return lit("Marker");
case ResourceUsage::Present: return lit("Present");
}
}

Expand Down
45 changes: 45 additions & 0 deletions renderdoc/api/replay/renderdoc_tostr.inl
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,8 @@ rdcstr DoStringise(const ResourceUsage &el)
STRINGISE_ENUM_CLASS_NAMED(GS_Constants, "GS - Constants");
STRINGISE_ENUM_CLASS_NAMED(PS_Constants, "PS - Constants");
STRINGISE_ENUM_CLASS_NAMED(CS_Constants, "CS - Constants");
STRINGISE_ENUM_CLASS_NAMED(TS_Constants, "TS - Constants");
STRINGISE_ENUM_CLASS_NAMED(MS_Constants, "MS - Constants");

STRINGISE_ENUM_CLASS_NAMED(All_Constants, "All Stages - Constants");

Expand All @@ -862,6 +864,8 @@ rdcstr DoStringise(const ResourceUsage &el)
STRINGISE_ENUM_CLASS_NAMED(GS_Resource, "GS - Read-only Resource");
STRINGISE_ENUM_CLASS_NAMED(PS_Resource, "PS - Read-only Resource");
STRINGISE_ENUM_CLASS_NAMED(CS_Resource, "CS - Read-only Resource");
STRINGISE_ENUM_CLASS_NAMED(TS_Resource, "TS - Read-only Resource");
STRINGISE_ENUM_CLASS_NAMED(MS_Resource, "MS - Read-only Resource");

STRINGISE_ENUM_CLASS_NAMED(All_Resource, "All Stages - Read-only Resource");

Expand All @@ -871,9 +875,20 @@ rdcstr DoStringise(const ResourceUsage &el)
STRINGISE_ENUM_CLASS_NAMED(GS_RWResource, "GS - Read-write Resource");
STRINGISE_ENUM_CLASS_NAMED(PS_RWResource, "PS - Read-write Resource");
STRINGISE_ENUM_CLASS_NAMED(CS_RWResource, "CS - Read-write Resource");
STRINGISE_ENUM_CLASS_NAMED(TS_RWResource, "TS - Read-write Resource");
STRINGISE_ENUM_CLASS_NAMED(MS_RWResource, "MS - Read-write Resource");

STRINGISE_ENUM_CLASS_NAMED(All_RWResource, "All Stages - Read-write Resource");

STRINGISE_ENUM_CLASS_NAMED(VS_Shader, "Vertex Shader");
STRINGISE_ENUM_CLASS_NAMED(HS_Shader, "Hull Shader");
STRINGISE_ENUM_CLASS_NAMED(DS_Shader, "Domain Shader");
STRINGISE_ENUM_CLASS_NAMED(GS_Shader, "Geometry Shader");
STRINGISE_ENUM_CLASS_NAMED(PS_Shader, "Pixel Shader");
STRINGISE_ENUM_CLASS_NAMED(CS_Shader, "Compute Shader");
STRINGISE_ENUM_CLASS_NAMED(TS_Shader, "Task Shader");
STRINGISE_ENUM_CLASS_NAMED(MS_Shader, "Mesh Shader");

STRINGISE_ENUM_CLASS_NAMED(InputTarget, "Input target");
STRINGISE_ENUM_CLASS_NAMED(ColorTarget, "Color target");
STRINGISE_ENUM_CLASS_NAMED(DepthStencilTarget, "Depth/stencil target");
Expand All @@ -894,6 +909,36 @@ rdcstr DoStringise(const ResourceUsage &el)
STRINGISE_ENUM_CLASS_NAMED(Barrier, "Barrier");

STRINGISE_ENUM_CLASS_NAMED(CPUWrite, "CPU Write");

STRINGISE_ENUM_CLASS_NAMED(Pipeline, "Pipeline");
STRINGISE_ENUM_CLASS_NAMED(PipelineLayout, "Pipeline Layout");
STRINGISE_ENUM_CLASS_NAMED(DescriptorSet, "Descriptor Set");
STRINGISE_ENUM_CLASS_NAMED(DescriptorSetLayout, "Descriptor Set Layout");
STRINGISE_ENUM_CLASS_NAMED(RenderPass, "Render Pass");
STRINGISE_ENUM_CLASS_NAMED(Framebuffer, "Framebuffer");
STRINGISE_ENUM_CLASS_NAMED(Sampler, "Sampler");
STRINGISE_ENUM_CLASS_NAMED(ImageView, "Image View");
STRINGISE_ENUM_CLASS_NAMED(BufferView, "Buffer View");

STRINGISE_ENUM_CLASS_NAMED(Bind, "Bind");
STRINGISE_ENUM_CLASS_NAMED(UnBind, "UnBind");

STRINGISE_ENUM_CLASS_NAMED(GetStatus, "Get Status");
STRINGISE_ENUM_CLASS_NAMED(ReadCounter, "Read Counter");
STRINGISE_ENUM_CLASS_NAMED(DescriptorSetWrite, "Descriptor Set Write");
STRINGISE_ENUM_CLASS_NAMED(SparseBindingUpdate, "Sparse Binding Update");
STRINGISE_ENUM_CLASS_NAMED(Recorded, "Recorded");

STRINGISE_ENUM_CLASS_NAMED(Reset, "Reset");
STRINGISE_ENUM_CLASS_NAMED(Signal, "Signal");
STRINGISE_ENUM_CLASS_NAMED(Wait, "Wait");

STRINGISE_ENUM_CLASS_NAMED(Submit, "Submit");
STRINGISE_ENUM_CLASS_NAMED(Marker, "Marker");
STRINGISE_ENUM_CLASS_NAMED(Present, "Present");

STRINGISE_ENUM_CLASS_NAMED(Begin, "Begin");
STRINGISE_ENUM_CLASS_NAMED(End, "End");
}
END_ENUM_STRINGISE();
}
Expand Down
169 changes: 169 additions & 0 deletions renderdoc/api/replay/replay_enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -2972,6 +2972,38 @@ Note that a resource may be used for more than one thing in one event, see :clas

The resource is being used as a read-write resource in all shader stages.

.. data:: VS_Shader

The :data:`vertex shader <ShaderStage.Vertex>`.

.. data:: HS_Shader

The :data:`hull shader <ShaderStage.Hull>`.

.. data:: DS_Shader

The :data:`domain shader <ShaderStage.Domain>`.

.. data:: GS_Shader

The :data:`geometry shader <ShaderStage.Geometry>`.

.. data:: PS_Shader

The :data:`pixel shader <ShaderStage.Pixel>`.

.. data:: CS_Shader

The :data:`compute shader <ShaderStage.Compute>`.

.. data:: TS_Shader

The amplification or :data:`task shader <ShaderStage.Task>`.

.. data:: MS_Shader

The :data:`mesh shader <ShaderStage.Mesh>`.

.. data:: InputTarget

The resource is being read as an input target for reading from the target currently being written.
Expand Down Expand Up @@ -3032,6 +3064,103 @@ Note that a resource may be used for more than one thing in one event, see :clas

The resource is written from the CPU, either directly as mapped memory or indirectly via a
synchronous update.

.. data:: Pipeline

The Pipeline Object in Vulkan :data:`VKPipeline <renderdoc.VKPipeline>`.

.. data:: PipelineLayout

The PipelineLayout used when creating a Pipeline Object

.. data:: DescriptorSet

The DescriptorSet in Vulkan :data:`VKDescriptorSet <renderdoc.VKDescriptorSet>`.

.. data:: DescriptorSetLayout

The DescriptorSetLayout used when creating a DescriptorSet

.. data:: RenderPass

The RenderPass Object in Vulkan :data: 'VKRenderPass <renderdoc.VKRenderPass>'.

.. data:: Framebuffer

The FrameBuffer Object in Vulkan :data: 'VKFrameBuffer <renderdoc.VKFrameBuffer>'.

.. data:: Sampler

The Sampler Object

.. data:: ImageView

An ImageView Object in Vulkan or D3D12.

.. data:: BufferView

A BufferView Object in Vulkan or D3D12.

.. data:: Bind

The resource is bound i.e. as a resource to the render state or memory bound to a resource.

.. data:: UnBind

The resource is unbound i.e. it was replaced in the render state.

.. data:: GetStatus

Getting the status of a synchronisation resource i.e. Vulkan Fence.

.. data:: ReadCounter

Reading the value of a synchronisation resource i.e. Vulkan Semaphore.

.. data:: DescriptorSetWrite

Updating a Descriptor Set resource.

.. data:: SparseBindingUpdate

Updating the Sparse Binding for a resource.

.. data:: Marker

The resource is associated with a marker or label.

.. data:: Present

The resource is associated with a present i.e. Command Queue

.. data:: Recorded

The resource is recorded into i.e. Command Buffer, Command List

.. data:: Reset

The resource is reset i.e. Fence, Event, Semaphore, Command Buffer.

.. data:: Signal

The synchronisation resource is signalled/set i.e. Fence, Event, Semaphore.

.. data:: Wait

The synchronisation resource is waited on i.e. Fence, Event, Semaphore.

.. data:: Submit

The resource is submitted i.e. Command Buffer, Command List.

.. data:: Begin

The resource starts recording i.e. Query, Command Buffer, Command List.

.. data:: End

The resource stops recording i.e. Query, Command Buffer, Command List.

)");
enum class ResourceUsage : uint32_t
{
Expand Down Expand Up @@ -3075,6 +3204,15 @@ enum class ResourceUsage : uint32_t

All_RWResource,

VS_Shader,
HS_Shader,
DS_Shader,
GS_Shader,
PS_Shader,
CS_Shader,
TS_Shader,
MS_Shader,

InputTarget,
ColorTarget,
DepthStencilTarget,
Expand All @@ -3095,6 +3233,37 @@ enum class ResourceUsage : uint32_t
Barrier,

CPUWrite,

Pipeline,
PipelineLayout,
DescriptorSet,
DescriptorSetLayout,
RenderPass,
Framebuffer,
Sampler,
ImageView,
BufferView,

Bind,
UnBind,

GetStatus,
ReadCounter,
DescriptorSetWrite,
SparseBindingUpdate,
Marker,
Recorded,

Reset,
Signal,
Wait,

Submit,
Present,

Begin,
End,

};

DECLARE_REFLECTION_ENUM(ResourceUsage);
Expand Down
2 changes: 1 addition & 1 deletion renderdoc/common/globalconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ enum
#define FORCE_ASSERTS OPTION_ON

// force debugbreaks regardless of debug/release mode
#define FORCE_DEBUGBREAK OPTION_OFF
#define FORCE_DEBUGBREAK OPTION_ON

/////////////////////////////////////////////////
// Logging configuration
Expand Down
7 changes: 7 additions & 0 deletions renderdoc/data/hlsl/shaderdebug.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ void RENDERDOC_DebugSampleVS(uint id
else
uv = 0.0f.xxxx;

// 0, -4 : UV = uv + ddy * 2
// 0, 0 : UV = uv
// 4, 0 : UV = uv + ddx * 2
// pos = float4((id == 2) ? 4.0f : 0.0f, (id == 0) ? -4.0f : 0.0f, 0.5, 1.0);
// -1, -3 : UV = uv + ddy * 2
// -1, 1 : UV = uv
// 3, 1 : UV = uv + ddx * 2
pos = float4((id == 2) ? 3.0f : -1.0f, (id == 0) ? -3.0f : 1.0f, 0.5, 1.0);
}

Expand Down
Loading
Loading