Commit Graph

96 Commits

Author SHA1 Message Date
baldurk f6c045f473 Refactor public interface to be less strict C and more python friendly
* Generally this means removing ref out parameters and instead returning
  values. In a couple of cases we will want to avoid copies in future
  either by returning const references (e.g. to the pipeline state which
  is immutable).
* At the same time, some pointless bool return values that were always
  true and didn't indicate errors have been removed. They can be added
  again if an error condition comes back.
* Some free functions still have out parameters as C linkage doesn't
  allow returning user types by value.
* The C# UI still invokes into C wrappers for all the C++ classes, which
  handle taking the return value and doing a copy into an out parameter
  still for compatibility.
2017-04-18 14:57:46 +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 637d4089e2 Rename colour to color in public API code
* Following the principle of least surprise, color tends to be more
  commonly used in APIs and graphics code even outside the USA.
2017-04-18 14:57:37 +01:00
baldurk 0ad5709df3 Remove poorly chosen 'Fetch' prefix from a few data structures.
* This goes all the way back to the first iterations where these were
  the only structures and 'Fetch' referred to them returning data from
  the core code to the UI.
2017-04-18 14:57:36 +01:00
baldurk ce4a99b7b8 Rename ShaderResource::IsSRV to a more generic IsReadOnly property 2017-04-18 14:57:35 +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
baldurk 5f3b75739d Don't try to view buffers with ViewTexture 2017-04-06 11:46:44 +01:00
baldurk 1e65762e93 Process render commands 1 by 1 to allow pre-empting high frequency cmds 2017-02-17 20:16:17 +00:00
baldurk 5a88b280ca Add context menu to BufferViewer to debug vertices, or export data 2017-02-16 17:10:08 +00:00
baldurk 0cc4e6e909 Change some separators not hiding/showing properly in tex viewer toolbar 2017-02-14 19:14:52 +00:00
baldurk a1a3d7dfdb Reset hover/pick swatch back to black when closing a log 2017-02-14 19:14:52 +00:00
baldurk fbae19f622 Add custom shader handling to texture viewer 2017-02-14 19:14:52 +00:00
baldurk 8630f82db3 Update shader viewer to support editing and debugging of shaders 2017-02-10 21:48:50 +00:00
baldurk 354a2707ae Avoid copying large structs, prefer to pass by reference 2017-02-10 21:48:46 +00:00
baldurk 4d8e799a0e Add pixel history window 2017-02-09 23:21:45 +00:00
baldurk 2285b209c3 Access CaptureContext & RenderManager by reference, not pointer
* Neither of these can or should be NULL so enforce it explicitly.
2017-02-09 19:28:24 +00:00
baldurk 0d141b6d7e Add TODOs that were missing in a couple of places 2017-02-09 19:28:24 +00:00
baldurk c5adc7a4ed Use relative paths for 3rdparty headers, don't add to search paths
* Unfortunately scintilla assumes its headers are all in the search path
  so where possible we only add those folders when compiling scintilla
  source, not our own.
2017-02-09 19:28:22 +00:00
baldurk 9e47ed53b5 Move resources.qrc into Resources/ folder 2017-02-09 19:28:22 +00:00
baldurk 477df04072 Make sure we're on a consistent event before calling OnLogFileLoaded
* Certain panels like BufferViewer assume there is a current drawcall
  at startup and not an invalid event ID like 0. Normally the event
  browser is loaded first and sets the event ID, but if it's later in
  the list this will break.
2017-02-01 11:17:56 +00:00
baldurk 9690db525b Add support for raw buffer views (not mesh output) 2017-01-26 23:31:58 +00:00
Alex Smith 6e2fc42cbd qrenderdoc: Show currently selected event in the API inspector
Currently, selecting an event with children (e.g. vkCmdExecuteCommands)
in the event browser will cause the API inspector window to show the
final child event, rather than the event itself. This behaviour makes
sense everywhere else: selecting an event with children shows the state
after all children have completed.

However, for the API inspector, we want to be able see API calls for
the parent event when it is selected rather than those of its last
child, particularly in the case of vkCmdExecuteCommands which may have
other API calls leading up to it.

To allow this, distinguish between the "current event" and "selected
event". For an event with children, the former refers to the last
child, while the latter refers to the event itself. ILogViewerForm now
has two separate event callbacks for when either one changes.

The API inspector now makes use of the selected event, while everything
else continues to use the current event.
2017-01-14 20:23:51 +00:00
baldurk 030cbfde9a Batch update copyright years everywhere 2017-01-06 12:13:31 +00:00
baldurk 45c132ef81 Make sure the texture list frame is never deleted by the tool manager 2016-11-24 19:47:02 +01:00
baldurk 31317451de use ToolWindowManager::raiseToolWindow to show the texture viewer 2016-11-24 19:47:01 +01:00
baldurk 7efc1bc455 Don't delete locked tabs, allow them to be deleted by the toolmanager 2016-11-24 19:47:01 +01:00
baldurk 7cc066abac Fixed some issues setting up array textures slice dropdown 2016-11-24 19:47:00 +01:00
baldurk 31023d7c91 Rename the RightArrow icons to action/action_hover 2016-11-24 19:46:58 +01:00
baldurk 3ebfcfc112 Set fixed-width font in portable way 2016-11-21 17:04:36 +01:00
baldurk 86c9742309 Let capture context manage singleton window panes 2016-11-14 15:20:51 +01:00
baldurk f44970d4ca Refresh event selection after texture output is created 2016-11-14 15:19:24 +01:00
baldurk 097b93ce9c Default to deleting windows from ToolWindowManager when closed 2016-11-11 20:35:59 +01:00
baldurk 1c61b82221 Add stub ToStr copied functions to fix up some implementations
* Eventually the main project's ToStr will move into a header file so
  that we don't have to duplicate any code.
2016-11-11 20:35:59 +01:00
baldurk b843c38bdc Categorise remaining TODOs somewhat 2016-11-09 19:27:44 +01:00
baldurk 5c850ac03a Enable action buttons in texture viewer when log is loaded 2016-11-09 13:24:10 +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 5a243c4b42 Add an implementation of QOverload to avoid depending on Qt 5.6
* Also switch travis to 5.6 so we don't add a dependency on 5.7 by
  accident.
2016-11-07 19:22:56 +01:00
Alberto Taiuti d1e5149527 Fix missing <math.h> header in qrenderdoc for Arch/clang++
Add the <math.h> header to some of the source files for the target
qrenderdoc. The build would not have succeded without these headers
declaration under Arch Linux/clang++.
2016-10-19 18:55:50 +02:00
baldurk 4cd31908b4 Update qrenderdoc for API changes 2016-10-14 19:38:11 +02:00
baldurk d869222eed Linux build fixes 2016-10-12 17:36:35 +02:00
baldurk c5973d1ed6 Add centralised reset function for restoring to clean state 2016-10-12 16:54:14 +02:00
baldurk a601462de0 Set locked tab proprety early so we can pick it up when it activates 2016-10-12 13:24:28 +02:00
baldurk 791599b48c Cache texture lookup and only update whenever it changes 2016-10-12 13:24:14 +02:00
baldurk fbcb04944d Add texture saving dialog 2016-10-12 00:26:15 +02:00
baldurk db5bdbb05e Add range histogram 2016-10-11 18:33:37 +02:00
baldurk ea587608cb Don't allow dropping dockables onto the tabs where textures sit 2016-10-10 18:50:11 +02:00
baldurk 2507634df9 Add filterable texture list to texture viewer 2016-10-10 18:48:38 +02:00
baldurk a1e9554e66 Implement the ctrl-g texture goto popup 2016-10-10 16:41:48 +02:00
baldurk 3bdd631146 Fix scrollbar positions not updating properly 2016-10-10 13:58:15 +02:00
baldurk 3a772f26ce Implement locked texture tabs and partially complete event usage popup 2016-10-10 13:52:00 +02:00