Commit Graph

584 Commits

Author SHA1 Message Date
baldurk 4451c9d67f Fix semantic comparisons in PipeState::GetVertexInputs() 2019-05-24 17:12:55 +01:00
baldurk e4333291a1 Allow using shader processing tools for custom shaders
* This is primarily useful for HLSL on Vulkan, but could be used with any other
  combination. If multiple tools can perform the conversion, the highest
  priority one is used.
2019-05-22 17:54:10 +01:00
baldurk 694524c7bd Allow querying the shader encoding supported by custom shaders
* This is distinct from target shaders in the remote proxy case - custom shaders
  are built locally.
2019-05-22 16:09:18 +01:00
baldurk 09d7387db2 Add replay API note that top-left co-ordinates are expected
* This is only relevant on GL where co-ordinates are bottom-left, so translation
  from e.g. viewports or scissors are required.
2019-05-22 12:03:24 +01:00
baldurk 06feec392d Use pipeline base mip/slice binding for texture thumbnails. Closes #1327 2019-05-20 13:13:47 +01:00
baldurk 8aa515a47a Make drivers m_Events a direct lookup
* Rather than doing an expensive iteration for looking up m_Events, just index
  by eventId which will be very dense.
2019-05-20 12:24:41 +01:00
baldurk e48065c96b Replace use of std::pair with rdcpair wherever possible
* Only remaining uses in our code is when we're interacting with std::map where
  it uses std::pair internally
2019-05-17 16:32:56 +01:00
baldurk 51c50e0da3 Localise addressing mode state display for GL
* On GL addressing modes are called wrap modes, and the wrap value is then known
  as repeat. If we don't 'localise' this then it can be confusing to show that
  it is "Wrap".
2019-05-17 16:32:55 +01:00
baldurk 699f8753af Convert ToStr, Serialise, and TypeName to use literal strings 2019-05-15 14:12:17 +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
Alex Vakulenko ca2307e34c Make it possible to write chunks larger than 4 GB
Added a special chunk flag indicating that chunk size is a 64 bit value.
This allows to handle larger chunks (which heppens quite rarely) while
still maintaining backward compatibility with the majority of traces.

Bumped RDC file version of 0x101 (1.1) to make sure older version cannot
read the new file format.
2019-05-10 10:25:26 -07:00
baldurk 7db90232f9 Allow creating completely headless outputs and reading back their output
* This is useful when writing automated tests that want to test the output of
  rendering which only happens to outputs, such as mesh rendering, or could
  potentially be bypassed with direct readback like GetTextureData vs rendering
  a texture.
2019-05-06 15:52:43 +01:00
baldurk 6b97a9cffa Bump version to 1.5 2019-04-29 13:54:14 +01:00
baldurk d599110c3f Bump version to 1.4 2019-04-26 17:04:12 +01:00
baldurk 6540c6e445 Add bounds check when looking up constant buffer on vulkan 2019-04-22 18:39:53 +01:00
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