Replies: 4 comments 4 replies
-
Congrats on the release. |
Beta Was this translation helpful? Give feedback.
-
@timoore , about Tracy: Vulkan GPU Tracing is not integrated, right? |
Beta Was this translation helpful? Give feedback.
-
That is correct. I had thought that I would need to insert Tracy macros into VSG code to make that possible. I think I see a way to instrument vsgCs drawing, but it's not implemented yet. |
Beta Was this translation helpful? Give feedback.
-
From my reading of the Tracy docs, TracyVkContext should be called once per
logical device and queue. The resulting context should be passed to the
TracyVkZone macro that marks the GPU zone.
The Tracy zone macros work via C++ RAII, i.e. a zone begins when an object
is created and ends at when it is destroyed (goes out of scope). There is a
C interface for CPU Tracy so that zones can begin and end in different
functions, but I don't see that this has been implemented for graphical
tracing. For tracing VSG code without changing VSG source, I would take the
approach of subclassing interesting VSG classes and overriding the record()
method to mark a Tracy zone and then call the original class.
Tim
…On Tue, Jun 20, 2023 at 1:33 PM Remo E ***@***.***> wrote:
Thanks! Robert, I'm not familiar with VSG :) Still learning.
But I've tried the following:
class TracyBeginCmd : public vsg::Inherit<vsg::BeginQuery, TracyBeginCmd>
{public:
TracyBeginCmd(vsg::Device* device) : _device(device) {}
void record(vsg::CommandBuffer& commandBuffer) const override
{
auto queueFamily = _device->getPhysicalDevice()->getQueueFamily(VK_QUEUE_GRAPHICS_BIT);
auto tracy_context = TracyVkContext(
_device->getPhysicalDevice()->vk(),
_device->vk(),
_device->getQueue(queueFamily)->vk(),
commandBuffer.vk());
}private:
vsg::Device* _device;
};
main()
{
...
auto commandGraph = vsg::createCommandGraphForView(window, camera, scene);
commandGraph->addChild(TracyBeginCmd::create(window->getDevice()));
...
}
This results in the following error:
VUID-vkBeginCommandBuffer-commandBuffer-00049(ERROR / SPEC): msgNum: -2080204129 - Validation Error: [ VUID-vkBeginCommandBuffer-commandBuffer-00049 ] Object 0: handle = 0x2706c973310, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x84029a9f | vkBeginCommandBuffer(): Cannot call Begin on VkCommandBuffer 0x2706c973310[] in the RECORDING state. Must first call vkEndCommandBuffer(). The Vulkan spec states: commandBuffer must not be in the recording or pending state (https://vulkan.lunarg.com/doc/view/1.3.243.0/windows/1.3-extensions/vkspec.html#VUID-vkBeginCommandBuffer-commandBuffer-00049)
Objects: 1
[0] 0x2706c973310, type: 6, name: NULL
Tracy docs:
https://github.com/wolfpld/tracy/blob/cf0e6b610b02fbcbbf309b2de38a5e95604d0198/manual/tracy.tex#L1470
—
Reply to this email directly, view it on GitHub
<#849 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABAQAPYF7DIF3XRR2JYMATXMGDCPANCNFSM6AAAAAAZD5RMEU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I just made a 0.4 release of vsgCs, a library for displaying 3D Tiles and other Cesium ion content with VSG. 0.4 has these new features:
Enjoy!
Tim
Beta Was this translation helpful? Give feedback.
All reactions