Commit Graph

5803 Commits

Author SHA1 Message Date
baldurk bcd08f77a6 Set word wrap on fixed state labels in pipeline viewers
* This allows the pipeline state viewer to have a smaller minimum size
  which is useful when resizing the whole program UI.
2017-07-12 17:29:09 +01:00
baldurk a2004f924f Set default LocalDebuggerWorkingDirectory in the right place
* Somehow vcxproj are order-specific which sounds horrible but doing
  this too early or too late doesn't get picked up.
2017-07-12 16:16:39 +01:00
baldurk 0032a11fc2 Implement global hook feature for Qt 2017-07-12 13:54:12 +01:00
baldurk bf220eed88 Make sure to serialise inject mode with capture settings JSON 2017-07-12 13:45:45 +01:00
baldurk 44b74eb813 Refactor global hooking, to bring it into the C++ OS-specific code
* This way it can be used from Qt or any other UI as well.
* The pipes are created internally and just passed as stdin to the
  renderdoccmd processes instead of being named pipes.
2017-07-12 12:41:39 +01:00
baldurk 7fdd770b15 Don't destroy events that we back into persistently recorded cmd buffers 2017-07-11 20:03:03 +01:00
baldurk dd856a1f1f Remove unused VkBufferCreateInfo structures. Refs #688
* These structs were no longer used since the memory wholeMemBuf was
  added, and they had some confusing enum usage that triggered static
  analysis warnings.
2017-07-11 20:03:03 +01:00
Michael Rennie 00d959d37d Add GL_OES_compressed_ETC1_RGB8_texture. Needed for gfxbench. 2017-07-10 10:38:55 -07:00
Tim Jones 086e661798 Wrap D3D8 vertex and index buffers 2017-07-06 14:04:55 -07:00
baldurk f8b458176a Add stub HLSL generation for editing D3D shaders that have no source 2017-07-06 16:34:48 +01:00
baldurk 575580e13b Don't try to replay vkCmdNextSubpass when doing a single-draw replay 2017-07-06 16:15:44 +01:00
baldurk 419a2ecd42 Add handling for VK_ERROR_OUT_OF_DATE_KHR returned from swapchain funcs 2017-07-06 16:15:10 +01:00
baldurk e3644c3174 Bind all compatible descriptor sets, don't bail at the first one
* When descriptor sets are invalidated and we have stale bindings around
  we cannot bind them or it will lead to invalid behaviour and crashes.
* However it's possible for set 0 to be invalid/stale and set 1 to be
  valid and required, so we can't bail out at the first invalid set. We
  keep iterating and bind all valid compatible sets.
2017-07-06 16:04:23 +01:00
baldurk 01eb50089c Make sure pipelines are used with the right subpass in a partial replay
* When we do a partial replay we truncate the render pass to only have
  one subpass, but pipelines are created for a particular subpass. So
  at creation time we create a new pipeline that points to subpass 0 so
  we can use it later together with the truncated render passes.
2017-07-06 16:03:30 +01:00
baldurk 19ecf36b13 Compile fix for linux with added void* cast 2017-07-06 12:23:15 +01:00
baldurk 3a47aa7840 Support captures where programs are created mid-frame. Refs #684
* This is far more likely when you start capturing at the start of the
  program, but it can happen any other time if you get unlucky.
* Normally we expect the preparation of initial states for programs to
  get all the data ready, but if the program is created during the frame
  capture then that's after preparation, so we need to instead fetch and
  serialise the data at the end of the frame while serialising initial
  contents.
2017-07-06 11:54:06 +01:00
baldurk 750bea339f Add support for queueing capture of a first frame in GL
* This isn't reliable in GL since context creation is such a mess, but
  we go from the first attribs-based context create to the next present.
* Should allow capturing early setup and creation before the first
  render.
2017-07-06 11:53:07 +01:00
baldurk e8c39c956a Return texture ID directly from the image viewer replay driver
* The proxy replay driver might not report an 'internal' ID that doesn't
  have a true live ID, so instead we take responsibility for reporting
  it. The proxy will still return its details when prompted.
2017-07-06 11:51:03 +01:00
baldurk 96201c4762 Fix github wiki URL that didn't end up how I thought it would. 2017-07-05 22:12:19 +01:00
baldurk 358be1a357 Search for the ISA plugins in the arch-specific folders 2017-07-05 22:06:00 +01:00
baldurk 8c794b835a Ignore the plugins folders, if present 2017-07-05 21:54:52 +01:00
baldurk e97fa159b5 Add a 'virtual' GCN ISA target when not supported to display error msg 2017-07-05 21:53:54 +01:00
baldurk e5f674635f Support 32-bit and 64-bit AMD driver DLLs for disassembly 2017-07-05 21:52:35 +01:00
baldurk a6215fa0e7 Include the GCN plugins in the build process 2017-07-05 21:51:43 +01:00
baldurk 79101c7b13 Move DXBC shader friendly naming logic into C++ side code
* This makes more sense and lets us share it between Qt and C# UIs.
2017-07-05 20:37:49 +01:00
baldurk ecf88787d7 Add code to disassemble SPIR-V, glsl and DXBC into GCN ISA.
* Requires binary plugins to function from the RGA repository. These
  will be included with distributions (nightly and stable builds) where
  possible, however D3D disassembly currently requires the AMD driver
  DLL which cannot be distributed. Placing it in the folder with the
  other files will automatically work.
2017-07-05 20:37:48 +01:00
baldurk 13bf08a99e Remove disassembly from shader reflection, request it on demand 2017-07-05 16:31:44 +01:00
baldurk bdf2a68c71 Add shader's ID and entry point to the shader reflection struct
* This allows better identification of a shader from its reflection
  bundle. The entry point was already 'optionally' in the debug info
  struct which is no longer a great location for it.
* For APIs where the entry point isn't contractual and it might not be
  listed, instead we just fall back to 'main'. This means that the UI
  or anyone fetching the info can be guaranteed that some sensible entry
  point will be listed.
* Also for the debug info, remove the 'entryFile' index and instead just
  guarantee that as much as possible the entry point will be in the
  first file in the list.
2017-07-05 16:29:26 +01:00
baldurk c2b0c2d7d8 Add more compilation settings for SPIR-V, including source language
* This e.g. fixes the generation of SPIR-V for GL style GLSL with
  uniforms that are just global not in a UBO.
2017-07-05 16:29:26 +01:00
baldurk 7d5e047e66 Fix serialisation of rdctype::str to always NULL-terminate 2017-07-05 16:29:17 +01:00
baldurk cd0856cd4c Make sure to set m_LastCmdBufferID in vkCmdWaitEvents
* Without this, it's treated as a host operation not a queue/command
  operation and isn't placed correctly in the event stream.
2017-07-05 16:29:11 +01:00
baldurk e2a624e359 Add backwards compatibility code for breakage in 494427aac4
* When Common_preElements was removed, it lost some serialised data.
  Although we don't need it anymore, we at least need to serialise the
  bool indicating no data came from memory so that the serialisation
  lines up.
2017-07-05 16:29:10 +01:00
baldurk 9ffb37a092 Check for data pointer with HasDataPtr. Found by @EBatut-ALG. Refs #684 2017-07-05 16:29:10 +01:00
Cody Northrop ac38e7cb63 os: Add helper to find host temp directory 2017-07-05 16:29:10 +01:00
baldurk 78d64449d6 Fix compilation of qrenderdoc module on VS 2017-07-05 16:29:10 +01:00
Michael Rennie ffc0ee909e UniformVector/Matrix ARM alignment workaround also needed for EXECUTING.
Driver apparently does not protect against non-alignment.
2017-07-03 02:32:44 -07:00
Janos Pantos 1fd5bfa4c6 Fix querying atomic counter buffer info
Since GLES doesn't support glGetActiveAtomicCounterBufferiv we use
glGetProgramResourceiv instead.
2017-06-30 03:47:33 -07:00
baldurk 9b913de877 Release references to duplicate states before re-using existing wrapper
* Fixes a dangling reference that ends up keeing the D3D11 device alive
  and so leaking a lot of memory each time the capture is opened.
2017-06-29 19:40:26 +01:00
Peter Gal beb570c286 Expose a set of GL ES extensions
List of exposed GL ES extensions:
* GL_EXT_clip_cull_distance
* GL_EXT_debug_label
* GL_EXT_debug_marker
* GL_EXT_blend_minmax
* GL_EXT_draw_elements_base_vertex
* GL_EXT_texture_type_2_10_10_10_REV
* GL_OES_draw_elements_base_vertex

All of these extensions already have implementations in RenderDoc
there was just missing entries in the allowed extensions list.
2017-06-29 06:41:54 -07:00
baldurk 50bd5a4dcf Change android build to use lib/ instead of libs/ and only 32-bit apk 2017-06-29 13:06:00 +01:00
baldurk 5e5ec5de4b Don't set devices as parents of the instance
* This causes all devices to be included in the capture, when that isn't
  what we want. If the application creates and destroys some devices
  they must not be included in the capture or we end up with multiple
  devices and can use them in a inconsistent manner.
* The active m_Device is still marked as referenced in the frame so it
  will be pulled in that way.
2017-06-29 11:55:44 +01:00
baldurk 92c545ea06 Fix 32-bit compilation error with explicit VK_NULL_HANDLE comparison 2017-06-28 11:48:13 +01:00
baldurk f190f9af06 Fix global hook shim referencing removed functions
* It was still pointing at old functions, which have since been removed.
2017-06-28 11:24:02 +01:00
baldurk eb5a3f64d1 If RefAllResources is enabled, don't bother to track bound descriptors
* It's not needed as all resources will be included anyway, and it can
  save some time wasted on the tracking.
2017-06-28 11:18:21 +01:00
baldurk d71df3810f Set debug names on objects during replay
* Any 'default' names that just use the ID will be overwritten by any
  proper name the capture gives them.
2017-06-28 10:58:59 +01:00
baldurk 78aca86902 Add an extra GPU sync between submissions on different queues
* If the application did some CPU side synchronisation that's not
  visible in the capture (unlike a queue Wait() which we replay as a GPU
  sync) then there might be overlap that causes simultaneous use
  problems. So instead we sync between submissions on different queues
  to ensure we don't overlap by accident.
2017-06-28 10:54:29 +01:00
baldurk 29726388f6 Fix implementation of D3D12ResourceManager::SerialisableResource
* When referencing all resources we use this function to determine what
  should be excluded, and in this case we want to make sure that e.g.
  the device record and any swapchain records are included, but the
  queue/list records or frame capture record should be omitted as they
  will be included specially.
2017-06-28 10:50:01 +01:00
baldurk 68523abad9 Add a separate command list for data uploads
* Since D3D12 doesn't allow recording to multiple commands at once, if
  we end up doing a partial replay and including a data upload that uses
  a list to upload, we need a separate list and allocator.
2017-06-28 10:48:42 +01:00
baldurk f37079bff0 Use 64-bit counters for tracking compression sizes.
* There's still an issue lurking that the compressed size is stored as
  32-bit on disk, but at least now we don't store the uncompressed size
  as 64-bit but track it as 32-bit.
* The serialisation is going to change Soon(tm) anyway so this
  workaround should be enough for now, since hopefully compressed size
  is comfortably below uncompressed size.
2017-06-28 10:39:11 +01:00
baldurk cfcda0919b Workaround issue creating storage MSAA images on recent AMD driver 2017-06-26 11:13:59 +01:00