Commit Graph

45 Commits

Author SHA1 Message Date
baldurk 1b88a39339 Optimise tree widget clearing and child adding by batching updates
* This takes a nice chunk of time off the pipeline state view in
  particular when changing between events.
2017-08-21 17:14:21 +01:00
baldurk 981436b75f Don't pass around string name of ResourceFormat, request it when needed 2017-08-18 19:37:16 +01:00
baldurk 4c24b0f28f Remove use of ToQStr to convert rdctype::str to QString 2017-08-18 14:13:22 +01:00
baldurk 86a9d70bb7 Only remover disassembly toolbar when debugging, not when viewing shader 2017-08-03 17:57:21 +01:00
baldurk 9878223839 Don't allow displaying non-debuggable disassembly forms when debugging 2017-08-02 15:30:58 +01:00
baldurk d57cc1b188 Add more consistency to docking panels and widgets
* Dock panels shouldn't have any frame border or anything like that.
* They should have an external margin of 3 pixels at their border,
  but then no further margins on the layouts (like sub-controls for
  the pipeline state views.
* Toolbars should be Raised & Panel frames. Later we'll replace them
  with actual QToolBars to better customise the painting.
2017-07-28 19:06:46 +01:00
baldurk 13bf08a99e Remove disassembly from shader reflection, request it on demand 2017-07-05 16:31:44 +01:00
baldurk bdf2a68c71 Add shader's ID and entry point to the shader reflection struct
* This allows better identification of a shader from its reflection
  bundle. The entry point was already 'optionally' in the debug info
  struct which is no longer a great location for it.
* For APIs where the entry point isn't contractual and it might not be
  listed, instead we just fall back to 'main'. This means that the UI
  or anyone fetching the info can be guaranteed that some sensible entry
  point will be listed.
* Also for the debug info, remove the 'entryFile' index and instead just
  guarantee that as much as possible the entry point will be in the
  first file in the list.
2017-07-05 16:29:26 +01:00
baldurk 6ea2358d60 Remove an errant debug print 2017-06-21 21:14:57 +01:00
baldurk d44528794a Change qrenderdoc icons to Farm-Fresh, to add high-DPI versions. 2017-06-19 16:17:20 +01:00
baldurk efe105a203 Remove TODO for implemented feature 2017-06-16 23:07:50 +01:00
baldurk ab96b05b53 Remove mistaken double assignment 2017-06-09 19:38:23 +01:00
baldurk f6399609f9 Add headers for mouse and key events being used 2017-06-09 19:36:46 +01:00
baldurk 1574103613 Add click-to-highlight for registers 2017-06-09 17:57:33 +01:00
baldurk 0cfa8c1eb9 Add variable tooltips to the shader viewer showing float/int/uint values 2017-06-09 17:04:23 +01:00
baldurk 2da46640d0 Add watch variables handling to qt shader viewer 2017-06-09 12:06:57 +01:00
baldurk 199c26adbf Put the MainWindow in charge of handling 'global' type shortcuts
* QShortcut falls down on duplicates. It can have activatedAmbiguously
  events, but these happen in arbitrary order and the shortcuts on
  menu items just swallow the ambiguous activate so it's not useful.
* Instead we just let MainWindow pick up ShortcutOverride events and
  consult a mapping of which shortcuts to use. We can use a smarter
  selection method to choose the more 'local' shortcut if two shortcuts
  that conflict exist.
2017-06-08 18:23:10 +01:00
baldurk 59977e47de Use GLSL highlighting for now on vulkan source files
* Later we should pipe through the source language from the SPIR-V and
  use that instead, for the other APIs it's just trivially HLSL/GLSL.
2017-06-01 11:28:38 +01:00
baldurk c7fb05744c Always display full tabs for file scintilla docks in shader viewer 2017-06-01 11:28:36 +01:00
baldurk 158bc4d583 Update code for new toolwindowmanager 2017-05-29 13:31:28 +01:00
baldurk 79a61c5700 Disallow docked panels in a shader viewer from becoming float windows 2017-05-19 14:44:32 +01:00
baldurk f6cef9ea4a Don't setFont(Consolas) - it's windows only. Fix monospace for scintilla 2017-05-17 15:55:42 +01:00
baldurk a6c77b5dee Give little tag structs unique names so we don't violate the ODR 2017-05-15 10:11:56 +01:00
baldurk ab432f24fc Implement the UI option for preferring monospaced font 2017-05-04 20:36:46 +01:00
baldurk 0b868e45c0 Explicitly set a fixed-width font for scintilla editors 2017-05-04 20:36:46 +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 9e5736f03e Add context menu popup for disassembly in shader debugging 2017-04-27 19:47:50 +01:00
baldurk a7e58ae5f6 Fix a broken loop condition 2017-04-27 19:47:50 +01:00
baldurk dd2f6eb88a Don't delete objects allocated in renderdoc module outside it. 2017-04-27 19:47:49 +01:00
baldurk 605fd4dcc5 Use single QVariant tagging on RDTreeWidgetItem instead of setData
* It saves on allocating a vector of vectors and in most cases is all we
  need.
2017-04-21 18:45:12 +01:00
baldurk f65f5ea9da Use new RDTreeWidget everywhere in favour of QTreeWidget
* Since we're promoting everything, we reset the behaviour of
  RDTreeWidget so that it's not doing anything different by default.
* RDTreeWidget's interface is a bit different, exposing some useful
  things like a single selected item and so on.
* We also can't set columns in the Qt Creator UI anymore, so we set them
  from code.
2017-04-21 18:44:52 +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 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 8177776422 Add snippets menu for writing custom shaders 2017-02-16 17:10:07 +00:00
baldurk fa04d5a72e Add a find/replace tool for use with Scintilla 2017-02-16 17:10:07 +00:00
baldurk 9cf9c1e8b1 Add file list to shader viewer when enough files are visible 2017-02-14 19:14:53 +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 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 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 b428dfd139 Only use base filename, not full path 2017-01-25 12:44:57 +00:00
baldurk 3b7eaaa4fb Set titles for source file tabs in the shader viewer 2017-01-25 12:44:41 +00:00
baldurk 7ef73f92ef Add shader viewer (view only - not edit/debug) using Scintilla widget 2017-01-23 19:09:29 +00:00