Commit Graph

8631 Commits

Author SHA1 Message Date
Benson Joeris 5bc993f01f Mark simple copies into VkDeviceMemory as CompleteWrite 2019-02-18 17:23:09 +00:00
baldurk 1713dcad1b Fix typo in python version macro use in renderdoccmd 2019-02-15 18:17:34 +00:00
baldurk 5484bcbf1a Don't error if a non-existant file is passed via TestFailureException 2019-02-15 18:17:20 +00:00
baldurk 7ef8ed0a7a Drop the requirement for PIL in the tests, use pypng drop-in replacement
* This means we no longer need to import PIL from somewhere else if we run via
  renderdoccmd test functional
2019-02-15 18:17:06 +00:00
baldurk 24882eb486 When event changes in BufferViewer, preserve row offset don't reset 2019-02-15 15:10:31 +00:00
baldurk c72e79960e Allow launching demos program with no arguments to see test selection 2019-02-15 14:55:30 +00:00
baldurk 69dc9f8031 Print prefixed output in a single call to rdclogprint_int
* On android each call to rdclogprint_int goes onto its own line in the logcat
  output, so we need to combine the prefix externally.
2019-02-15 11:55:51 +00:00
baldurk 9ee4795948 Don't underflow when reading padding if serialiser is in an error state 2019-02-15 11:28:27 +00:00
baldurk 982ef03fd1 Fix android build 2019-02-14 22:34:16 +00:00
baldurk 35c1aab64d Update CI to run the correct unit test command 2019-02-14 22:01:52 +00:00
baldurk 8603420d86 Remove vkCopyDescriptorSet path from vulkan postvs fetch entirely
* The workaround had to be removed on Android due to buggy drivers, but it's
  unnecessary in general.
2019-02-14 21:25:25 +00:00
baldurk d579bf209c With multi-line logs, reprint the prefix each time
* This means a bit more regularity to the log prints and allows them to be
  parsed on android.
2019-02-14 18:09:15 +00:00
baldurk 79a626a8e1 Put android logcat processing onto separate thread
* This allows it to tick faster when e.g. loading a capture that takes a while
  without any pings. It also allows it to continue going for a short while after
  the remote server shuts down to capture any crashdump messages.
2019-02-14 18:01:09 +00:00
baldurk fb9aac95d1 Add function to detach from a thread 2019-02-14 16:54:40 +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 634040d4b5 Change working directory to script location for running functional tests 2019-02-14 15:15:45 +00:00
baldurk ce991e421a Drop psutil requirement in functional tests, fetch memory usage directly 2019-02-14 15:08:28 +00:00
baldurk 0753793f24 Allow passing --help or -t to test commands in renderdoccmd
* Previously it would be swallowed and processed as the argument to the test
  command itself. We need to do a little manual parsing and stop cmdline from
  doing too much work.
2019-02-14 13:17:19 +00:00
baldurk 6b571e9a06 Don't return from parse() if argc is 0, need to check required arguments 2019-02-14 13:09:43 +00:00
baldurk 0e926ee258 Fix broken timeout calculation causing intermittent CI failures
* It turns out that min(0, x) is 0, and not a great way to prevent underflow!
2019-02-14 12:56:55 +00:00
baldurk e9e42839c3 Support specifying structs in buffer formatter. Closes #805
* Structs and arrays-of-structs are completely flattened for the purposes of
  displaying them still.
2019-02-14 12:55:44 +00:00
baldurk f8d490d9e6 Add newline to end of file to satisfy gcc 2019-02-13 21:21:23 +00:00
baldurk 03a786c8ba Fix missing calling convention on ID3DInclude implementations 2019-02-13 21:04:34 +00:00
baldurk 96d43b6875 Only include glsl_shaders code when building a driver that needs it 2019-02-13 21:03:48 +00:00
baldurk 57b703d2ab Fix compilation on windows with missing calling convention specifier 2019-02-13 20:57:25 +00:00
baldurk b41eb9b91b Remove WireframePS that's no longer used or defined 2019-02-13 18:50:56 +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 166bd285ae Add help output when running demos program 2019-02-13 18:50:56 +00:00
baldurk 28e0e17d16 Enable scalar block layout feature in VK_Adv_CBuffer_Zoo 2019-02-13 18:50:56 +00:00
baldurk 014619eaf9 Add D3D11_RESOURCE_MISC_SHARED in GL/DX interop tests
* Necessary for it to work correctly on AMD
2019-02-13 18:50:55 +00:00
baldurk 5e62d828d7 Add support for EGL_EXT/KHR_swap_buffers_with_damage 2019-02-13 18:50:55 +00:00
baldurk 35294607f5 Update docs with new GL extension requirements 2019-02-13 18:50:55 +00:00
baldurk deb3f4d92c On macOS call glFinish before changing away from any context 2019-02-13 18:50:55 +00:00
baldurk eccf1add8a Don't try to compile quadwrite shader if required extensions are missing 2019-02-13 18:50:55 +00:00
baldurk 0df9e33b6b Bind a dummy texbuffer for GL render texture, as macOS seems to need it 2019-02-13 18:50:55 +00:00
baldurk 766c1a9bb9 When patching shaders for separability, declare the extension 2019-02-13 18:50:55 +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 69c668c27c Suppress GL hooks on apple while in CGLFlushDrawable 2019-02-13 18:50:54 +00:00
baldurk f250f19e02 Ensure apple hooks work for unsupported functions
* dlsym() seems unreliable if we've interposed the function, so instead fetch
  the function at compile time which works better.
2019-02-13 18:50:54 +00:00
baldurk 9a50a151d0 Use CGL queries to fetch pixelformat details and backbuffer dimensions 2019-02-13 18:50:54 +00:00
baldurk 9ff90117f8 Add glBlendEquationARB alias for glBlendEquation 2019-02-13 18:50:54 +00:00
baldurk d289d3ac20 Remove requirement for ARB_sampler_objects
* We just modify the texture sampler parameters temporarily and restoring them
  when we're done
2019-02-13 18:50:54 +00:00
baldurk f2d092640f Emulate ARB_vertex_attrib_binding on replay if it's not available
* Fortunately the extension doesn't add any functionality that can't be achieved
  through the old bindings, it's just better decoupled.
* What we do is set up our own VAO attrib/binding tracking, and translate all
  the functions (old and new style) into the equivalent modifications of that
  state, then each time a change happens we flush out the attribs and bindings
  using the old attrib functions.
* We also intercept the queries to the new bindings and return the right values,
  so even if loading a capture that uses ARB_vertex_attrib_binding would work as
  expected (as all the translation to old bindings happens under the emulation
  layer).
2019-02-13 18:50:53 +00:00
baldurk 180b6f7cdc Remove use of shading_language_420pack and explicit_attrib_location
* On GL we can manually set these bindings when needed, and then we don't
  require those extensions.
2019-02-13 18:50:53 +00:00
baldurk 11819ed3be Refactor and clean up internal shaders to be better organised
* Split up old uber-cbuffers used for unrelated shaders into shader-specific
  cbuffers (DebugPixelCBufferData -> TexDisplayPSCBuffer / CheckerboardCBuffer /
  MeshPixelCBuffer).
* Split up HLSL files so not everything is lumped into 'debugdisplay.hlsl' but
  has separate files as appropriate.
* Use #include in GLSL and HLSL to better organise shader code together rather
  than relying on lumping files together on the C++ side.
* Renamed files like 'debugcbuffers.h' to 'hlsl_cbuffers.h'.
* Trimmed out some extensions/cruft that isn't needed in the GLSL side since we
  no longer use separable shaders.
* Combine some shaders like Outline/Checkerboard that were similar into central
  place.
2019-02-13 18:50:53 +00:00
baldurk ac95d0ff48 When ending partially replayed RP, set image back into layout afterwards
* If we have a renderpass that we stop replaying at subpass 0, we want to
  pretend that the image is preserved as it was at that point - layout and all.
  However since we're replaying with the original renderpass any subpass
  transitions and finalLayout transitions will take effect. When we end any
  active RP during vkEndCommandBuffer, we then undo any of these implicit
  transitions to put the image back as it was.
2019-02-13 18:50:53 +00:00
baldurk e73c3a0d6b When plt hooking on linux, need to patch all hooked functions
* If a library is loaded as RTLD_DEEPBIND it might be linked directly against
  libGL, in which case we need to plt hook the functions we care about as well
  as just dlopen.
2019-02-13 18:50:53 +00:00
baldurk 78b03633fa Even RTLD_GLOBAL loads can be linked to libraries we care about
* When a library libBlah.so is loaded, it might be linked to libGL.so. If so, we
  need to go populate our original functions and perform any callbacks when
  libGL.so gets loaded as a dependency. This is true even if the library isn't
  loaded as LOCAL.
2019-02-13 18:50:52 +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
Benson Joeris d438adb701 Fix bug in Intervals<T>::update
When `Intervals<T>::update` was called with `finish=UINT64_MAX`, the loop
condition `i->start() < finish` would remain true for every interval, until `i`
went past the last interval, at which point `i->start()` (and all the other
accesses to `i` within the loop) have undefined behaviuor.
2019-02-13 17:43:33 +00:00