Commit Graph

29 Commits

Author SHA1 Message Date
baldurk 82a0e055ba Change how replay programs are identified, from filename to sym export
* Instead of checking on the filename, we look for a specially named
  exported symbol somewhere in a module that's already loaded.
* This allows us to mark the python module as a replay program, so if
  it's loaded into the python interpreter it will be able to use the
  replay API.
2017-08-31 18:34:19 +01:00
baldurk 00e06d8ff1 Make display rendering colours theme-aware.
* In particular this removes hard-coded checkerboard colours that don't
  look right on dark themes.
2017-08-28 18:50:17 +01:00
baldurk cfd816d7f3 Enable RDStyle by default, add style selection in the settings dialog 2017-08-16 17:39:37 +01:00
baldurk ee67b85b58 When we hit an exception, pass the line number of the top-of-stack
* This allows us to update the current line highlight before stopping.
2017-08-03 17:57:24 +01:00
baldurk d44528794a Change qrenderdoc icons to Farm-Fresh, to add high-DPI versions. 2017-06-19 16:17:20 +01:00
baldurk 25f18defd4 Use a qt.conf to point plugins at qtplugins/ in the application path.
* We can point the platform plugins path at the application dir for
  qwindows.dll for example, but there's no equivalent for image format
  plugins which we need for qsvg.dll. So instead we shove them all under
  an explicit qtplugins path.
* Also now that we have this, copy qsvg.dll into the distribution.
2017-06-13 14:56:40 +01:00
baldurk 27ae30aaa3 Print messages to Qt logger from command line python scripts 2017-06-09 16:56:47 +01:00
baldurk 0f8e3ce452 Send DeferredDelete events explicitly in our main event loop
* It's not entirely clear if this is the intended fix, but otherwise
  since we're not running QApplication::exec() the main event loop has
  the same 'loop level' of 0 as the event level when it's fired. The
  proper functioning seems to be that the posted deleteLater event
  should have an event level of 1 which then means it will be processed
  when coming back to the exec() loop level of 0, but since we don't get
  that, just run it manually after all other events.
2017-06-01 11:28:36 +01:00
baldurk 3ab7510c7f Avoid calling XOpenDisplay multiple times, fixes crashes on Intel Mesa
* See https://bugs.freedesktop.org/show_bug.cgi?id=99831
  https://bugs.freedesktop.org/show_bug.cgi?id=54971
* It's not clear if it's invalid to call XOpenDisplay more than once but
  at the very least it's only really used as convenience to avoid
  plumbing the display handle through.
2017-05-30 12:02:00 +01:00
baldurk 5b74b66493 Don't construct a QFont globally (as a class static)
* It causes a crash when Qt is statically linked.
2017-05-18 15:05:03 +01:00
baldurk c854294dc8 Add calls to XInitThreads() to allow driver multithreading optimisations 2017-05-05 16:45:29 +01:00
baldurk 0ecc6ca877 Enable QT_NO_CAST_FROM_ASCII & QT_NO_CAST_TO_ASCII
* Added a couple of utility macros to help with the conversion. lit() is
  paired with tr() for untranslated text.
* QFormatStr is more explicitly for non-textual formatting strings.
* Both are just #define'd to QStringLiteral()
2017-05-02 22:58:12 +01:00
baldurk 6f4784d638 Add a command line parameter (--py / --python / --script) to run scripts 2017-04-19 18:03:20 +01:00
baldurk ab41f1ec6a Change python global init/shutdown order to be safe vs running contexts
* If a window (like the PythonShell) owned a context and only stopped it
  on destruction, it would be destructed after the global shutdown
  destroyed the interpreter.
2017-04-18 14:57:49 +01:00
baldurk 094c4164dc Refactor qrenderdoc to provide stable, clean and deliberate API
* Note, this API is still in-flux and beta, so there may still be some
  more changes before it's 'stable', and even then it will still be
  subject to some amount of change.
* This API is then exposed to python via SWIG bindings and hides
  internals that don't need to be visible, and means the actual API is
  easier to work with.
* We also use this API to reduce inter-dependencies between different
  windows that need to interact with each other at a high level.
* The naming is python/standard RenderDoc TitleCase method names, not
  Qt style camelCase methods.

# Conflicts:
#	qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp
#	qrenderdoc/Windows/TextureViewer.cpp
2017-04-18 14:57:43 +01:00
baldurk cb510298d8 Add wrapper around tracking a python context and executing scripts 2017-04-18 14:57:41 +01:00
baldurk d40fc8471d Change API enums to enum class, remove now redundant prefixing
* This gives a little nicer syntax, a bit better type safety, and also
  reflects better for SWIG bindings. Overall it's a minor change but
  better.
* We don't update the C# UI at all, since it's soon to be removed and
  not worth the effort/code churn.
* For now so we're ABI compatible with C#, all enums are uint32_t, but
  that is an obvious optimisation in future to reduce struct packing.
* We avoid 'None' as an enum value, because it's a reserved word in
  python so will cause problems generating bindings.
2017-04-18 14:57:33 +01:00
Peter Gal 588eb083db Remove obsolete workarounds to force shared library linking
As the --no-as-needed linker option was added there is now
no need to force link to GL/EGL shared libraries via
extern methods.
2017-04-17 02:39:29 -07:00
baldurk 8ff3ee93b5 Copy libGL force-inclusion hack from renderdoccmd to qrenderdoc
* Normally Qt uses libGL dynamically so this isn't an issue, but if Qt
  is statically linked then we need this.
2017-02-22 17:17:15 +00:00
baldurk f416f4770e Implement UI side of detecting vulkan layer problems and fixing as admin
* Stub functions for the actual detection/fixing part.
2017-02-14 19:14:53 +00:00
baldurk f8ed197318 Add static resources collection with pre-constructed QPixmaps & QIcons
* Apart from making the code cleaner when accessing them, creating these
  from strings can be slow if you do it often enough (e.g. once per
  resources for action/action_hover in pipeline state view).
2017-02-13 19:20:22 +00:00
baldurk 7c422e3651 Add Load/Save functions around Deserialize/Serialise in config
* This lets us do some processing before saving and after loading
  regardless of the path the load/save takes.
2017-02-09 19:28:21 +00:00
baldurk cf1ef45a5e Add settings dialog for Qt 2017-02-03 20:11:06 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 614c15d669 Create config path if it doesn't already exist 2016-11-11 20:35:59 +01:00
baldurk cff5da63eb Cache method index for GUIInvoke invokes to avoid string compares 2016-11-09 19:13:22 +01:00
baldurk 27f1aa71a6 Use absoluteFilePath() when the filename is needed in the path 2016-11-09 18:34:08 +01:00
baldurk bb2f3a205c Move common Qt utility functions & JSON I/O together in a single place 2016-11-09 13:23:53 +01:00
baldurk 2d4c79b244 Rename main.cpp to qrenderdoc.cpp to be more clear 2016-10-07 19:51:06 +02:00