Commit Graph

11744 Commits

Author SHA1 Message Date
baldurk afc9fc8f1e Fix verify-docstrings.py 2020-12-09 23:27:42 +00:00
baldurk 492aaf21b6 Fix apple compilation 2020-12-09 22:55:53 +00:00
baldurk 9d1673f5a4 Fix formatting in new docstrings 2020-12-09 22:55:48 +00:00
baldurk 6726540a11 Remove test passing NULL for rdcstr 2020-12-09 22:25:53 +00:00
baldurk 466eecde1d Remove raw strings from persistant config settings
* This seems to break on GCC 5 unfortunately, and is certainly a bit of an edge
  case.
2020-12-09 22:19:36 +00:00
baldurk f70c5be592 Fix issues with linux/mac builds 2020-12-09 21:57:15 +00:00
baldurk 8107a7a795 Account for array stride when unrolling AoS in buffer viewer 2020-12-09 18:16:08 +00:00
baldurk 8597b5ce30 Fix VulkanQuadOverdrawCallback still being active on restore replay 2020-12-09 18:16:08 +00:00
baldurk 68d690a912 When rendering overlays, clear to transparent black
* This might cause some fringing artifacts when at low scales due to non-PMA
  colors but it means there are no false-positive green pixels.
2020-12-09 18:16:08 +00:00
baldurk 7ff7e0a71d Replace fixed C arrays with wrapper class in public interface
* These map more naturally to python tuples and are easier to wrap in and out.
* We also tidy up the FloatVecVal etc and standardise the members of
  ShaderValue.
2020-12-09 18:16:08 +00:00
baldurk 580f96c8a1 Rename ShaderVariableType/Descriptor to ShaderConstant
* These structs are no longer used with ShaderVariable so the name is misleading
  at best.
2020-12-09 15:18:27 +00:00
baldurk 659fdaa235 Check that all complex struct members that have :type: in docstrings
* Ideally we'd document every member unconditionally for best autocompletion,
  but that's a lot of modification so for now we stick to just making sure that
  any members that are struct types (or lists/tuples) have the :type:
  declaration so that we can autocomplete inside them.
2020-12-09 15:18:27 +00:00
baldurk dd3e7ab121 Add a modified and improved version of PyCharm's skeleton generator 2020-12-09 15:18:27 +00:00
baldurk 6b8ce92d88 Clean up docstrings in python interfaces to be strictly typed/formatted
* Also added a script that can run as part of CI to verify that the docstring
  matches, by generating a regex from the docstring documented parameter types
  and return type and making sure we find a match within the C headers. This
  ensures all parameters are documented with the right types, no extra
  parameters are documented, and the return type is correct.
* The script also checks proper scoping so that if qrenderdoc docstrings
  mention a renderdoc type, they need to scope it properly.
2020-12-07 17:44:51 +00:00
baldurk e5f4ca7bb8 Remove use of const char * in public API and OS specific where possible
* This prevents unnecessary conversions back and forth between rdcstr and const
  char * when going through interfaces. In the OS specific layer this is rarely
  an issue because most of the implementations don't convert to rdcstr, but it
  is convenient to be able to pass in an rdcstr directly. The few cases where
  there's an unecessary construction of an rdcstr is acceptable.
* A couple of places in the public API need to return a string from a global
  function, so can't return an rdcstr due to C ABI, so they still return a const
  char *.
* Similarly const char * is kept for logging, to avoid a dependency on rdcstr
  and because that's one place where unnecessary conversions/constructions may
  be impactful.
2020-12-07 17:44:50 +00:00
baldurk df6fec13f9 Remove use of automodule in docs
* One automodule in a file for our modules is way too much, so we split it into
  files. Unfortunately this means that only one file can have those classes and
  functions be linkable from elsewhere.
* Instead we bite the bullet and manually curate the items into pages, and at
  the same time subdivide the 'enums and data' page more which is a general
  readability and usability win as well.
* We also add some previously not-included functions, and add a doc-build time
  check to ensure that functions and classes aren't omitted from the
  documentation in future
2020-12-07 17:44:50 +00:00
baldurk 8a58ba6843 Allow arrays of pointers in GPU buffers 2020-12-07 17:42:18 +00:00
baldurk 3cd10c9ed0 Disable crash reporting in edge 2020-12-07 16:35:05 +00:00
baldurk 1ab2047ecb Reset state in D3D shader debugging to before draw when fetching UAVs
* Debugging shaders with UAV access could(likely will) have side-effects on
  those UAV contents, so when ContinueDebug needs to fetch UAV contents we
  should replay back to before the draw to fetch them.
* This replay only happens once per ContinueDebug, and UAV contents are cached
  globally so we only do it once per UAV that's accessed, so the impact is low.
2020-12-07 15:41:03 +00:00
baldurk 6803f32ab8 Print a message when stripping android libraries, and keep unstripped 2020-12-05 09:57:40 +00:00
baldurk 6f7e8bb396 Add python interface consistency check that we don't use non-class enums
* These enums are generally not preferred anyway, but they also can't have
  docstrings so can't be checked for *missing* docstrings.
2020-12-05 09:57:40 +00:00
baldurk 170f29ebfa Disable loading LunarG validation layer
* Previously we hinted loading both the old LunarG metalayer and the new
  combined Khronos layer. Since only one was a 'real' layer this was safe and
  would allow us to enable validation anywhere without needing to enumerate
  available layers.
* Unfortunately a new loader version makes it an error to specify the
  VK_LAYER_LUNARG_standard_validation for loading! So it is completely
  impossible to be fully compatible. We have no choice then but to follow the
  loader/SDK's path and have a hard backwards compatibility break.
* This means the validation won't be enabled anymore for anyone on SDK from
  early 2019 and before.
2020-12-05 09:57:40 +00:00
Steve Karolewics 07fce392a6 Fix D3D12 depth targets using the wrong formats in TextureViewer 2020-12-04 09:54:09 +00:00
baldurk e2d47fa1a5 Fix compilation of PythonCaptureViewer 2020-12-03 21:14:13 +00:00
baldurk 60409caf8d Make event selection 'soft' blocking instead of hard blocking
* Normally SetEventID is synchronous and blocking, and will stall the UI while
  it is processing. However we can at least pop up a progress dialog and allow
  the UI to function (if not be interactive due to the blocking progress dialog)
  when some other long-running task is delaying the processing on the replay
  thread.
2020-12-03 15:09:29 +00:00
baldurk 6bc4e007a0 Fix C++ invokes being responsible for destroying python callbacks
* If the last refcount on a python lambda/temp function is released when a
  wrapping std::function is destroyed in a C++ invoke, we can't destroy it
  safely. Instead we queue up that decref and process it the next chance we're
  able (which is either when the current execution finishes for a python shell
  execution, or on the next function call which handles extensions).
2020-12-03 14:55:02 +00:00
baldurk 0d1f6e3940 Add helper to invoke back onto the UI thread from the replay thread 2020-12-03 14:17:42 +00:00
baldurk a8a40ca3d6 Add the ability to create spacers, for better layouts 2020-12-03 13:24:56 +00:00
baldurk a176849962 Add some new helpers for managing widgets 2020-12-03 11:24:39 +00:00
baldurk b69ca4526e Log the specific error if vkCreateInstance fails in demo program 2020-12-03 10:59:05 +00:00
baldurk 1e1ac07a07 Allow python scripts to implement and register as ICaptureViewer classes 2020-12-03 10:44:27 +00:00
baldurk 1a0df46f62 Fix issue selecting indirect draw sub-command in draw with count=1 2020-12-02 17:44:47 +00:00
baldurk b52713d55d Fix issue with wholeMemBuf not covering whole allocation sometimes
* When we use the wholeMemBuf from a dedicated allocation it may actually be
  smaller than the whole allocation, and we need to be careful not to overuse
  it. Keep a separate size for wholeMemBuf which can shrink if the buffer is
  smaller.
2020-12-02 17:44:47 +00:00
baldurk f38c4c366d Add a ctrl+enter shortcut in capture dialog to launch the capture 2020-12-02 17:44:47 +00:00
baldurk 806d6fce2a KHR_buffer_device_address is fixed in AMD driver 20.11.3 2020-12-02 17:44:46 +00:00
baldurk 9610919c16 Fix copy-paste of rich resource text
* We need to cache to the QString text on demand, which requires a context
  potentially sooner than paint/etc time.
2020-12-02 17:44:46 +00:00
Aliya Pazylbekova 1b9cd082bd Fix UUID copy for AMD markers for non-Windows
For non-windows size of unsigned long is 8, so copy the UUID in split
fashion.
2020-12-02 10:56:07 +00:00
baldurk 8628f95b9f Expire pointer aliases in SPIR-V debugging when Ids go out of scope 2020-11-30 13:00:05 +00:00
baldurk 8d14408f09 Fix header being incorrectly renamed on linux installs 2020-11-30 13:00:05 +00:00
攻伤菊菊长 34bf107ac2 Implement support for SPV_GOOGLE_user_type
For debugging vulkan shaders generated by dxc
2020-11-30 11:23:25 +00:00
baldurk ced7fc70cd Bump version to 1.12 2020-11-27 17:32:26 +00:00
baldurk c5480aa622 Add some simple protection against binding bad GL texture handles v1.11 2020-11-27 15:57:25 +00:00
baldurk 949cff30a2 Add some Qt python interfaces not included in docs 2020-11-27 14:30:01 +00:00
baldurk 6c26562201 Remove duplicate documentation entry for GlobalEnvironment 2020-11-27 14:19:33 +00:00
baldurk c27c714677 Fix compilation on stable builds 2020-11-27 11:08:06 +00:00
baldurk 16b2ccc670 Fix preprocessing empty filenames in #line statements 2020-11-27 09:50:35 +00:00
baldurk b8f7029d59 Refactor chunk-allocator to two level pool and allocator
* This fixes a bug with granular command buffer resetting. On vulkan we assume
  each command buffer owns the entirety of the pages it uses, so they can be
  reset all together. However there's nothing to stop an application from
  allocating from the same pool on the same thread interleaved to two command
  buffers. It's unexpected because of the threading rules but perfectly legal.
* In this case we need to ensure that the command buffers have disjoint sets of
  pages because they may not be reset together and one may be in used while
  another is reset and even re-recorded over. This can't be achieved with a
  single allocator, so instead we split the pool (that owns/provides/frees
  pages) from the allocator (that grabs whole pages and suballocates for
  chunks).
2020-11-26 11:39:28 +00:00
baldurk 593a903cf1 Enable sRGB framebuffer immediately on GL output window 2020-11-26 10:26:37 +00:00
baldurk 3f394aa5df Handle multiple pages in a row being too full
* When resetting pagesets in a granular fashion from the chunk allocator, it's
  possible to almost (or completely) exhaust a page but not have it be bumped
  out of the free list, then one more new full free pages is pushed. When that
  free page is exhausted we'll retire it then assume the next one is usable -
  but it is still not valid. We need to loop until we find a page with enough
  space.
2020-11-25 16:56:16 +00:00
baldurk ecafa4f129 Tweak lock order to avoid a deadlock during capture
* During capture we hold the transition lock for writing, so we need to try to
  lock that first (if we're going to) before locking the queue's lock. Otherwise
  another thread could come in and get the queue's lock while we're holding the
  transition lock, then we deadlock against each other.
2020-11-25 14:06:35 +00:00