Commit Graph

6807 Commits

Author SHA1 Message Date
baldurk 56c6fa2d04 Use QCommandLineParser to parse arguments more intelligently. Refs #843 2018-01-17 21:07:03 +00:00
baldurk bf4e14ced8 Use full path for invoking keytool 2018-01-17 21:07:03 +00:00
michaelrgb cacac49a5e Image uniforms cannot be re-assigned in GLES. 2018-01-17 21:06:55 +00:00
baldurk f751be98ed Fix version project building on 32-bit 2018-01-16 23:17:55 +00:00
baldurk 02155f4953 Fix debug initialisation for D3D12 2018-01-16 21:00:18 +00:00
baldurk 413438c627 Fix corruption when calling GetDetails() on non-shader 2018-01-16 21:00:10 +00:00
baldurk dea21b20a0 Remove global GIT_COMMIT_HASH define, use GitVersionHash global var
* On windows, the change in a global GIT_COMMIT_HASH define in each
  project needing it meant a full rebuild every time the commit changed.
* Ideally we'd set the define only on one file in each project, but
  MSBuild doesn't seem to support that. Instead we make a new tiny
  project that compiles a single cpp exporting a global var, and
  reference that global var in each other project.
2018-01-16 20:17:53 +00:00
baldurk 654fa1bb6c Refactor vulkan PostVS fetch to use compute instead of vertex stores
* Mobile chips are lacking in features, particularly
  vertexPipelineStoresAndAtomics which is needed to manually emulate
  stream-out with shader patching.
* Instead we change to transform the vertex shader into a compute shader
  and dispatch it to manually fetch the vertex inputs, run the original
  shader, and store the resulting outputs.
2018-01-16 20:12:07 +00:00
baldurk 6f38462761 Assign consecutive locations to input/output structures 2018-01-16 20:12:07 +00:00
baldurk 34fc993b59 Calculate column widths with devicePixelRatio 2018-01-16 20:12:06 +00:00
baldurk 5e819a6e23 Ensure mesh columns list is cleared before reconfiguring 2018-01-16 20:12:06 +00:00
baldurk 08bedb849e Mark fences as referenced in fence-handling functions
* This is useful even if we don't faithfully replay fences, because it
  suppresses warnings about them being missing, and includes their
  creation info in the capture.
2018-01-16 20:12:05 +00:00
baldurk aaa3a98677 Add SPIR-V mapping for vertex/instance index builtins 2018-01-16 20:12:05 +00:00
baldurk aba8dacd25 Use baseVertex value from PostVS data 2018-01-16 20:12:04 +00:00
baldurk 1592426da5 Handle geometryShader feature being unavailable - disable lit mesh mode 2018-01-16 20:12:03 +00:00
baldurk 464c9ad02a Expose BuiltInToSystemAttribute function for mapping to our own enum 2018-01-16 17:00:36 +00:00
baldurk 6b305d7178 Add ability to add capability flags to a shader 2018-01-16 17:00:34 +00:00
baldurk e2f6cf956e notify SPIRVEditor of all adds/removes/changes
* This lets the editor update its internal tracking, so e.g. if a type
  changes then it unregisters the old type and registers the new type.
  Then any declarations after that point don't accidentally duplicate
  due to stale internal data.
2018-01-16 16:59:44 +00:00
baldurk 9fe714c9a2 Add some extra iterators and fix a few minor iterator problems 2018-01-16 16:55:12 +00:00
baldurk 6b0bcc5799 Add comparisons directly between SPIRVId and uint32_t
* Seemingly in some cases the uint32_t constructor can't be used to
  promote.
2018-01-16 16:54:35 +00:00
baldurk 50b34a2bb7 Merge SPIRVVoid into SPIRVScalar, add image types, reduce copy-paste
* We use templates to reduce copy-paste between the different types
  since it's the same operation of "look up a map, if not found then
  declare and add to map", just with a different typed map.
2018-01-16 16:54:32 +00:00
baldurk 75c31a9775 Refactor AddOutputDumping to use SPIRVEditor instead of doing it by hand 2018-01-16 16:44:31 +00:00
baldurk 30bf276ae8 Return SPIRVId from Add*() functions for convenience's sake 2018-01-16 16:44:24 +00:00
baldurk 8fc56df0e0 Add utility function that expands an operation in-place with new words 2018-01-16 16:44:17 +00:00
baldurk 74ac75289b Add begin/end iterators for each section to ease iteration 2018-01-16 16:44:08 +00:00
baldurk e59dea2142 Add functions for adding declared constants 2018-01-16 16:44:00 +00:00
baldurk 78e0a7424f Add SPIRVIterator comparisons and SPIRVId stringification 2018-01-16 16:43:44 +00:00
baldurk 0a29df1f02 Ditch use of std::initializer_list, it's more pain than it's worth 2018-01-16 16:42:40 +00:00
baldurk 0f541ea6ee Add function and void type tracking, and helper for declaring structs 2018-01-16 16:39:53 +00:00
baldurk 7bb4754108 Don't keep SPIRVIterators around persistently, store IDs instead
* We have an ID -> offset lookup which can give us iterators on the fly,
  but this allows us to invalidate iterators and modify in-place.
2018-01-16 16:39:22 +00:00
baldurk d9db39b7c8 Add explicit param onto operator bool() to not accidentally cast to int 2018-01-16 16:37:38 +00:00
baldurk 32af79bf8c Allow removing or truncating operations by replacing words with OpNop
* It's not clear if OpNop is allowed to exist outside of function
  definitions, so we strip it ourselves. This is always fine anyway.
2018-01-16 16:37:07 +00:00
baldurk 64e41dc406 Add ability to re-use or declare new types 2018-01-16 16:37:05 +00:00
baldurk 93d7f86d60 add beginnings of a class to organise SPIR-V editing capabilities 2018-01-16 16:33:33 +00:00
baldurk a69efa1702 Refactor debug manager, reducing duplication and better organisation
* In many cases (particularly on D3D11/D3D12) the replay would simply
  forward functions as-is to the debug manager for implementation. This
  meant that change any of those function signatures required more
  tedious copy-pasting than was necessary, and didn't make much sense.
* Now the replay class is responsible for implementing all the
  functionality and owns any debug-only API resources, but can still use
  the debug manager for any indirect utility functions like caching,
  etc.
* The API resources are better organised by task in the replay class
  rather than being all over the place.
* Finally on vulkan, added some helper functions to reduce the
  boilerplate involved in initialising objects.
2018-01-16 16:29:39 +00:00
baldurk 67835c4d54 Split shader caching and text rendering out of debug manager classes 2018-01-16 16:29:36 +00:00
baldurk 25cfa2c9df Move GPUBuffer helper class out of VulkanDebugManager 2018-01-16 16:26:24 +00:00
baldurk fdfdda71ac Add helper #defines to allow declaring embedded resources by name
* We want to be able to declare a 'name' of a resource and then fetch it
  later. To do this we create a tiny little reference (either an int on
  windows, or a pointer+length elsewhere), then actually fetch the data
  later.
2018-01-12 10:55:18 +00:00
baldurk f87d058cfb Split out texture rendering and preparation into separate files 2018-01-12 10:55:17 +00:00
baldurk 770e6756f8 Split out conversion between MSAA textures and 2D arrays. 2018-01-12 10:55:16 +00:00
baldurk 013457ab5f Split out mesh rendering to separate files 2018-01-12 10:55:16 +00:00
baldurk 635a58280e Split output window handling out of debug files 2018-01-12 10:55:15 +00:00
baldurk 69f8571f43 Remove d3d11_analyse.cpp and merge code in elsewhere
* This is temporary until we split up the debug file further, but it
  makes the D3D11 codebase more consistent with the other APIs.
2018-01-12 10:55:14 +00:00
baldurk e287664730 Split apart pixel history and shader debugging from d3d11_analyse.cpp 2018-01-12 10:55:13 +00:00
baldurk db59ffddc6 Split overlay rendering out into separate files in each driver 2018-01-12 10:55:13 +00:00
baldurk 60ed3e2867 Split PostVS implementation out into separate files in each driver 2018-01-12 10:55:12 +00:00
baldurk e7991c07eb Add ability to create a mapping from RGP linear/interopId <=> eventId 2018-01-11 16:44:57 +00:00
baldurk 4b7e7f5df1 Add section type for embedded AMD RGP profiles 2018-01-11 15:33:43 +00:00
baldurk 21a16e051b Add support for pre-instance layer functions
* Added to the vulkan loader after 1.0.65, this lets us intercept the
  enumeration of instance extensions (before our layer is actually
  initialised) so that we can filter out unsupported extensions.
2018-01-11 13:48:35 +00:00
baldurk 32d57f4019 Enable sorting in debug messages 2018-01-11 13:48:34 +00:00