Giter Site home page Giter Site logo

Comments (5)

baldurk avatar baldurk commented on July 3, 2024

Using the in-application API for this is the intended solution for programs where present boundaries do not provide a delineation of frames, and I do not intend to ever support a 'capture everything' mode.

Please also note that renderdoccmd is an internal program and not user facing and is not directly supported, you should launch your program from qrenderdoc.

from renderdoc.

haasn avatar haasn commented on July 3, 2024

I do not intend to ever support a 'capture everything' mode.

Is there a specific reason for this? Would you accept a PR adding this functionality?

Edit: Also, what about, for example, a simple vulkan layer that merely hooks vkCreateInstance / vkDestroyInstance and places the appropriate renderdoc API call around each? I will try and write something like this for my own use, so I don't have to continuously re-invent the wheel just to use renderdoc in various projects.

from renderdoc.

baldurk avatar baldurk commented on July 3, 2024

It is not how RenderDoc is intended to function as it's a frame-capture based debugger that is built around capturing the a given subset of work. I don't want to take on the support burden or encourage that kind of workflow of capturing an unbounded amount of work. If someone wants to they can use the in-application API to start and stop captures at arbitrary points, but I suspect it is unlikely to scale unless their program is quite small.

I would not accept any PR that tries to add that functionality, no.

Writing a layer like that I suspect you will run into challenges with layer ordering, and I'm not sure exactly when it will be valid to call the in-application API as it is only intended to be called by applications outside of those functions and not part way through their evaluation. If you wanted to try then you could of course, but you'd be on your own to fix any problems you encounter. In my experience integrating the in-application API has not been an issue for projects before, e.g. the vulkan CTS has the exact kind of integration needed for what you're describing.

from renderdoc.

dorian-apanel-intel avatar dorian-apanel-intel commented on July 3, 2024

@haasn
For small simple tests, you might want to try this change:

diff --git a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
index 9514d3aeb..b3cc40dbc 100644
--- a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
+++ b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
@@ -4490,6 +4490,12 @@ void WrappedVulkan::vkDestroyDevice(VkDevice device, const VkAllocationCallbacks
     m_MemoryFreeThread = 0;
   }
 
+  // Save capture if active
+  if(IsActiveCapturing(m_State))
+  {
+    RenderDoc::Inst().EndFrameCapture(DeviceOwnedWindow(LayerDisp(m_Instance), NULL));
+  }
+
   // flush out any pending commands/semaphores
   SubmitCmds();
   SubmitSemaphores();

And just start test from Renderdoc with queueCapture frame 0.
Assuming your test does not call vkQueuePresent and calls vkDestroyDevice it will write everything to a capture.

from renderdoc.

baldurk avatar baldurk commented on July 3, 2024

Please do not comment on old issues that have been closed.

If you are encountering a bug or are requesting a feature please open a new issue. You can reference this issue if you wish, but opening a new issue prevents any confusion of accidentally linking two unrelated issues and means that each issue can be handled in a clean process.

from renderdoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.