Commit Graph

1013 Commits

Author SHA1 Message Date
baldurk fb4e6e0a8a Add message about non-32bit UAV loads 2015-01-11 00:50:55 +00:00
baldurk 43f55a7cdc Add several more shader warning messages, add utility function 2015-01-11 00:44:37 +00:00
baldurk 04f1d4a378 Centralise debug message processing, and allow adding custom warnings
* This will allow the adding of things like 'redundant api call' for calls
  that have no effect, as well as potential problems like drawing with an
  empty viewport, or similar things that are common problems. Reading out-
  of-bounds on buffers etc is a good example of 'defined' behaviour that
  is probably not desired.
* These heuristics could also identify potential performance problems.
* It also supports adding debug messages after log-load time, so you could
  do an additional extra-strength pass, or do a detailed check of one
  draw call (e.g. a broken draw, to try and figure out the problem). If
  there are any unread debug messages, the status bar will flash and the
  debug messages window will show a count as (N).
2015-01-11 00:20:50 +00:00
baldurk 6de7644e68 Don't bail out quite so quickly if vertex buffers are insufficient
* This allows 'partial' rows in the mesh viewer, if a vertex input element
  references invalid/out of bounds data, but the others are fine (coming
  from different streams).
2015-01-09 00:48:18 +00:00
baldurk 4cf8d1a2ce Fix massive memory leak if shadow storage was continually allocated
* When idle if we map a resource that doesn't have backing store (like a
  texture that wasn't initialised on creation) we create shadow storage
  for the map. We only need it temporarily, so make sure to free it after
  we unmap, otherwise it will stick around for hte lifetime of that
  resource (!).
2015-01-07 23:52:39 +00:00
baldurk aded77cf1c warning disable on 64bit 2015-01-07 09:42:16 +00:00
baldurk 1c9269fc8d Add simple OpenEXR save/load support using tinyexr
* Thanks to https://github.com/syoyo/tinyexr for the load and save code!
2015-01-06 17:43:19 +00:00
baldurk 4a73f69821 Split LoadEXR and SaveEXR to expose functions that take a FILE* 2015-01-06 17:41:54 +00:00
baldurk 30ad13ff25 Ignore compile warnings in tinyexr code
* To avoid making too many changes downstream from tinyexr, I just ignore
  these warnings.
2015-01-06 17:38:48 +00:00
baldurk d2f51deca9 Add tinyexr from https://github.com/syoyo/tinyexr
* Unmodified, from revision 14ba590a376ffcb2436ede10f122a3d1797db4c4
2015-01-06 16:53:40 +00:00
baldurk 6952166271 remove extension listed twice 2015-01-06 16:34:11 +00:00
baldurk cc9490c977 Implement GL_ARB_shading_language_include (untested) 2015-01-05 20:55:26 +00:00
baldurk 133d363f29 Fixes for commenting INCLUDE_DXGI_1_2 to build without win8.1 SDK 2015-01-05 17:18:39 +00:00
baldurk 26ac392e79 Add note about new DXGI stuff to undefine if only using the DX SDK 2015-01-05 15:28:36 +00:00
baldurk 5cb999e970 Update extension support and add comment about upcoming extensions.
* Based on g_truc's latest hardware support matrix:
  http://www.g-truc.net/doc/OpenGL%204%20Hardware%20Matrix%202015-01.pdf
  and browsing of the registry.
2015-01-05 11:06:12 +00:00
baldurk 9df7d73b94 Only treat read-only maps as special, not read-write maps 2015-01-05 10:37:03 +00:00
baldurk c63f44f0aa Make sure to destroy GL debug context and associated resources 2015-01-05 02:15:00 +00:00
baldurk 85b9d7535a Make sure destructor is called for each element 2015-01-05 01:46:36 +00:00
baldurk 7d0579c594 Make sure preview window is destroyed on exit (just to be proper) 2015-01-05 01:18:57 +00:00
baldurk 6c3f803387 Make sure m_RenderData member is cleared 2015-01-05 01:03:20 +00:00
baldurk 3172dd733a Delete argv array 2015-01-05 01:03:19 +00:00
baldurk ef03332408 Fix memory leak in StringFormat::sntimef 2015-01-05 00:34:03 +00:00
baldurk 206704fe12 Fix missing reference releases 2015-01-05 00:22:42 +00:00
baldurk ee37bca573 Implement Process::CreateAndInjectIntoProcess on linux
* It's not exactly feature parity but it's a start, and any UI would use
  this under the hood.
* This means at least linux has a semi user-friendly way to launch and
  capture programs - it's limited but you can just use
  $ ./bin/renderdoccmd -c /path/to/program "argument string"
  from the root of the repository.
* Logfile and capture options (which can't be set yet, but you could easily
  hack in something to set them in renderdoccmd.cpp) are passed via
  environment variables to the child process.
2015-01-04 01:02:05 +00:00
baldurk 1d401c9faa Allow passing arguments to target program in renderdoccmd args 2015-01-04 00:59:02 +00:00
baldurk dc8ed153ac Implement callstack gathering and resolution for linux.
* At the moment it only works if the files from the capture are in the
  exact same absolute paths (so generally on the same machine or same
  distro will likely satisfy this, if the library versions are unchanged).
* Also since linux doesn't have a built-in way of verifying that symbols
  match via GUIDs there's no checking yet. We could md5 or otherwise hash
  the files to make sure they match.
* If there is no match at all we don't prompt for better symbols currently.
* I've added a little platform stamp onto the start of the module database
  per-platform just so linux/windows won't try to load each other's symbols
  as otherwise the logs are cross-platform. I didn't bump the serialise
  version as this is a rarely used (and transient, typically) feature, so
  not worth adding backwards compatiblity code. Symbols from an old windows
  log won't resolve but that's not a problem. Symbols from a new log won't
  load and will probably crash in an old version, but I'm not worried about
  that.
2015-01-03 19:30:06 +00:00
baldurk 69bbc5e779 Implement GetAppFolderFilename on linux, unused at the moment 2015-01-03 18:49:02 +00:00
baldurk 7c2d739d06 Make const Stackwalk object return const uint64_t* pointer 2015-01-03 18:48:49 +00:00
baldurk 5496db36bd Don't erase structure with STL members like a big fat idiot 2015-01-03 18:47:36 +00:00
baldurk 415f956744 Implement FileIO::Copy for linux just using fopen and fread/fwrite 2015-01-03 14:57:49 +00:00
baldurk 0346ac8d34 Copy final outputs to bin/ folder on linux 2015-01-01 19:28:50 +00:00
baldurk 42db228452 Add runtime linker path on linux so lib can be found in cwd 2015-01-01 19:28:20 +00:00
baldurk e8391b9c71 Move some information over to COMPILE.md 2015-01-01 15:19:09 +00:00
baldurk 6fde127360 Refactor projects so we don't use xcopy to copy build outputs around
* This makes it easier for my auto build scripts (i.e. without xcopy use
  I can run them from msysgit bash).
* pdblocate now has Profile32&Release32 vs Profile64&Release64. This was
  the easiest way to do it as it has to be compiled in 32bit to interact
  with DIA, but we want it copied to the solutions output folder (x64/...
  or Win32/...)
2015-01-01 11:23:53 +00:00
baldurk 2aaf9e1611 Linux compile fixes 2015-01-01 01:25:09 +00:00
baldurk f167423a4b Create full set of cubemap faces from a single glTexImage2D chunk
* We try and avoid multiple glTexImage2D chunks and instead mark the
  texture as dirty if the parameters are the same. This is to avoid the
  case where it's called repeatedly just to upload new data. However this
  breaks for cubemaps since that's the one case where you HAVE to call it
  multiple times just to create the texture. Once for each face-target.
  So to compensate, we manually do this with the same parameters, then let
  it be overwritten by later chunks & initial data.
2014-12-31 00:00:36 +00:00
baldurk d75b62c072 In case drawbuffers is set to GL_BACK, just set to COLOR_ATTACHMENT0
* This is invalid since we are talking about real FBOs, not the default
  FBO, but it might come up in compatibility context programs and it's
  harmless to correct to try and replay correctly.
2014-12-30 23:56:10 +00:00
baldurk 6c635e3157 For ease of use, skip glDisable for any deprecated compat caps
* This is for working with compatibility profiles, which I only plan to do
  when it's harmless little tweaks like this. Not in a significant way
  (like supporting the fixed function pipeline, display lists, etc).
* The theory here is that glDisable on a deprecated cap is 'harmless' as
  it's already off by not existing. And maybe when capturing a mostly-core
  program that has some legacy code or runs in compatibility, it calls
  glDisable for these caps but never plans to use them. So we can ignore it
* If glEnable is called though, we serialise that and it will fire errors
  and the replay will be wrong. That doesn't change.
2014-12-30 23:51:47 +00:00
baldurk c1727e9035 Don't initialise VAO if attribs have invalid parameters
* Technically we need to try and restore the VAOs even if disabled to the
  correct setup, so that if they're just enabled they are in the expected
  state. However if the attribs are in an invalid state it's not legal to
  just enable them again, so they need to be respecified anyway.
* This might have something to do with compatibility profiles - it was
  seen capturing Wolfenstein: The New Order, which runs 3.2 compatibility.
2014-12-30 23:49:44 +00:00
baldurk 29f7234219 Emulate alpha and intensity formats the same way we do for luminance 2014-12-30 23:48:15 +00:00
baldurk ea5d17989c Compile fix 2014-12-28 20:11:16 +00:00
baldurk efdffaef6e Support all the crazy different pixel store unpack parameters
* If the pixel store parameters are relatively simple we go through a
  fast path that's about the same as it was before, otherwise we manually
  unpack to a tightly packed buffer for serialising. Hopefully this should
  rarely happen.
* glPixelStore parameters are only serialised when capturing a frame, and
  the pixel store parameters at frame start form part of the initial state
  vector.
2014-12-27 01:07:03 +00:00
baldurk f73a7a4a0c Support ARB_map_buffer_alignment on 64byte boundaries
* The real implementation can do more if it wants, and align to a larger
  alignment, but we just return 64 to the program and align to that, which
  satisfies the extension minimum requirements (and chances are no program
  takes advantage of wider alignment anyway).
2014-12-26 16:04:22 +00:00
baldurk cd53d97418 Fix using wrong pointer as 'window' handle for frame capturer 2014-12-26 16:02:26 +00:00
baldurk 1c53c4a3e6 Support ARB_indirect_parameters properly. Bump GL serialise version 2014-12-26 15:44:51 +00:00
baldurk 2788069f4a Add an optional context when debug messages are logged
* Many debug messages are completely useless without context, so to track
  down bugs in crashdumps with logs, etc, it would be very useful to add
  a little snippet to show what function call the message was fired from
  and what the parameters were.
* I'll just add these as/when necessary for tracking bugs.
2014-12-26 12:54:48 +00:00
baldurk fd9d49f13e Add a print of current GL vendor/renderer/version when doing checks 2014-12-26 12:50:59 +00:00
baldurk 23fd72b6ef Fail in a friendly way (ie. not crash) if EXT_dsa isn't present
* Eventually I'll add a wrapper layer so that if EXT_dsa isn't present then
  it just gets emulated, but for now we require it to be present even if
  the captured program didn't use it.
2014-12-26 12:35:27 +00:00
baldurk 4647eee9f2 Handle repeated re-specifying of buffer textures by marking dirty
* Also added handling for dirty buffer textures - there are no contents to
  copy, those are handled with the buffer, so instead we just grab the few
  parameters that are valid to re-specify the buffer texture.
2014-12-26 12:25:41 +00:00
baldurk aec7af04e4 If we're retyping in BindBuffer(), remove any redundant BindBuffer()s 2014-12-26 12:21:43 +00:00