Commit Graph

6538 Commits

Author SHA1 Message Date
baldurk 47f2997ede Use std::is_trivial not std::is_standard_layout for checking memset'able 2017-11-27 21:20:42 +00:00
baldurk 05da25a2d7 Add necessary flushes for stream I/O socket writing tests 2017-11-27 21:20:28 +00:00
baldurk 24ef5807e7 Ignore new append function in SWIG 2017-11-27 20:59:41 +00:00
baldurk 88fb08fe15 Fix silly compile error 2017-11-27 20:57:38 +00:00
baldurk 025b2a2f54 Add delta-encoding for fetching texture and buffer data in replay proxy
* When we need to cache a texture or buffer locally then before this
  commit we'd transfer the whole resource, and re-transfer it every time
  the event changed even if the contents haven't changed.
* Instead now we track the previous contents on both sides, and just
  send a list of deltas to apply.
2017-11-27 20:40:27 +00:00
baldurk 007fa63c89 When re-interleaving depth-stnecil textures on vulkan, copy from map
* On android reading pixel-by-pixel out of the mapped memory is
  *incredibly* slow - taking up to 1.5s for a fullscreen depth texture.
  It's faster to copy to a temporary array, and this shouldn't have a
  huge effect on other platforms.
2017-11-27 20:38:20 +00:00
baldurk 1f12d19fbd Add missing proxy entry for GetShaderEntryPoints 2017-11-27 20:35:14 +00:00
baldurk 7a11d1aa6b Where possible use memset to default initialise types like byte/int/etc 2017-11-27 20:35:00 +00:00
baldurk 47bee80522 A couple of android compile fixes that showed up 2017-11-27 20:34:28 +00:00
baldurk 413a06b299 Change stream I/O behaviour around sockets
* Previously each read and write would 1:1 become a send or recv call.
* Now we buffer writes and send in batch (or when a chunk finishes),
  and every time we read we try to non-blocking read more data to fill
  the buffer, to allow batching reads where possible without blocking
  on data that will never come.
2017-11-27 18:54:19 +00:00
baldurk 53ddb39e19 Add non-blocking recv function to Socket class 2017-11-27 18:50:49 +00:00
baldurk b418a5db6a Flush file after writing header length fixups, to ensure it's written 2017-11-27 12:38:44 +00:00
baldurk 2f2795bbba Add a helper 'append' function to rdcarray, meaning insert(size(), ...) 2017-11-27 12:38:01 +00:00
baldurk 1743424f02 Use bytebuf consistently instead of vector<byte> in driver interfaces 2017-11-27 11:00:42 +00:00
baldurk 58ac0ccfb2 Compile fix for checking vulkan handle directly as bool 2017-11-24 18:25:43 +00:00
baldurk ea77204580 Ignore 4244 conversion shortening warning in scintilla (fires in VS2017) 2017-11-24 18:14:25 +00:00
baldurk 4ab3349b78 Don't pass std::string through to printf function 2017-11-24 18:14:24 +00:00
baldurk b492840349 Fetch git commit using LibGit2Sharp that ships with VS2015 when possible
* Thanks to https://stackoverflow.com/a/43815817/4070143
2017-11-24 18:14:24 +00:00
baldurk 0b8a5008ba Use structs for serialising GL initial program bindings
* This produces much nicer structured data as the organisation is
  explicit instead of implicit and can be displayed in the UI properly.
2017-11-24 18:14:24 +00:00
baldurk 5ff440ab28 Separate out functions that iterate over all bindings in a program 2017-11-24 18:14:24 +00:00
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