Commit Graph

53 Commits

Author SHA1 Message Date
baldurk 8183c0d2ac Better handling of BGRA8 dds saving and loading 2016-08-19 17:36:36 +02:00
baldurk 481a28dc29 Rename RemoteAccess to TargetControl to better disambiguate RemoteServer 2016-08-19 12:23:19 +02:00
baldurk e81895b060 [Coverity] Remove use of rand() now SetFrameEvent takes 'bool force'
* I honestly can't figure out how to tell Coverity that rand() use isn't
  a security flaw, but it's on longer needed so...
2016-07-20 16:01:48 +02:00
baldurk 0c55e9374c For platforms printing to stdout/stderr, skip debug msgs & long prefix 2016-07-13 17:55:21 +02:00
baldurk 504b18ab3f D32S8 type formats are 8 bytes per pixel, not 5. 2016-07-13 15:52:19 +02:00
baldurk 6854c5bf96 Deliberately leak logfile string storage, so it's always around 2016-06-28 18:23:41 +02:00
EecheE c52e763e8c Changed default histogram range to [-1,+1] for snorm textures.
If viewing a SNORM texture, default histogram range is set to [-1,1]
instead of [0,1].
Added support for BC5U .dds fourcc code.
2016-06-25 17:14:41 -07:00
baldurk 5f28b745a2 Format code according to newly added clang-format
_  /)
                 mo / )
                 |/)\)
                  /\_
                  \__|=
                 (    )
                 __)(__
           _____/      \\_____
          |  _     ___   _   ||
          | | \     |   | \  ||
          | |  |    |   |  | ||
          | |_/     |   |_/  ||
          | | \     |   |    ||
          | |  \    |   |    ||
          | |   \. _|_. | .  ||
          |                  ||
          |repository history||
          |                  ||
  *       | *   **    * **   |**      **
   \))ejm97/.,(//,,..,,\||(,,.,\\,.((//
2016-05-22 19:41:53 +02:00
Michael Vance 8b1794456d Switch RENDERDOC_PLATFORM to RENDERDOC_PLATFORM_<PLAT>.
Notes
======
- With no clean way to do string comparisons in the C preprocessor, have a define per-platform. This avoids the clever string concatenation for determining the OS-specic bits, and allows SN-DBS to distribute builds without custom rewrite rules.
- Fix up instances of WIN32, etc., in non-3rdparty sources to refer to this.
- Move the per-platform specific bits into their own subdirs.
2016-04-15 13:59:59 -04:00
baldurk b826f58497 Move scratch buffer for log formatting from stack to static data section
* Reduces stack pressure in case applications have manually specified
  smaller stacks.
2016-04-14 21:09:22 +02:00
Michael Vance 973ee146a8 Support for a new 'Statistics' pane.
Notes
======
- Create a (hopefully) cross-backend performance statistics abstraction as part of FetchFrameInfo. This currently collects statistics about constant buffer binds, sampler binds, resource binds, client and server style resource updates (e.g. Map and UpdateSubresource), index & vertex buffer binds, and draws and dispatches. In my captures this covers approximately half of all API traffic. The rest is often shader sets, and then usual RS, OM, etc., that aren't currently tracked. During READING state parsing on the wrapped device context, record statistics about the calls and store them into the current frame info. We inspect objects occasionally to get things like their type for recording. It may be useful to expand this in the future to check bind types, etc. On the GL/Vulkan backends the stats data is never initialized and we display the same statistics data as before.
- Add a new statistics pane in the UI. A variety of shim arbitration/marshalling is provided to get the statistics data across the managed/native boundary. Removed the old statistics menu item. Currently the statistics pane is just a text log of various gathered data, with ASCII art (woo!) histograms. However in the future we would like to have image based historgrams as well as support for gathering statistics on a mask of stages, etc.
- Remove 'diagnostic' events (e.g. push/pop/marker) from the API call count as it distorts the API:draw call ratio.
- Add _First and _Count to ShaderResourceType and ShaderStageType for weak enumeration (weak due to int cast requirement).
- Provide utility functions Log2Floor for 32 and 64 bit types. These require OS specific clz, which are provided for Windows/VS and Linux/gcc/clang.

TODO
======
- UI toolkit based historgram, ability to set stages enabled for statistics, etc.
- Revisit necessity of gathering statistics across frames--apparently there is no multi-frame capture in a single log anymore?
- Revisit min/max/etc. gathering on the data--is there some way to improve this to not be so mechanical? Perhaps with field enumeration? However if moving to C++/Qt in future, possibly not a good time investment.
2016-04-11 21:23:05 -04:00
baldurk 6d070fb83e Use sizeof(a) instead of a::PoolType::AllocByteSize
* The coverity compiler doesn't seem to handle the AllocByteSize case
  correctly
2016-04-09 15:45:01 +02:00
baldurk 51721f78b8 Fix for VS2015 warnings, mostly variable shadowing 2016-04-09 13:15:01 +02:00
baldurk 7b20c110ac Enable warning level4 with a couple of disabled warnings on all projects
* Unused formal parameter remains disabled, but we also disable a
  warning about being unable to generate an operator=.
* glslang remains compiled on level 3, since most of the new warnings
  aren't easily fixable so would be muted anyway.
2016-04-09 12:43:00 +02:00
baldurk 6550b5eefc Enable warning C4127 - conditional expression is constant 2016-04-09 12:42:59 +02:00
baldurk cda0b4cb5a Enable warning C4189: local variable is initialized but not referenced 2016-04-09 11:24:45 +02:00
Chia-I Wu c752f20310 Include stdlib.h for exit
exit is called from RDCFATAL and RDCDUMPMSG.
2016-03-12 06:29:19 +08:00
baldurk 542131624f Create new assert macro, that can log the values in the expression
* The main motivation for this is because it's convenient to be able
  to just assert a simple expression rather than print a proper error
  message, but then after the fact you want to know what the value was
  (e.g. a return code, or similar).
2016-02-27 17:29:16 +01:00
baldurk 7b8097690d Disable force-crash for errors/asserts/etc in profile
* On balance I think this does more harm than good. The idea was to make
  sure errors don't get ignored when running in profile, but really all
  it did was mean people trying to debug renderdoc without much
  familiarity got confused as to why things crashed suddenly.
2016-02-27 14:53:52 +01:00
baldurk 2e0ffa7813 Batch update copyright years everywhere 2016-02-07 18:50:45 +01:00
baldurk 290b695a6b Linux compile fixes 2016-02-07 18:49:33 +01:00
baldurk 4b7c33d531 Fixes for vulkan for BGRA changes, add R4G4 special format 2016-02-07 18:49:21 +01:00
baldurk 764d05bbee Extract out shader caching from D3D to common code 2016-02-07 18:48:57 +01:00
baldurk 607b8d48c9 Remove 'debug' serialiser that synchronously flushes out debug text 2016-02-07 18:42:15 +01:00
baldurk e3ca8d0773 For now, handle persistent maps during capture by forcing flush
* This is ugly and will change once maps are properly intercepted, but
  works for now.
2016-02-07 18:41:27 +01:00
baldurk 26d99bf7bb Handle stale & unreferenced resource handles in descriptor sets
* It's possible to replay with descriptor set slots (and updates)
  referring to resources that don't exist at replay time, if those sets
  are never actually used in a queue that's submitted and the resource
  isn't referenced otherwise. For this reason we need to be able to
  skip initial contents or descriptor updates that refer to these
  unused resources.
2016-02-07 18:41:19 +01:00
baldurk 250b59e07c Move compile asserts out, as g++ can't use AllocByteSize in class def 2016-02-07 18:40:06 +01:00
baldurk e9342a32e7 Add VkWrappedRes struct with wrapping allocated pools 2016-02-07 18:39:51 +01:00
baldurk 8b7a025853 Refactor BGRA formats to not be special (so allow any BGRA format)
* Also add ASTC and D16S8 types while in the neighbourhood
2015-11-29 22:05:26 +01:00
baldurk c7cfdcc689 Add basic support for displaying/picking S8 textures. Refs #165 2015-10-25 14:09:43 +01:00
baldurk 219bd2d434 Refactor serialisation format with new version
* The main improvement is that instead of just callstack resolving DB
  and frame capture data, some arbtirary number of sections can be
  included, for e.g. adding notes or saving the bookmarks or whatever
  use the user wants.
* Sections (namely the frame capture data) can now be (de)compressed on
  I/O, which leads to much smaller file sizes.
* Also the default internal alignment has changed from 16 to 64 to be
  more future proof (I decided not to go with completely arbitrary
  alignment).
* A path for loading previous version logs remains and will be removed
  at some point in the future, maybe a version or two down the line.
2015-09-14 09:25:46 +02:00
baldurk 5fccf87d43 Only check that DDPF_FOURCC flag is set, not that it's the only flag 2015-09-13 14:06:13 +02:00
baldurk adaf3b25e6 Remove orphaned file 2015-06-19 22:37:30 +02:00
baldurk 6cd1f70bb6 Fix several warnings for compiling on VS2015
* Note at the time of committing there are still some warnings in MS
  headers that you might need to suppress in a couple of files.
* 3rd party code just has the warnings suppressed for ease of merging.
* The majority of warning fixes were for local variables shadowing
  other locals, function parameters, or members. In most cases they
  weren't a problem, but in some cases it was potentially dangerous!
2015-03-13 10:16:19 +00:00
baldurk 8ccf071865 Implement GetTextureData for GL - underlying code behind texture saving
* This should support all forms of textures off the bat, multisampled
  textures, 3D textures, arrays, compressed and uncompressed, etc.
2015-02-09 17:29:13 +00:00
baldurk f73a7a4a0c Support ARB_map_buffer_alignment on 64byte boundaries
* The real implementation can do more if it wants, and align to a larger
  alignment, but we just return 64 to the program and align to that, which
  satisfies the extension minimum requirements (and chances are no program
  takes advantage of wider alignment anyway).
2014-12-26 16:04:22 +00:00
baldurk c4f73c2b58 Handle deleting logfile at program shutdown in core destructor
* Prevents order-of-destructor issues from losing the log filename before
  the core destructor uses it to delete the logfile.
2014-11-30 15:45:19 +00:00
baldurk 4a79ac8039 Move CalcNumMips to common header so GL code can access it 2014-11-28 21:12:17 +00:00
baldurk 2484bc8bc7 Use UTF-8 everywhere possible and only use wchar_t where required.
* This means that all APIs pass byte string types. ALL strings everywhere
  in the entire codebase must be assumed to be and treated as UTF-8 content
  not ASCII.
* Gets rid of all the horrible %hs specifiers that caused warnings on
  linux! Hooray.
* We convert to wide strings, or use wide characters, only when necessary
  to use the Win32 API. Some windows specific code will stay in wide chars
  just for convenience.
* Files are already serialised as UTF-8 strings for linux/windows binary
  compatibility, so this change doesn't break backwards compatibility.
2014-11-23 14:45:16 +00:00
baldurk 6b9287470d Refactor log printing to use new custom printf. 2014-11-23 13:56:28 +00:00
baldurk 940f742e04 Implement DDS reading, add function to quickly check header exists 2014-09-25 16:19:47 +01:00
baldurk 0e6085ea20 DDS writing fixes for cubemaps & 3D textures with mips 2014-09-25 16:19:12 +01:00
baldurk 9f62428f7f Move DDS writing code out from d3d11 driver 2014-09-16 01:18:00 +01:00
baldurk bbc355ad44 Disable stdout/stderr on windows as it just conflicts with debugout 2014-09-03 23:12:06 +01:00
Baldur Karlsson a728f3289b move RDCBREAK() OS-implementation from inline function to macro
* It's a little messier as it's easier for the os-specific header to not
  define it and get confusing errors, but that's a one-time problem and
  having an extra function in a callstack and not showing source at the
  point of the RDCBREAK is annoying every time.
2014-07-28 12:17:34 +01:00
baldurk e94726cbc1 linux compile fixes 2014-07-22 10:46:19 +01:00
baldurk 85a4a8cccd Add uint8_t -> float SRGB conversion function (using LUT) 2014-07-13 18:55:03 +01:00
Baldur Karlsson f00815818a Include stddef.h for size_t 2014-06-26 11:42:08 +01:00
Baldur Karlsson 1b5a68382c Move find-modified-range function out of D3D11 driver to common 2014-06-24 15:44:47 +01:00
Rasmus Christian Pedersen 01da98996b wrapped pool: IsAlloc constness
This commit changes WrappingPool::IsAlloc to take a const pointer as argument
as pointer isnt modified. ItemPool::IsAlloc is changed to a const function
taking a const poiner as argument.
2014-05-07 20:34:27 +02:00