Commit Graph

569 Commits

Author SHA1 Message Date
baldurk f256218e17 Pass bindless feedback data to UI through vulkan pipeline state
* Each binding element within an arrayed descriptor has a bool indicating if
  it's dynamically used or not (which will be set to true if the feedback isn't
  available). Each descriptor has a uint32_t indicating how many elements are
  dynamically used - which is useful for the UI to hide the root of an array
  that has no used elements, or to heuristically decide whether to expand or
  elide the contents.
2019-04-05 09:19:22 +01:00
baldurk 60c92b2d84 Implement support for VK_EXT_depth_clip_enable 2019-04-04 16:23:35 +01:00
Aliya Pazylbekova 64437157d0 Add GGP capture support 2019-03-14 01:23:11 +00:00
Aliya Pazylbekova 7c0365679f Add GGP build support
- Disable GL and GLES drivers on GGP
- Add flags to keep symbols in release builds. Adds
minimal debug info that preserves backtraces.
- Disable python modules and qrenderdoc for GGP
2019-03-14 01:23:11 +00:00
baldurk e23974e2bf Initialise variables that might not be set otherwise before first use 2019-03-01 11:33:05 +00:00
tuxerr c6edcf9a38 add support for VK_EXT_fragment_density_map 2019-02-28 00:10:03 +00:00
baldurk 2cda7f8af0 Fix access to Qt containers that need int indexes 2019-02-27 14:50:27 +00:00
baldurk 45a9fc97ae Fix int32_t/size_t type matching in rdcarray functions 2019-02-27 14:38:34 +00:00
baldurk f70de276e6 Use size_t in rdcarray
* This means that allocating >2GB in a bytebuf doesn't crash. There was no good
  reason for the int32_t - that dates back to the earliest interop structs
  defined for communication with .NET
2019-02-27 13:50:05 +00:00
baldurk 98b8ff1dd7 Don't use GPUCounter directly in public interface for python
* Python throws an error when enums don't have a pre-existing value, which can
  happen for GPUCounter due to hardware specific counters. Instead just declare
  as int and allow casting back and forth for values that are pre-existing.
2019-02-20 13:53:20 +00:00
baldurk b14e3f2ef9 Fix valgrind issues found running unit tests
* GLContextTLSData default constructor should be initialised.
* Add some missing deletes in shader reflection
* Call freeaddrinfo after getaddrinfo
* Don't leak if we're reserving 0 bytes in rdcstr over the top of an already
  empty rdcstr
2019-02-19 17:54:53 +00:00
baldurk 34a97482dd Add helper shortcut to 'renderdoccmd test' to run functional tests
* This invokes run_tests.py with any arguments but specifies the renderdoc
  module and python module paths automatically. Only works if built within the
  project repo itself as otherwise it won't locate the test script
2019-02-14 15:45:22 +00:00
baldurk ce991e421a Drop psutil requirement in functional tests, fetch memory usage directly 2019-02-14 15:08:28 +00:00
baldurk bbc2f47fa8 Centralise generation of buffer format strings for struct buffers
* We also fix a number of issues that could cause incorrect formats to be
  generated.
* Test cases added for D3D11/GL/Vulkan to test different struct types. These
  aren't automated at the moment because most of the code they're testing is in
  the UI itself.
2019-02-13 18:50:56 +00:00
baldurk fe0be58908 Implement CGLPlatform using CGL and NSOpenGLContext
* On replay on macOS we use NSOpenGLContext so we can render to windows.
* We have two windowing systems on mac - one for Metal compatible outputs and
  one for OpenGL compatible outputs.
2019-02-13 18:50:54 +00:00
baldurk 02abe02fe8 Add the option to save all selected captures at once
* The filename selected is used as a base, then -frameXYZ is appended to each
  capture.
2019-02-13 18:50:52 +00:00
baldurk fbb6b23b23 Support advanced cbuffer layouts
* This includes 8/16/64-bit integers, 16-bit/64-bit floats, and scalar block
  packing
2019-02-07 15:23:06 +00:00
baldurk 6bc6ca9557 Drop legacy ShaderRegister struct, store byte offset per constant
* For D3D11 byte offsets are always uint32 aligned, but for other APIs that's
  not guaranteed. Storing a byte offset is strictly more expressive and a lot
  simpler to reason about.
2019-02-07 15:23:06 +00:00
baldurk 351c75e006 Fix some cases handling arrays of matrices
* We also pick the output pixel in the CBuffer_Zoo tests to ensure the API
  agrees with our interpretation of the data.
* Follow-up commit will tidy D3D cbuffer code that needs it.
2019-02-07 15:23:05 +00:00
baldurk 967d03083d Proper documentation build fix 2019-02-05 19:40:43 +00:00
baldurk d0782c6bcb Potential fix for documentation build 2019-02-05 19:24:18 +00:00
baldurk 6d07e1c42e Add support for VK_EXT_discard_rectangles 2019-02-05 18:40:31 +00:00
baldurk 354b37be56 Add support for VK_EXT_sample_locations 2019-02-05 18:40:31 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk f50ba1272f Add missing explicit include for <type_traits> 2019-01-23 09:32:51 +00:00
baldurk eb5c416130 Reserve space up front when fetching resources on Vulkan/D3D12 2019-01-22 18:51:54 +00:00
baldurk 3f8e2e7f99 Change the check for when copyRange/destroyRange can be trivially done
* Even if a struct isn't trivial (e.g. it contains a constructor) it can still
  be trivially copyable (just POD with memcpy), or trivially destructable (with
  no destructor). Make sure we don't fall back to slower copies/destroys for
  this case as it's relatively common.
2019-01-22 18:48:07 +00:00
baldurk 145f4bdb15 Handle GL applications changing BASE_LEVEL / MAX_LEVEL dynamically
* This is the only way in GL to do rendering from one mip to another. We handle
  it and display the whole texture even if it's temporarily constricted, and
  display the mip state in the pipeline viewer.
* If the mip state is constricted at the start of the frame capture, only mips
  0..MAX will be visible at all and other mips will be assumed to not be valid.
2019-01-14 18:02:44 +00:00
baldurk 44da10be06 Change SRGB to be a component type, not a ResourceFormat flag
* This allows us to have sRGB as a type hint, and better matches API format
  types.
* It's currently impossible and unlikely to ever be the case that srgb is
  applied to anything other than UNorm, so having it be independent from the
  component type was a degree of freedom that was unused.
2019-01-14 13:19:59 +00:00
baldurk b1f3515090 Differentiate chunks with empty callstacks from those without callstacks
* This is a minor distinction but helps ensure that conversions to/from other
  formats are binary identical.
2019-01-10 13:54:04 +00:00
akharlamov 04ca50ba63 Adding utility code for VK code generator.
ExtObject extends the SDObject structure with helper
methods.
Intervals are used for memory region tracking.

Change-Id: I38198c0a096ed838d527b6526216fb28326ebc89
2019-01-10 09:48:33 +00:00
baldurk 21e056e5b8 Fix stringification of bitfields with duplicate values
* We'd previously subtract the bitfield value twice, leading to underflow and
  then lots of unknown bits appear to be set. Instead we should clear the bit so
  that it's safe to apply multiple times.
2019-01-09 16:27:15 +00:00
baldurk ab8d07f29c Add DiscardFrameCapture to in-application API, bumped to version 1.4.0 2019-01-08 11:35:48 +00:00
baldurk 2237c241ff Fix incorrectly named methods in ResourceFormat
* We try to maintain at least an internally consistent naming scheme for the
  python/public interface, even if it doesn't match python naming schemes.
2019-01-03 12:22:29 +00:00
Danylo Piliaiev 29e38e71a9 Implement VK_EXT_conditional_rendering
Predicate state is displayed in the raster state.
"Draw Call" and "Wireframe" overlays are visible even if predicate doesn't pass.

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
2018-12-14 20:22:08 +00:00
baldurk 13e7d1c134 Support display of YUV textures on D3D11, D3D12 and Vulkan
* Supported textures are decoded into standard format of YUVA, displayed
  visually with Y in green, U in blue, V in red.
* A new texture display mode 'YUVA decode' has been added which does a default
  full-range conversion from YUV to RGB.
* Custom shaders can be used to implement a custom decode matrix.
2018-12-14 20:14:07 +00:00
baldurk 2cf5129e71 Add support for YCbCr conversion samplers in vulkan. Refs #1194 2018-12-14 14:08:33 +00:00
baldurk 68b23c5f62 Add support for YUV resource formats
* We handle 4:4:4, 4:2:2, and 4:2:0, with packed, 2-plane and 3-plane formats,
  for 8, 10, 12, and 16 bit depths.
* This covers most common formats but still leaves a few out - NV11, palettised
  formats, V208/V408 JPG formats.
2018-12-11 19:57:20 +00:00
baldurk 2411ce70ea Add flags to ResourceFormat to replace bgraOrder/srgbCorrected
* Allows for future expansion as well
2018-12-11 19:57:20 +00:00
baldurk b564555538 Bump version to 1.3 2018-11-30 18:21:56 +00:00
baldurk 0b52f0e2ea Update docstring on RENDERDOC_GetDriverInformation 2018-11-30 15:55:39 +00:00
baldurk 26511c546c Make RENDERDOC_NeedVulkanLayerRegistration feasible to call from python 2018-11-26 16:39:00 +00:00
baldurk 8ed9670601 Add way to query for driver version info without replaying.
* This lets us print what driver is available without opening a capture, useful
  for autotest logging.
* We also print the driver version & vendor on capture as well as replay for all
  APIs. Previously we were only printing this reliably on replay for GL/Vulkan
  but it's useful everywhere for post-mortem debugging.
2018-11-26 16:39:00 +00:00
baldurk f75b5e235e Change verify map writes capture option to verify buffer access.
* This option will now toggle on the behaviour to fill undefined buffer contents
  with a marker value, both if they're created without data (it will be zero
  filled instead) or mapped with discard (it will keep the old contents
  instead).
* There were too many hard to find problems or misconceptions about the buffer
  filling for it to be useful. Now it will be opt-in instead.
2018-11-23 11:25:39 +00:00
baldurk 09d63180d1 Add API option for applications that need access to vendor extensions
* This happens at the application's risk since there's no way to know what
  effect the vendor extension will have or even if it will work together with
  renderdoc's hooking.
2018-11-22 13:00:18 +00:00
baldurk cc637cb08a Fix fetching vulkan vertex buffers when bindings are sparse 2018-11-14 18:32:34 +00:00
akharlamov a1a0b1a7ec Add ability to save .rdc file thumbnail in formats other than JPEG
By default RenderDoc saves captured frame thumbnail image as JPEG which
is lossy compression and makes it difficult to use as a reference image
for testing. Added an option to save thumbnails in different formats.

In order not to change the binary serialization format of .rdc files, if
the thumbnail format is not JPEG, a default JPEG thumbnail is still
saved in the file header as before, while the actual thumbnail is saved
as an additional chunk in the binary sections list. Older versions of
RenderDoc will just ignore this section and still use the legacy JPEG
thumbnail.

Change-Id: Icbf4fbd629719b49868fb785a656f6c7c9946ef9
2018-11-14 18:32:07 +00:00
tabi.katalin 6c39b58d0b Handle failed APK installation and patching
If "adb install" command is used with "-g" flag, we may get java.lang.SecurityException on some devices because granting runtime permissions at installation time is only allowed for system apps (however we can enable it in the device's Developer options menu).
Also, pulling APK from /data/app/ may be restricted. We can workaround by copying the APK to a directory which we can access then try to pull the APK from there.
2018-11-13 11:38:44 +00:00
Lionel Landwerlin 6d95122189 Do not include Intel counters in the generic ones
At this point we don't have Intel GL counters. But the current logic
assumes there is only AMD ones (and that if it's not AMD's, it must be
the generic ones).
2018-10-23 14:22:25 +01:00
baldurk b5854f0fec Implement VK_EXT_transform_feedback, and use it for mesh output
* For pipelines using tessellation or containing a geometry shader we use
  transform feedback to fetch the output of the vertex pipeline after these
  stages.
2018-10-16 16:53:03 +01:00