Commit Graph
197 Commits
Author SHA1 Message Date
baldurk bdff6cd855 Delete orphaned file 2022-10-20 16:12:34 +01:00
baldurk 9a22b2cf46 Remove old android prototyping code 2022-10-14 12:00:54 +01:00
baldurk 198c011e07 Add missing shaders to VS project 2022-10-07 10:52:24 +01:00
baldurk 9603f5a925 Pre-compile shaders for math and sampling opcodes during shader debug
* D3D12 math shader was already precompiled, but on D3D11 we now allocate
  everything up front and on D3D12 we also up-front compile sampling.
* The only exception is const offsets which can't be variable, so we cache these
  (likely we'll only see a few variants per shader/capture) and create them on
  demand.
2022-06-30 13:51:27 +01:00
baldurk 8aa0390948 Add string messages to returned result codes to display to user
* Most of the main entry points that can fail with relevant reasons now has a
  way of specifying a message to return with it. This message can be displayed
  to the user to give more information or context about an error.
2022-04-26 16:21:54 +01:00
baldurk 3ac4bd0ebd Refactor custom shaders to abstract binding differences. Closes #2458
* Newly written shaders and any updated shaders can now use pre-defined macros
  to abstract away binding differences between APIs, so custom shaders will be
  more portable in particular shaders written in HLSL for D3D or GLSL on OpenGL
  won't break on vulkan because they refer to incorrect binds.
2022-01-31 19:14:08 +00:00
baldurk 620e75c2a1 Add a system for backends to handle device lost/OOM errors and report it
* The UI will become non-functional and the backend will be replaced with a do-
  nothing one that keeps things alive without needing error bulletproofing
  everywhere in the real backend.
2021-08-18 20:12:07 +01:00
baldurk 81b4d3d804 Add public domain md5 library and implement modified DXBC container hash
* This allows us to disabled any requirement for "experimental shaders".
2021-07-07 19:18:32 +01:00
baldurk 4afd76b669 Add API independent sparse page table tracker 2021-03-08 16:38:51 +00:00
baldurk e5f4ca7bb8 Remove use of const char * in public API and OS specific where possible
* This prevents unnecessary conversions back and forth between rdcstr and const
  char * when going through interfaces. In the OS specific layer this is rarely
  an issue because most of the implementations don't convert to rdcstr, but it
  is convenient to be able to pass in an rdcstr directly. The few cases where
  there's an unecessary construction of an rdcstr is acceptable.
* A couple of places in the public API need to return a string from a global
  function, so can't return an rdcstr due to C ABI, so they still return a const
  char *.
* Similarly const char * is kept for logging, to avoid a dependency on rdcstr
  and because that's one place where unnecessary conversions/constructions may
  be impactful.
2020-12-07 17:44:50 +00:00
baldurk efac5ad70a Disable runtime and security checks in development builds
* This provides a decent speed boost and these have never caught any issues
  before. Asan/gflags/valgrind etc do a better job of this when needed.
2020-11-20 17:02:33 +00:00
baldurk d0bf0f6eab Add Superluminal PerformanceAPI annotation support 2020-11-19 14:47:10 +00:00
baldurk d9121a7f90 Add half.hpp 2.1.0 from http://half.sourceforge.net/ 2020-11-09 12:25:21 +00:00
baldurk c58f3edafa Support lazy-generating structured data objects for large arrays
* For certain very large arrays it can be nice to defer generation of structured
  data until it's needed, since often maybe only a handful of elements may be
  needed (or commonly none at all).
2020-10-27 15:15:19 +00:00
baldurk 73cc1f5476 Add specialised rdcarray which implements key/value lookup 2020-08-19 15:21:00 +01:00
baldurk 27b541c6d5 Always optimise some 3rdparty code like lz4, to speed up debug builds
* We don't need to debug this code and it slows down captures a fair bit if it's
  not optimised
2020-08-04 11:22:15 +01:00
baldurk 02a54be6ad When replaying resource discards fill with explicit pattern. Closes #284
* This helps catches cases where a discarded image is accidentally used and in
  many cases may still have valid data. Particularly on Vulkan this is relevant
  for DONT_CARE renderpass load and store ops.
2020-07-13 17:29:11 +01:00
baldurk f0fe801d27 Specify RC include paths instead of using a macro for the output path
* This fixes an issue with builds failing when the path contains some characters
  RC doesn't like for some reason, even if it's quoted.
2020-07-12 10:51:51 +01:00
baldurk f8326b9149 Accept VS reformatting of vcxproj 2020-07-06 17:29:21 +01:00
baldurk ce908cf1da Fix compilation with old dxc
* -Qstrip_debug without -Zi will fail to build completely, so omit it and we
  will get what we want (no debug info).
2020-06-20 10:06:42 +01:00
baldurk e7cf9115ee Add <MakeDir> before invoking dxc 2020-06-19 20:09:27 +01:00
baldurk 0bd48d3c2c Update overlays to use DXIL as needed
* This is needed because D3D12 requires all shaders in a pipeline to use DXIL if
  any do.
* We try to bake the couple of DXIL shaders that we will mix-and-match with
  application shaders at build time, in case we aren't able to find a working
  dxcompiler at runtime to build them. But this can only happen if we find a
  working dxc.exe in one of the windows 10 SDKs.
2020-06-18 17:22:44 +01:00
baldurk 9f210d5617 Hardcode variants of fixed colour shader needed on D3D12
* We will be adding an offline baked version of the DXIL variant of each of
  these, so we want to make it friendly to build-time generation.
2020-06-18 17:22:44 +01:00
baldurk d1f4a47cd5 Add a load of MSBuild nonsense to *avoid* targeting a specific Win SDK
* Even though we don't care about the windows SDK version at all, we actively
  need to avoid the default which actively sabotages us.
2020-06-11 20:05:03 +01:00
baldurk eab399a80e Add gdb pretty printer for rdcstr/rdcarray 2020-05-27 22:38:23 +01:00
Aliya PazylbekovaandBaldur Karlsson 0fd3d65a6f Vk Pixel History: support other depth formats MSAA
- Separate the pixel history copy pixel shader into two separate
  shaders, one for colour copy and one for depth
- Allocate and update descriptor sets on demand
- Add another compute shader for pixel history depth copy
2020-05-26 21:19:55 +01:00
tabi.katalinandBaldur Karlsson f1bd727dff Add support for ARM counters
Adding support for ARM counters via a third-party lib.
The main target platform is Android.
2020-05-20 20:19:17 +01:00
Aliya PazylbekovaandBaldur Karlsson 41b911d1d0 Vk Pixel History: MSAA depth/stencil copy, shader out
Use a separate compute shader module for MSAA copy, and output
directly into the destination buffer instead of creating
staging resources.

Support case where there is no depth stencil attachment to get post mod
values in per fragment reporting. Previously used the original
framebuffer that might not have had depth/stencil view, so couldn't
count the fragments. Now use the sub image.

To get the post mod color, we need to blend with the premod color, so
we use vkCmdCopyImage to copy from the original image.
2020-05-06 19:35:25 +01:00
baldurk 18713f644e Implement OpImageQueryLod by faking derivatives on sample quad 2020-04-23 19:14:09 +01:00
baldurk fcb82ae70c Fix the way d3dcompiler is copied into builds to not fail so often
* Using <Copy> forcibly copied every build which means if the program is running
  a build will fail. Using <Content> will only copy if the file doesn't exist
  (so after the first build, it won't try to copy and fail).
2020-04-02 18:15:44 +01:00
Aliya PazylbekovaandBaldur Karlsson 8d2ad78f05 Vk Pixel History: refactoring, per fragment depth
- Refactor to use common funcs
- Add per fragment depth data
- Rename pixelhistory.frag to pixelhistory_primid.frag
- Fix how some per fragment pipelines are created

For per fragment data we create 3 pipelines
1) Post modification pipeline
changes the stencil state and scissors around the target pixel
2) Shader output pipeline
in addition to above, disables rasterization discard, depth bounds test,
culling and turns off blending
3) Primitive ID pipe
in addition to above, disables depth test and depth write, and changes
the fragment shader to only output primitive ID
2020-03-20 16:16:12 +00:00
Aliya PazylbekovaandBaldur Karlsson 83623af8d8 Vk Pixel History: per fragment data
- For now only per fragment primitive ID, and colour values, not depth
information.
2020-03-20 16:16:12 +00:00
ArvastraandBaldur Karlsson 482114f6f4 Display Thumbnails for dds files. 2020-03-19 17:16:01 +00:00
baldurk 1bef8eb94b Copy windows 10 d3dcompiler at build time, if available 2020-03-18 17:34:59 +00:00
baldurk d408f77241 Add configuration system for core renderdoc module
* This allows persistent config storage and registering tweak variables that
  works independent of the UI's configuration.
* Config vars can be debug only, which means they will be compiled out in stable
  version releases. This allows for debug-logging tweaks that are available in
  all builds (including nightly builds) for diagnostic purposes, but have zero
  overhead in stable releases.
* Variables have a loose hierarchy defined with _ or . to separate nodes.
2020-03-18 17:34:59 +00:00
baldurk 2c80a7206b Enable 'enum value not handled' warning on MSVC, fix issues
* Mostly we add an explicit default: break but in some cases we add explicit
  cases and/or error messages.
2019-12-17 18:02:10 +00:00
baldurk c4ca8cb1d1 Reduce reliance on big public headers where possible
* Mostly moving includes from common headers to cpp where possible, and removing
  includes of the whole thing where only enums or rdcstr etc are needed.
2019-12-16 17:06:16 +00:00
baldurk f68645bddc Reduce dependencies pulled in by common.h 2019-12-16 17:06:16 +00:00
baldurk 25536836b6 Split up renderdoc_replay.h header further 2019-12-16 17:06:15 +00:00
baldurk 8e21b28785 Split basic_types.h into separate independent headers 2019-12-16 17:05:11 +00:00
baldurk edc8fb6bd6 Be more precise with texture remapping to handle integer textures 2019-11-26 17:38:26 +00:00
baldurk d2aee67afe Make it a bit easier to self-host capture on vulkan
* You need to register rdocself.json by hand but otherwise then the same
  workflow works as for other APIs.
2019-11-25 23:36:45 +00:00
baldurk 6be0736d24 Update miniz to 2.10 with ZIP64 support 2019-10-14 14:06:42 +01:00
baldurk af97e50b3a Implement ConvertToR11G11B10(), add conversion tests 2019-09-18 19:25:11 +01:00
baldurk e2704fa2eb Add an abstracted interface around android-specific handling
* This makes it easier to use the same kind of interface to manage other kinds
  of devices.
2019-07-31 17:51:13 +01:00
Benson JoerisandBaldur Karlsson 7f955daa40 Add BitFlagIterator to iterate over bits
Change-Id: I201eaa36ab50b42e32aa06976d34c1c070b8a3c4
2019-05-31 07:26:43 -07:00
baldurk 8ab8f42daf Add GGP files to VS project, fix compilation with removal of 'using std' 2019-05-21 12:11:00 +01:00
baldurk c8a518f05c Refactor rdcstr with small-string and literal-string optimisations
* rdcstr no longer inherits from rdcarray, it implements all functionality
  itself.
* There are now three representations:
  - Heap-allocated, same as how rdcarray behaves.
  - Local-allocated, for small strings we store them in a union array.
  - Compile-time literal, only created from user-defined literals.
* The main observation is that a lot of RenderDoc's strings are compile-time
  literals either from struct names, member names, or stringified enum values.
  Storing these directly and allowing them to be moved and copied quickly saves
  on allocations and time. When the string is modified, it's copied to one of the other formats.
2019-05-15 14:12:17 +01:00
baldurk 11819ed3be Refactor and clean up internal shaders to be better organised
* Split up old uber-cbuffers used for unrelated shaders into shader-specific
  cbuffers (DebugPixelCBufferData -> TexDisplayPSCBuffer / CheckerboardCBuffer /
  MeshPixelCBuffer).
* Split up HLSL files so not everything is lumped into 'debugdisplay.hlsl' but
  has separate files as appropriate.
* Use #include in GLSL and HLSL to better organise shader code together rather
  than relying on lumping files together on the C++ side.
* Renamed files like 'debugcbuffers.h' to 'hlsl_cbuffers.h'.
* Trimmed out some extensions/cruft that isn't needed in the GLSL side since we
  no longer use separable shaders.
* Combine some shaders like Outline/Checkerboard that were similar into central
  place.
2019-02-13 18:50:53 +00:00
Benson JoerisandBaldur Karlsson 3bc53094da Add update and merge methods to Intervals<T>
Also updated build files and added tests for `Intervals<T>`.
2019-02-12 16:05:00 +00:00