Commit Graph
165 Commits
Author SHA1 Message Date
baldurk 6dafc45b8b Allow custom string argument formatting without va_list 2021-05-11 11:03:54 +01:00
baldurk 2e0af1e3ca Fix string issues 2021-04-27 17:13:18 +01:00
Theodore Cipicchio 1e3fc0e320 Fix row count calculation when writing block-compressed DDS data
Block-compressed textures with dimensions that are not evenly divisible
by the block size are typically padded internally to align with the
block size. load_dds_from_file() was previously corrected to account for
this alignment when calculating the number of rows of blocks to read
from a DDS file, but the fix was not applied to write_dds_to_file(),
resulting in missing rows of texels or loading failures when attempting
to open a DDS file generated by RenderDoc from a texture whose
dimensions are not a multiple of four.
2021-04-26 12:18:15 +01:00
baldurk 287da369fc Fix handling of child processes on linux
* We need to ensure we remodify LD_LIBRARY_PATH and LD_PRELOAD before fork/exec
  if the application (say bash running a script) has overwritten them. We also
  don't want these to be accidentally inherited into children if we're not
  hooking children - the same for the vulkan env var, which can't be unset
  immediately on process injection like the others because it needs to hang
  around indefinitely.
2021-03-22 18:37:09 +00:00
baldurk 4de38aef1e Fix issue with DDS writing reading from wrong subresource index for data 2021-02-24 13:52:07 +00:00
baldurk 04e533742f Adjust pitch calculation in saved DDS files to match spec. Closes #2189
* The spec is not particularly clear but this matches the DirectXTex behaviour
  which is as close to 'official' as we'll get most likely.
2021-02-22 17:03:12 +00:00
baldurk 11268b358a Remap block-compressed 3D textures to 2D arrays on GL. Closes #2186 2021-02-22 12:38:43 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +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 76d91d5eef Don't allow static logfile string to destruct before RenderDoc singleton 2020-09-12 23:18:04 +01:00
baldurk e9360a819f Don't pre-allocate such large wrapped pools
* The cost of searching a few more pools to check allocations isn't so bad
  especially if we can move IsAlloc() off the hot path. Better that than
  allocating 100MB in pools.
2020-09-10 13:35:16 +01:00
baldurk 78f1f8f3d1 Remove volatile from Atomic parameter declarations
* This was leaky from windows' InterlockedIncrement etc declarations, and is not
  necessary.
2020-09-09 16:40:04 +01:00
baldurk fa24dc8872 Silence some PVS warnings 2020-08-20 16:11:05 +01:00
baldurk 0859aaa163 Change descriptor set lock to spinlock
* We don't expect contention on this, the only time it will contend is when
  actively capturing a frame between updates and submits reading the descriptor
  contents, so we penalise that case while making the background case faster -
  since a spinlock is 'free' to take when there's no contention.
2020-08-19 14:24:51 +01:00
baldurk 31b7c35bae Fix logfiles not being deleted if captured application is the last user
* Previously only the UI itself would delete the log if it was the last thing to
  close.
2020-08-04 14:48:51 +01:00
baldurk ec6627af03 Use our own isinf/isnan over compiler provided ones that are unreliable
* Due to standards nonsense the availability of isinf/isnan in C++ is quite
  complex and varies a lot between compilers. Trying to access them reliably is
  quite brittle and they're easy to implement with bit-inspection of float
  patterns, so we do that instead.
2020-07-14 13:24:36 +01:00
baldurk 9f0787da33 Keep subpass self-dependencies when making loadRPs. 2020-05-29 14:11:03 +01:00
Rémi Palandri 1dd7aa9296 vulkan low-memory-mode 2020-05-27 22:37:51 +01:00
Kevin McCullough 6a2415f334 Add platform Switch defines. 2020-05-20 15:50:47 +01:00
baldurk 27db02b7e2 Handle legacy DDS headers for more than just RGBA8. Closes #1888
* DirectXTex seems to emit legacy DDS headers for any UNORM format less than
  32-bit per pixel, so we do the same.
2020-05-18 15:20:58 +01:00
baldurk d0bd2e8da2 Fix calculation of number of rows in block DDS formats. Closes #1870
* The number of rows should be the ceiling of the 4-row number, since any
  overlap becomes a whole extra row of blocks.
2020-05-07 12:37:06 +01:00
baldurk f2e9447954 Compress shader cache blobs with zstd 2020-04-22 20:40:14 +01:00
baldurk 6f2dfc1a2b Add support for non-compressed formats in DDS shell preview 2020-04-01 16:55:58 +01:00
baldurk fbe2d1fbee Change ReadAll/WriteAll to take rdcstr instead of char* filename 2020-03-31 18:45:36 +01:00
Arvastra d7af989746 Tidying up. 2020-03-19 17:16:01 +00:00
Arvastra 482114f6f4 Display Thumbnails for dds files. 2020-03-19 17:16:01 +00:00
baldurk 310011999f Add bounds checking for DDS header values 2020-03-12 11:07:58 +00:00
baldurk 936e6372cb Remove use of 3rdparty/ prefix from includes
* We instead always have 3rdparty/ in the relevant include search paths and rely
  on that. Each library still has its own unique base dir within 3rdparty to
  clarify where the include is coming from.
2020-03-11 18:00:53 +00:00
baldurk 4a779e371b Add bracketing to macro use of parameters 2020-01-21 18:28:56 +00:00
baldurk ec5e63a53f Ensure component count is set correctly for special formats. Refs #1688 2020-01-17 19:53:38 +00:00
Jeremy Ong 29403836c6 Fix numerous compiler warnings and errors
Depending on OS and compiler, certain types may not be included
transitively by headers that were included previously. This commit
produces a clean build on the latest trunk versions of GCC, Clang,
and QT.
2020-01-16 23:05:58 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 05a70164f6 Remove use of legacy StringFormat::snprintf variants 2019-12-16 18:10:32 +00:00
baldurk bd9f4fc389 Remove use of vector/string from core project
* This also affects the drivers via interfaces e.g. IReplayDriver and some
  utility functions.
2019-12-16 18:10:31 +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 5f72b9d53c Remove std::string/std::vector use from os-specific layer 2019-12-16 17:06:15 +00:00
baldurk 5f33403849 Switch string_utils to use rdc types 2019-12-16 17:06:15 +00:00
Benson Joeris c51dc2a802 Give ScopedSpinLock move semantics
Change-Id: Ica36b07ee5389953afccf78d9f4db882c73ead3b
2019-12-16 17:04:27 +00:00
baldurk 222816c537 Fix check for DDS flags not to be equality 2019-12-13 12:27:40 +00:00
baldurk 6d1d302491 Fix a number of warnings identified by higher clang warning levels
* We enable a couple of high signal-to-noise warnings in all clang builds
2019-12-02 20:41:28 +00:00
baldurk ff08748238 Ensure all files have trailing new-lines and enforce with clang warning 2019-12-02 20:28:05 +00:00
baldurk 93add323e5 Disable stdout logging 2019-11-29 13:53:44 +00:00
baldurk 03d064beb0 Tighten up handling of unsupported DXGI formats in DDS read/write 2019-11-25 23:36:45 +00:00
baldurk 07dc55c39d Handle depth formats better in DDS loading 2019-11-20 18:37:43 +00:00
baldurk 111ca43800 Fix handling of sub-8bit packed formats in DDS 2019-11-20 18:37:43 +00:00
baldurk d955c5b00c Change defaults when saving DDS to favour unorm variants 2019-11-13 10:11:39 +00:00
baldurk 253194c9a1 Support using atomic-append logging for multiple file outputs
* The primary user is the main logfile itself, but it's useful for debugging
  purposes to be able to log to a file and still open it externally in a viewer
  without having the logging code take exclusive access to it.
2019-10-29 18:08:33 +00:00
baldurk a8baf4fa49 Fix compile error 2019-10-28 19:25:02 +00:00
baldurk b9fbdc0ff0 Add explicit error for legacy CxV8U8 texture format 2019-10-28 12:04:05 +00:00