Commit Graph

8576 Commits

Author SHA1 Message Date
Benson Joeris 6fa39fbbcb Add InitReqType to classify FrameRefType by init/reset requirements.
The accumulated `FrameRefType` of the accesses to a resource within a frame
determines how the resource needs to be initialized. The possibilities are:

* `None`: The initial value of the resource is never used within the frame,
  either because it is never read, or because it is only read after being
  cleared
* `InitOnce`: The resource needs to be initialized before replaying the frame
  for the first time, but does not ever need to be reset; this occurs when a
  resource is read within the frame, but not written within the frame.
* `Reset`: The resource needs to be reset each time before replaying the frame.
  This occurs when the resource is read and later written within the frame.
2019-02-12 10:09:55 +00:00
baldurk 264fd6ac39 Fix linux build 2019-02-08 20:19:35 +00:00
baldurk c6b02c4d0c Pull adb logcat from renderdoc into log on host machine
* This makes post-mortem debugging easier. It's only active while a remote
  server connection is running, so e.g. it will miss crashes of the remote
  server itself, this could be improved by adding a margin where it will still
  check for messages after the connection is dropped - perhaps on a separate
  thread.
2019-02-08 19:16:26 +00:00
baldurk dad5d6e074 Display full name if executable has no path markers
* Most likely this executable is an android app and we should display the full
  thing
2019-02-08 19:16:25 +00:00
Haiyu Zhen ca54a910f5 Add --replayhost command line option for qrenderdoc
This allows users to specify which remote host to connect to on startup.
2019-02-07 23:46:33 +00:00
baldurk 4699b459e5 Add trailing / needed on the end of canonical_url for docs 2019-02-07 16:56:19 +00:00
baldurk 852d345bf7 Save the queued frame capture settings with settings files 2019-02-07 15:23:07 +00:00
baldurk ac357a8dec Fix handling of saturate on NaNs in DXBC.
* The definition is specifically using chained min/max which return the other
  argument if one is NaN, so a NaN being saturated is guaranteed to return 0.
2019-02-07 15:23:07 +00:00
baldurk fc9249842a Correct description of float controls - min/max is for decimal places
* This wrongly said that it controlled the number of significant figures.
2019-02-07 15:23:07 +00:00
baldurk be67e91cc7 Add testing of saturate on NaNs in D3D shader debug 2019-02-07 15:23:06 +00:00
baldurk 31fa519e72 Add support for VK_EXT_scalar_block_layout 2019-02-07 15:23:06 +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 134cdfd09b Add tests to CBuffer Zoos to test alternate uniform sources on APIs
* Vulkan: Specialization constants
* OpenGL: Bare uniforms (not in a UBO)
* D3D12: Root signature constants
2019-02-07 15:23:06 +00:00
baldurk 8ca7730c65 Fixes to fetching bare uniform values 2019-02-07 15:23:06 +00:00
baldurk e79b2d16b2 Tidy up FillCBufferVariables across APIs and share implementations
* On D3D the implementation was severely complicated by two parallel paths - one
  that 'flattened' vec4s out into easy-to-consume format for debugging. Instead
  we do this as a post-process transformation now in the debugging itself.
* Similarly D3D's implementation used DXBC data directly to fetch data, when all
  of the information needed is in the ShaderConstant arrays and used by Vulkan.
  This allows us to share the implementation.
* Only GL still needs its own implementation since it needs to query the API for
  offsets etc as it can change unreliably and can't easily produce a standard
  reflection data. We do share the 'read from buffer data' implementation
  though.
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
Danylo Piliaiev cf0353e630 Fix vulkan overlay crash due to incorrect colorAttachment idx
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
2019-02-07 11:58:42 +00:00
baldurk 9e0e87b0a0 Update SPIR-V tools list, treat shaderc the same as glslang 2019-02-06 23:44:51 +00:00
Benson Joeris e92f2915d4 Fix bug in resource tracking for resources bound in descriptor sets 2019-02-06 23:44:10 +00:00
Benson Joeris a9cedfda25 Add range info to Vulkan memory tracking.
In the capture-time tracking of resource usage, this change adds information on
the offset and size of accesses to Vulkan VkDeviceMemory. This information is
curretnly discarded, but will be used in a later change to implement
finer-grained usage tracking for VkDeviceMemory.
2019-02-06 21:37:58 +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 3dfe4a2a8f Add support for VK_EXT_calibrated_timestamps 2019-02-05 18:40:32 +00:00
baldurk 61c0a41767 Add support for VK_EXT_validation_features 2019-02-05 18:40:31 +00:00
baldurk 4a9212861e Add support for VK_EXT_separate_stencil_usage 2019-02-05 18:40:31 +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 cb9fc1dc4f Update vulkan headers in demos project 2019-02-05 18:40:31 +00:00
Benson Joeris cf74b67660 Refactor FrameRefType and add Clear reference type
This change simplifies the `FrameRefType` enum by removing the separate states and
transitions, and replacing them with a smaller set of reference types, together
with functions that compose those reference types.

This change also introduces a `Clear` reference type, which is used to represent
an access to the resource that completely overwrites the previous contents; this
is in contrast with a `Write` access that may leave some of the previous
contents untouched.
2019-02-05 18:40:16 +00:00
baldurk 0f29c40c5f Fix implementation of glFrameTerminatorGREMEDY 2019-02-05 10:42:47 +00:00
baldurk 99910959ee Provide GREMEDY GL extensions even if not supported by the driver 2019-02-05 10:42:37 +00:00
baldurk 2a80fd29d0 Don't look for source.properties to check valid SDK path
* This file isn't always there apparently. Instead just look for a build-tools
  folder which must be present.
2019-02-04 19:21:10 +00:00
baldurk 5ecdb18ea7 Add support for VK_EXT_memory_budget and VK_EXT_memory_priority 2019-02-04 19:21:10 +00:00
baldurk 8a17f89f53 Update vulkan headers to 1.1.99 2019-02-04 19:21:10 +00:00
baldurk 00c4e3265d Update brew packages needed for autotools on mac 2019-02-04 18:06:11 +00:00
baldurk a79e047e5d Reorganise linux dependencies section, and update Ubuntu instructions 2019-02-04 18:06:11 +00:00
baldurk b5a6e815b9 Locate android SDK/NDK up front from various env vars before building
* We need to locate it before setting the toolchain file, so checking when
  building renderdoccmd is too late. This also lets us print where the SDK/NDK
  is found, and add error messages if we don't locate it properly.
2019-02-04 18:06:10 +00:00
baldurk 61b39c80a1 Update VerifyMapWrites option to VerifyBufferWrites option in API docs 2019-02-04 18:06:10 +00:00
baldurk 18af132601 Update API documentation to mention SetCaptureFileComments 2019-02-04 18:06:10 +00:00
baldurk f20e871510 Add option to make y-flipping a per-texture state instead of global 2019-02-04 18:06:10 +00:00
baldurk 2853029847 Don't make overly-general matches when looking for constants by name 2019-02-04 18:06:10 +00:00
baldurk 36770522d7 Fix shaderviewer shortcuts using QShortcut which doesn't work well 2019-02-04 18:06:10 +00:00
baldurk 73a5357419 Fix handling of primitive restart with a vertex offset 2019-02-04 18:06:09 +00:00
Lionel Landwerlin 12ce67b228 Add GL Intel performance counters support
Intel published a performance query extension support defined back in
2013. This is available on Windows & Linux (in the Mesa driver). This
should provide the same types of counters as the MDAPI backend for
DX11.

Frameretrace [1] (a fork/branch of Apitrace) uses the same extension.

v2: Fix build without OpenGL
    Simplify logic to enable counters
    Warn about non enabled counters on Linux/Mesa
    Generate counter Uuid

v3: Turn asserts into errors
    Don't load perf entry points manually

v4: More clang-format

v5: Fix some Windows conversion warnings

v6: Fix errors on Windows where the driver reports an error on
    glGetPerfQueryInfoINTEL as a mean to say that the queryId cannot
    be used through the extension

v7: clang-format

v8: Initialize variable passed by pointers to GL entry points

v9: Only try to use the INTEL_performance_query on Mesa, experience
    shows the Intel Windows driver doesn't report anything useful.

[1]: https://github.com/janesma/apitrace/wiki/screen-shots
2019-02-04 15:54:33 +00:00
Remi Palandri 550d5477d8 shorten android capture option str 2019-02-04 10:50:25 +00:00
baldurk acbe682392 Explicitly skip system builtin inputs in GL reflection
* Some drivers (e.g. macOS) will still return a location even for gl_.. builtins
2019-02-01 18:32:14 +00:00
baldurk b178ae800c Add Catch.hpp StringMaker template specialisation for rdcstr
* Otherwise it gets identified as a 'range' with begin() / end() and "foobar"
  gets printed as { 'f', 'o', 'o', 'b', 'a', 'r' }
2019-02-01 18:32:14 +00:00
baldurk 3a79d7e069 Block queries for undocumented DWM interfaces.
* Nomachine is one program that requests these, but has a fallback path for if
  they're not available. Denying the request makes things more compatible.
2019-02-01 18:32:14 +00:00
baldurk aa1df3cb1e Don't deserialise elements of arrays unless the array is non-NULL.
* This is protection just in case the array-size is wrong and we bailed before
  serialising the array itself.
2019-02-01 18:32:14 +00:00