274 Commits

Author SHA1 Message Date
baldurk 14dc2a57f6 Fix refcounting on python traceback object 2020-03-06 17:56:27 +00:00
baldurk 7d4685fc17 Fix exception catch-and-rethrow in extension BlockInvoke. Closes #1721 2020-02-13 11:01:45 +00:00
baldurk 661ee35f30 Refactor ShaderDebugTrace to not return a single list of complete states
* The ShaderDebugTrace now only sets up the initial state of an opaque
  ShaderDebugger handle.
* This handle can then be passed to a new function - ContinueDebug - to
  iteratively return N more states. The number of states is implementation
  defined and may be a fixed number or it may run for a fixed time.
* The states themselves no longer contain a complete snapshot of all variables,
  but instead only the changed variables for that iteration. The changes are
  stored as before and after value to make it easier to step forwards and
  backwards (only the ShaderDebugState is needed to move forward or backwards,
  you don't have to search back for the last set value of a variable to 'undo' a
  change).
2020-02-06 17:58:42 +00:00
baldurk 66cebe0a4c Refactor shader debug trace to have single mutable variable array
* Moving away from 'registers' explicitly being stored, we now have a single
  variable array where the shader representation is responsible for allocating
  it.
* In DXBC we calculate the number of each type of mutable variable (temps,
  indexable temps, and outputs) and assign slots linearly.
* We also update some naming - high-level variables aren't "locals" since they
  could be globals too, and debugging variables aren't "registers" but simply
  the variables we use for debugging which may be more complex than float4 for
  other APIs.
* The local variable matching by string name is unnecessary for this change
  but will be more useful in future after further refactors where there isn't
  a single list of variables to index into at the upper level.
2020-02-06 17:58:41 +00:00
baldurk c43d9146a9 Use globbing to get dependencies for swig builds
* Fixes a warning in VS2019 from stale warnings and should mean rebuilds are
  more accurate too.
2020-01-06 16:25:34 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 93b0d65726 Override new/delete for structured data objects to go through our allocs
* Otherwise if structured data cross a module boundary the (de)allocation could
  fail.
* We also ban new/delete for structs that don't need it
2019-12-17 14:51:11 +00:00
baldurk 14d01ff995 Remove support for serialising STL types, remove STL interop 2019-12-16 18:10:32 +00:00
baldurk 25536836b6 Split up renderdoc_replay.h header further 2019-12-16 17:06:15 +00:00
baldurk ec7a852582 Refactor and improve rdcarray/rdcstr interface
* We are going to replace all std::string/std::vector use with these.
2019-12-16 17:06:15 +00:00
baldurk 8e21b28785 Split basic_types.h into separate independent headers 2019-12-16 17:05:11 +00:00
baldurk 6d1d302491 Fix a number of warnings identified by higher clang warning levels
* We enable a couple of high signal-to-noise warnings in all clang builds
2019-12-02 20:41:28 +00:00
baldurk ff08748238 Ensure all files have trailing new-lines and enforce with clang warning 2019-12-02 20:28:05 +00:00
baldurk e205054317 Add UI support for GPU typed pointers in buffers 2019-11-29 13:53:44 +00:00
baldurk 8b7d23cba1 Rename SDObjectData::str member in python, to avoid confusion
* Although it's legal, the language type is 'str' so this could cause
  namespacing issues potentially
2019-11-12 20:44:35 +00:00
baldurk e9dda8343f When deleting temp files, remove from the recent file list. Closes #1540
* If the UI was launched with a filename as a parameter to open the capture, it
  will be added to the recent capture file list. Only later (relatively
  speaking) if we make a capture connection will we realise that it is temporary
  and potentially delete the file. If we do so, remove the capture from the
  recent file list.
2019-10-10 16:48:42 +01:00
baldurk c67995b85a Make it easier to run tests from within UI 2019-09-20 11:20:45 +01:00
baldurk 6d40bbb783 Add experimental wayland support. Refs #853
* This is only lightly tested and may break heavily. It is disabled by default
 and must be explicitly enabled.
* In particular this is only known to work for Wayland use at capture time.
 Wayland on replay is still unsupported. Known issues include: EGL pbuffer
 surfaces are not implemented on Wayland, Wayland cannot get window dimensions,
 and there are hangs/failures with GL and vulkan presentation with Wayland.
2019-09-02 15:02:27 +01:00
baldurk 878acd4ad9 Add a function to enumerate which GPUs are available at replay time 2019-08-27 18:51:56 +01:00
baldurk e2704fa2eb Add an abstracted interface around android-specific handling
* This makes it easier to use the same kind of interface to manage other kinds
  of devices.
2019-07-31 17:51:13 +01:00
baldurk 06f2e61b8f Refactor RemoteHost to be copyable with shared storage
* This allows RemoteHost handles to still be valid and usable (if returning
  empty data) when they are deleted/removed if the device is disconnected, as
  well as providing better multi-thread access (they lock internally)
2019-07-31 17:51:12 +01:00
baldurk e48065c96b Replace use of std::pair with rdcpair wherever possible
* Only remaining uses in our code is when we're interacting with std::map where
  it uses std::pair internally
2019-05-17 16:32:56 +01:00
baldurk 699f8753af Convert ToStr, Serialise, and TypeName to use literal strings 2019-05-15 14:12:17 +01:00
baldurk a9a64242f6 Don't crash if python output happens without a stack frame
* This can happen if SyntaxWarning message are printed during parsing before
  execution.
2019-04-16 19:33:57 +01:00
baldurk 72d3c0ee3e Set 'pyrenderdoc' global after extension registration. Closes #1291 2019-03-01 08:32:35 +00:00
baldurk 852d345bf7 Save the queued frame capture settings with settings files 2019-02-07 15:23:07 +00:00
baldurk fbb6b23b23 Support advanced cbuffer layouts
* This includes 8/16/64-bit integers, 16-bit/64-bit floats, and scalar block
  packing
2019-02-07 15:23:06 +00:00
baldurk 6d07e1c42e Add support for VK_EXT_discard_rectangles 2019-02-05 18:40:31 +00:00
baldurk 354b37be56 Add support for VK_EXT_sample_locations 2019-02-05 18:40:31 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk 7860bee811 Make sure to fail if errors are found in python interface method naming 2019-01-03 12:22:28 +00:00
tabi.katalin 6c39b58d0b Handle failed APK installation and patching
If "adb install" command is used with "-g" flag, we may get java.lang.SecurityException on some devices because granting runtime permissions at installation time is only allowed for system apps (however we can enable it in the device's Developer options menu).
Also, pulling APK from /data/app/ may be restricted. We can workaround by copying the APK to a directory which we can access then try to pull the APK from there.
2018-11-13 11:38:44 +00:00
baldurk 67ba5f3ed1 Split extensions interface into separate header, add dialog box helpers 2018-10-24 12:22:54 +01:00
baldurk e437919e78 Linux compile fixes 2018-10-23 19:11:22 +01:00
baldurk 1720d321e5 Set general global handle for extension registration work
* When calling the register() function there is no frame or globals, so we need
  to set an internal handle external to that.
* This means functions that get wrapped know that there's a global handler for
  exceptions, which just prints to the log. Otherwise they think they're running
  synchronously and write to an invalid exception handling object.
2018-10-23 15:36:35 +01:00
baldurk 94dfb9890b Allow registering window, panel and context menu items with callbacks 2018-10-23 14:23:12 +01:00
baldurk 67fc971cd9 Add a dummy pass-through conversion for already converted python objects 2018-10-23 14:23:12 +01:00
baldurk dd3a352408 Add registration and loading of extensions through a management window 2018-10-23 14:23:11 +01:00
baldurk 2dd293d691 Add the ability to load/reload global python extensions 2018-10-23 14:23:11 +01:00
baldurk 9e6a5e692e Keep a reference to python function object in wrapped lambda
* This will rarely be relevant, but it ensures if the function is decref'd and
  the lambda is still alive, that we keep the python object alive until we are
  done with it. The primary case for this is persistent callbacks where the
  module is then reloaded.
2018-10-23 14:23:10 +01:00
baldurk 58de3fa8a5 Walk stackframe to find _renderdoc_internal
* When calling functions in modules, the globals are namespaced to the module
2018-10-18 19:36:21 +01:00
baldurk 21a7584c40 Don't import built-in renderdoc modules with prefixed underscores
* This prevents any modules loaded from doing 'import renderdoc' and having it
  work as expected.
2018-10-18 19:16:25 +01:00
baldurk b5854f0fec Implement VK_EXT_transform_feedback, and use it for mesh output
* For pipelines using tessellation or containing a geometry shader we use
  transform feedback to fetch the output of the vertex pipeline after these
  stages.
2018-10-16 16:53:03 +01:00
baldurk 1210f1fd42 Add pipestate.h to swig interface dependencies 2018-10-16 16:26:22 +01:00
baldurk 94496e0e2a Support copying structured lists to each other in python
* This requires a copy otherwise object lifetimes are wrong.
2018-09-20 12:35:37 +01:00
baldurk 9bf00cb1a6 More natural python handling for GetDefaultCaptureOptions, return struct 2018-09-18 18:01:28 +01:00
baldurk babe36bf7e Preserve stdout/stderr from external shader tools and display to user 2018-08-15 13:40:21 +01:00
baldurk 3c7b420e59 Expand SPIR-V disassemblers to general shader processing tools
* Instead of just configuring SPIR-V disassemblers and picking only the first
  one when we need to edit SPIR-V, we allow setting up any shader processor that
  goes between two shader encodings.
* When editing, the default will still be to use embedded source, and then after
  that the first tool that goes from the native shader format to a text format,
  but the drop-down allows you to pick any of them.
* Similarly in the shader viewer you can configure the compilation options and
  method, to choose the compiler you want to use. Embedded command line
  parameters in the shader are automatically appended.
2018-08-09 16:56:53 +01:00
baldurk a4dfad6e82 Add a backend query to check shader encodings BuildTargetShader allows
* This will allow the backend to specify both the native format (e.g. SPIR-V,
  DXBC) as well as a language it might be able to internally compile (GLSL or
  HLSL).
* The caller will then able to decide for itself whether it wants to compile to
  native format and pass that down, or pass the language down and let it be
  built internally.
* Currently BuildTargetShader still only accepts shader source.
2018-08-09 16:56:51 +01:00
baldurk 06d14ff62b Define safe comparisons for python bindings
* In particular this means that it's safe to compare a ResourceId or similar
  against None. It is always not-equal but it's useful to have the comparison
  work and return the expected result instead of throwing a null reference
  exception.
2018-07-06 22:44:17 +01:00