Commit Graph

6287 Commits

Author SHA1 Message Date
baldurk 2cee89e326 Add errno.h header for OS X 2017-11-04 09:30:22 +00:00
baldurk 270737a66b Fix formatting from bad git cherry-pick
* Apparently git cherry-pick doesn't apply commit hooks :(.
2017-11-03 20:03:23 +00:00
baldurk 8fd388ae26 Fix for unit tests 2017-11-03 19:50:54 +00:00
baldurk b695720a11 Move UniformType and AttribType enums to global scope 2017-11-03 17:51:10 +00:00
baldurk 091a32d98f Extract out OpenGL initial state code (unchanged) to separate file 2017-11-03 17:51:10 +00:00
baldurk 37213598bf Extract out D3D12 initial state code (unchanged) to separate file 2017-11-03 17:39:10 +00:00
baldurk 5d1ea47414 Extract out D3D11 initial state code (unchanged) to separate file 2017-11-03 17:38:43 +00:00
baldurk 5bd3493238 Add an XML codec for converting to/from structured data representation 2017-11-03 17:25:11 +00:00
baldurk 0edee7649d Remove no longer needed mutable DrawcallTreeNode structures
* The DrawcallDescription children is mutable, so we don't need a
  separate struct for that purpose in D3D11/GL where there's no side
  data to carry along with (where draws are late-bound when submitted).
2017-11-03 17:21:40 +00:00
baldurk 6073e8a8d4 indent hookset.pl to clang-format rules. No tabs, 2 space indent 2017-11-03 17:21:40 +00:00
baldurk a13a97286b Add an extra macro for aliased wrappers (to preserve orig function call)
* This will be used in future to record the exact entry point the application
  called, instead of just the function that we serialised (so calls aren't
  falsely promoted to DSA variants, etc).
2017-11-03 17:21:39 +00:00
baldurk 0eaf89ae02 Add gl_hooks_vrapi.cpp to VS project 2017-11-03 17:11:02 +00:00
baldurk bc8aea585d Null/Default GLResource objects have name = 0.
* This gives us a sane default, particularly for when we want to
  serialise a GLResource directly.
2017-11-03 17:08:30 +00:00
baldurk fa071a6ca5 Allow specifying source/id/severity when adding GL markers 2017-11-03 17:08:18 +00:00
baldurk 8346c630cb Manually prioritise normal GL over GLES for enums.
* Where the same enum value is used in multiple cases this then picks
  the GL version. This is especially important when the same value is
  used for radically different enum values.
2017-11-03 17:08:12 +00:00
baldurk f147ece4c6 Add separate handling for new RDC container format
* The new serialiser system will not handle the container file itself,
  so we've separated it out to deal in sections and stream I/O to read
  from and write to sections.
* We also add the ability to choose the compression scheme for a section
  instead of always using LZ4. LZ4 will still be used on the fly for
  fast write performance, but then RDC files can be re-compressed for
  savings offline.
2017-11-03 16:32:03 +00:00
baldurk 459c5a856e Add new I/O streaming system, with pluggable compression
* This I/O will form the basis of the new serialiser - it will simply
  read to or write from one of these I/O streams. Then that stream can
  come from a file, go to a memory buffer, or go through a compressor
  or decompressor transparently.
* It also allows a unified way of writing over sockets instead of
  needing special socket helper functions.
* With this commit, the code isn't used aside from in tests.
2017-11-03 16:26:06 +00:00
baldurk 3aa3262089 Expose ToStr interface publicly, split out into separate files
* Note that while this is public and uses std::string, because it's a
  template with specialisations in a .inl the string never crosses a
  module boundary - each including module has its own implementation.
* This will be used as part of the upcoming serialisation refactor.
* Some POD structs are still given ToStr implementations as we haven't
  yet switched over the serialisation system to expect all structs to
  have serialise functions.
2017-11-03 16:23:02 +00:00
baldurk 834edf0dc2 Add a microsecond timer from the start of the process 2017-11-03 16:22:59 +00:00
baldurk 6937756618 Add new structured data, that will be used to expose serialised values
* We have some special handling to allow SWIG wrapping of these types:
  SDFile owns the chunks and buffers within, and each object owns its
  children. Copying is disallowed except from SWIG where we assume the
  wrapper is handling lifetime management for its objects externally.
2017-11-03 16:19:45 +00:00
baldurk 9db71b803a Change python wrapping of arrays to be more pythonic, by reference
* Previously we would convert from python to C++ arrays immediately by
  copying, and vice-versa convert TO python immediately by creating a
  new python list by copying.
* This however behaves rather poorly in common situations, e.g.:
  > foo.bar.append(5)
  Would not append 5 to foo.bar, but copy foo.bar to a temporary, append
  5 to it, then destroy it leaving foo.bar untouched.
* Instead we leave the C++ array type as a pointer for as long as we can
  and instead implement the python sequence API as extensions/slots that
  work in-place on the original array.
2017-11-03 16:19:41 +00:00
baldurk 81aa36e24b Use a macro to reduce visual noise in resource_manager.h 2017-11-03 16:17:30 +00:00
baldurk 9ef0c5282c Make aligned buffer allocation a common function, out of serialiser 2017-11-03 16:15:19 +00:00
baldurk eb7e14d46d Add a formatter for 64-bit integers 2017-11-03 16:13:29 +00:00
baldurk 2d219018cd Move enum class operators from replay_enums.h into main header 2017-11-03 16:10:11 +00:00
baldurk 276783b948 Move custom printf & string_utils out of serialise/ folder 2017-11-03 16:07:46 +00:00
baldurk e6c5c03896 Remove rdctype namespace. Rename rdctype::str -> rdcstr, rdcarray, etc
* Since these types are more prevalent than originally designed, it
  makes more sense to remove the namespace for ease of typing/naming.
* Also add a specialised type 'bytebuf' for an array of bytes.
* This makes mapping easier to SWIG since there's no special casing for
  namespaced arrays. Especially so for nested cases like
  rdctype::array<rdctype::str> -> rdcarray<rdcstr>
2017-11-03 16:04:59 +00:00
baldurk 5e59616a8c Update rdctype::array to have a more stl-like mutable interface
* For the most part the interface is stl-compatible, but we have a few
  little changes of our own for convenience.
* This class is still needed after deleting the C# UI, because we don't
  want to pass C++ stl structs over module boundaries and possibly run
  into hard to diagnose incompatibilities.
2017-11-03 16:01:58 +00:00
baldurk e8dc6471a3 Add pugixml 1.8 2017-11-03 15:54:57 +00:00
baldurk 32c8b38568 Add zstd v1.3.1
* The directories are flattened since the #include paths aren't
  relative and instead just #include "file.h". The recommended
  solution is just to flatten the directory structure.
2017-11-03 15:54:57 +00:00
baldurk e6e36d1ea4 Update lz4 to v1.8.0 2017-11-03 15:54:57 +00:00
baldurk 0ae61ea088 Fix translation string being incorrectly split 2017-11-03 15:54:06 +00:00
baldurk b34246607b Handle vulkan base pipelines properly, creating record dependencies 2017-11-03 15:54:05 +00:00
baldurk d0d8cfbc2f Disable buggy and user-hostile NV optimus layer 2017-11-03 15:54:05 +00:00
baldurk 377fc33a92 Prefer native tools to compile renderdoc library
* This prevents link.exe from being at risk of running out of memory
  at link time on release builds, since it will use the 64-bit
  toolchain.
2017-11-03 15:53:27 +00:00
baldurk e1c55b7096 Check for non-NULL resource desc when creating descriptor 2017-11-03 15:53:27 +00:00
Janos Pantos 1fbcab67a0 Disable change events of mipLevel and sliceFace when switching textures
Otherwise, bad texture queries may occur, which refer to mip and slice
values of the previous texture.
2017-11-03 16:22:31 +01:00
baldurk ad026925a6 Fix remapping multiple capture vulkan phys. devs to 1 replay phys. dev 2017-11-03 10:13:08 +00:00
baldurk 0c9cf24921 Fix copy-paste error checking wrong count for validity. Refs #789 2017-10-28 14:11:58 +01:00
baldurk 8639e616cf Don't divide by zero if there are no textures to fetch stats for 2017-10-27 17:50:12 +01:00
baldurk 0d7a064443 Right align both durations in event browser and perf counter data 2017-10-27 12:26:02 +01:00
baldurk 6b230d8de0 Use float formatter for duration column in event browser 2017-10-27 12:26:02 +01:00
baldurk 62260a6404 Add column alignment function to RDTreeWidget 2017-10-27 12:26:01 +01:00
Janos Pantos 26d8f296dd Fix the setting of compressed proxy texture data 2017-10-27 13:25:51 +02:00
Janos Pantos 91ef326465 Create compressed proxy textures with glCompressedTex* functions
For GLES, glTextureImage* functions can not be used for this.
2017-10-27 13:25:51 +02:00
Alex Smith 27ef460546 Set shader stage in reflection for compute shaders
Missing this meant an incorrect stage flag would be passed to
vkGetShaderInfoAMD for compute shaders when getting a disassembly.
2017-10-25 19:17:40 +02:00
baldurk a379b9283e Ensure descriptors for multi-plane images are valid on replay 2017-10-25 00:22:40 +01:00
baldurk 1d90358872 If a resource is NULL, make sure we don't use an invalid descriptor
* This can happen if the resource was not included in the capture, but
  there was a descriptor passed (i.e. not NULL desc which is handled
  separately) which specifies some parameters, but leaves the format
  as UNKNOWN.
2017-10-25 00:12:09 +01:00
baldurk 77dea7095c Ignore format truncation warning on utf8printf.cpp
* We deliberately truncate in some tests, to check our printf behaves
  correctly.
2017-10-24 23:01:36 +01:00
baldurk 85a7fa744e Check for renderdoc.dll precisely when injecting, not just close match
* This means we don't call into a random dll if it happens to contain
  the substring 'renderdoc.dll' somewhere.
2017-10-24 23:01:03 +01:00