Commit Graph

6518 Commits

Author SHA1 Message Date
baldurk 2651ef3185 Serialise memory requirements in vulkan with vkCreateBuffer/CreateImage 2017-11-24 18:14:24 +00:00
baldurk e2cea3d302 Set settings dialog text edits when a file is browsed to 2017-11-24 18:14:24 +00:00
baldurk 4ff439ed79 A couple of improvements to convert cmd, fail if format isn't explicit 2017-11-24 18:14:23 +00:00
baldurk cba76414e1 Add exporter for Chrome's trace profiler from chunk metadata. 2017-11-24 18:14:23 +00:00
baldurk e08e5f0692 Move some common chunks into SystemChunk from API Chunks
* This makes API-agnostic processing over strucutred data a *little*
  easier. At least it's possible to differentiate initialisation from
  frame capture chunks.
2017-11-24 18:14:23 +00:00
baldurk 15ddb868e1 Record chunk thread IDs, timestamps and durations 2017-11-24 18:14:23 +00:00
baldurk 83c16094db Fix mistake in Unmap serialisation overwriting record data for buffers 2017-11-24 18:14:23 +00:00
baldurk 1b0fafc872 Fail out of chunk serialisation if API calls fail
* For a few primary cases, we check to see if the API call failed (or is
  looking like it will fail, in the case of vulkan) and bail out. This
  will cause the capture to fail to load.
2017-11-24 18:14:22 +00:00
baldurk ef8d834636 Allow NULL in glClear*Buffer and glClear*Tex functions
* The spec says that if data is NULL, it acts like a buffer filled with
  zeroes, so we can just memset.
2017-11-24 18:14:22 +00:00
baldurk 1a879a261b Check for serialisation success in chunk serialise functions
* In each function, we check that serialisation succeeded before going
  on to actually call into the API. If something went wrong, then we
  bail out and fail to load the capture.
2017-11-24 18:14:22 +00:00
baldurk f7816eb32e Use ToStr for HRESULT/VkResult printing 2017-11-24 18:14:22 +00:00
baldurk 7c11557abd Refresh the texture list when a capture closes, to clear it out. 2017-11-24 18:14:22 +00:00
baldurk 01e2e00b5f Add error checking and handling while loading captures
* Previously once we started loading a capture we'd blindly continue
  until we loaded it (and then it's assumed to be successful), or we
  crash.
* Now errors can be reported during serialisation and bubbled up to
  abort the file load process. The next steps are to add error checking
  in each function serialise before doing any replay calls to the API
  with potentially corrupt data, and on top of that catching API-only
  errors when the serialisation is (seemingly) fine, and propagating
  those in a reasonable way.
* We also harden the serialisation a bit so that if it reads an
  obviously invalid byte length for a buffer or array count, it won't
  continue. It's still not perfect as the sizes could still be large and
  invalid but within range, but it should catch the worst cases.
2017-11-24 18:14:21 +00:00
michaelrgb 2349fe4c05 Android replay load EGL symbols from libEGL.so instead of RTLD_NEXT.
For GLES only get symbols from eglGetProcAddress and not dlsym,
to prevent getting GL symbols.
2017-11-24 19:14:09 +01:00
baldurk 6345fa2803 Fix mistaken pre-declaration as class instead of struct 2017-11-23 00:50:24 +00:00
baldurk 286e117d56 Add headers needed for compilation without PCH
* Removing includes of Code/CaptureContext.h removed some dependencies.
2017-11-23 00:20:01 +00:00
baldurk 5564e8b263 Open shader source from resource inspector 2017-11-22 19:11:28 +00:00
baldurk c084778e0a Report GCN ISA targets always, even if AMD_shader_info is available 2017-11-22 19:11:27 +00:00
baldurk 602511bf33 Reduce parameters that need to be passed for viewing shaders 2017-11-22 19:11:27 +00:00
baldurk 38acc56084 Unregister shortcuts when closing windows that registered shortcuts
* This prevents leaking for cases where new widgets are created (and
  the small chance a widget pointer could be re-used and cause serious
  problems), and multiple-registration errors for global shortcuts.
2017-11-22 19:11:25 +00:00
baldurk cadc0f3855 Fix issue chaining RDTreeWidgetDelegate onto RDTreeViewDelegate
* We need to inherit to chain these two, as otherwise when the tree view
  delegate calls sizeHint() it passes to the tree widget delegate, but
  then has no way to return back to the tree view for the overridden
  initStyleOption.
* If there was a built-in way to chain delegates like styles (which
  solve this problem by calling back to baseStyle when going from one
  function to another), or better yet a way to avoid the base
  QStyledItemDelegate initStyleOption from completely trampling all over
  the option passed in to any function, this wouldn't be necessary.
2017-11-22 19:11:24 +00:00
baldurk 1fcc41effa Allow arrow keys for proper navigation of itemviews in RDStyle 2017-11-22 19:11:24 +00:00
baldurk 6f2a9b6cc3 Render thumbnails after main viewport is drawn.
* This doesn't make any difference really locally, but when using a
  remote host for replay, it means the main viewport will update before
  the thumbnails wait for those textures to transfer.
2017-11-22 19:11:23 +00:00
baldurk 725337df26 Clarify some iterator checks (where asserts were used before)
* Reported by Coverity Scan - mostly this is just adding error checking
  where there was previously just an assert before a use of an invalid
  iterator.
2017-11-22 19:11:23 +00:00
baldurk 74e25673d2 Fix some integer sign extension/potential overflow issues.
* Reported by Coverity Scan. In all cases, should not be a problem, but
  with an upcast happening anyway we might as well ensure calculation
  happens at a higher precision.
2017-11-22 19:11:22 +00:00
baldurk 43d561a4c0 Fix NULL checking and NULL dereferencing issues
* Reported by Coverity Scan - most of these are not an issue and a
  couple of them are coverity getting really confused (like seeing a
  pointer being assigned to NULL and a count to 0, then a few lines
  later declaring that a loop 0..count will dereference the pointer).
* However it's harmless in all cases to add a bit of robustness to keep
  the analysis happy.
2017-11-22 19:11:21 +00:00
baldurk e75a468d3c Remove direct include of Code/CaptureContext.h in almost all files
* This is a leftover from before the interface was hoisted out, and most
  windows were still calling directly to CaptureContext instead of via
  the public ICaptureContext interface
2017-11-22 19:11:20 +00:00
baldurk 203f6b5255 Silence some warnings about casting from one enum type to another
* Reported by Coverity Scan - I don't think any of these were actually
  a problem since the enum definitions all matched.
2017-11-22 19:11:19 +00:00
baldurk 3e95356d9b Fix a mistake check on string::find not comparing against string::npos
* Reported by Coverity Scan
2017-11-22 19:11:18 +00:00
baldurk 2514ad4126 Remove some dead code that's no longer needed
* Reported by Coverity Scan
2017-11-22 19:11:18 +00:00
baldurk e4555e0d53 Fix a mistaken value-copy
* Reported by Coverity Scan
2017-11-22 19:11:17 +00:00
baldurk 7a122ac592 Fix some inherited class destruction issues
* Reported by Coverity Scan as non-virtual parent class destructors, but
  the fix didn't need to add virtual functions.
2017-11-22 19:11:16 +00:00
baldurk 9fe7acb20f Fix some possible out of bounds access
* Reported by Coverity Scan
2017-11-22 19:11:15 +00:00
baldurk 9e5cfa8b96 Add safety to satisfy Coverity on some errors that are likely impossible
* Reported by Coverity Scan
2017-11-22 19:11:14 +00:00
baldurk 25ea14c965 Fix possible division by zero in edge cases
* Reported by Coverity Scan
2017-11-22 12:05:59 +00:00
baldurk 7ec2c79e86 Fix conditional branches on 'constant' values
* Reported by Coverity Scan
2017-11-22 11:59:18 +00:00
baldurk 4c67de2995 Fix copy-paste errors reported by Coverity Scan 2017-11-22 11:50:37 +00:00
baldurk c860d8baa3 Fix uninitialized variable warnings from static analysis
* Reported by Coverity Scan
2017-11-22 11:31:07 +00:00
baldurk 05d7ae9fec Update QProcessInfo files to 9aecbbe2c45dd259c50b70b52d1386f7592bf0ad 2017-11-22 11:17:49 +00:00
baldurk a738c7726a Compile fixes on linux 2017-11-21 22:32:39 +00:00
baldurk e0fe401ca5 Add extra elements to pipeline viewer to display hidden state objects
* For example state objects on D3D11, or render pass on Vulkan.
* These are all properly resource-linked.
2017-11-21 19:10:35 +00:00
baldurk bfe7742bc8 Add resource details for the default FBO (FBO 0) 2017-11-21 19:10:34 +00:00
baldurk 1f9a2e340c Add an extra minimum size hint, since Qt behaviour is broken by design
* The Qt behaviour is that if you call setMinimumSize on a widget, then
  the minimumSizeHint is IGNORED. So it is impossible to say "use this
  minimum size, unless the widget wants a higher minimum size".
* So instead we do this ourselves in RDLabel. Sigh.
2017-11-21 19:10:33 +00:00
baldurk 8fb7620678 Don't print 'internally encoded' resourceid, manually fetch ID out 2017-11-21 19:10:33 +00:00
baldurk 41b349e3d2 Get original ID for D3D11 blend state 2017-11-21 19:10:32 +00:00
baldurk 46a79135b2 Pass subpass through to UI 2017-11-21 19:10:31 +00:00
baldurk f65d93cd68 Add support for RichResourceText in RDLabel 2017-11-21 19:10:31 +00:00
baldurk a13902fe2f Make sure RichResourceText never wraps, and just clips instead. 2017-11-21 16:56:46 +00:00
baldurk 17c2eb37ef Accept a const QWidget* in RichResource functions 2017-11-21 16:56:32 +00:00
baldurk bb5ae999f5 Vertically align RichResourceText painting in the centre with margins 2017-11-21 16:55:58 +00:00