Commit Graph

1333 Commits

Author SHA1 Message Date
baldurk adaf3b25e6 Remove orphaned file 2015-06-19 22:37:30 +02:00
baldurk b8226fc97c Add new API calls for embedding renderdoc in apps
* This will easily let an application tell if an instance of the replay
  UI is currently connected, and if not launch it and connect. Good for
  integrating renderdoc somewhere where you can trigger a capture, and
  then have the replay UI pop up to either connect live, or open the
  most recently log.
2015-06-19 22:37:29 +02:00
baldurk de61af5921 Add app API function to get number of captures 2015-06-19 22:35:07 +02:00
baldurk 1d96ac2b05 Simplify renderdoc_app.h to remove typedefs and dependency on stl 2015-06-19 22:34:57 +02:00
baldurk cc108d6488 Track and don't show pipeline refcounts to the user
* Some naughty applications assume refcount will hit 0 if they release
  all references but keep the object bound to the pipeline, so for
  compatibility's sake we preserve this behaviour
2015-06-11 21:03:12 +02:00
baldurk f3e25ba194 Add EXT_debug_label enum variants to glObjectLabel 2015-06-10 18:43:19 +02:00
baldurk d4372847f3 Better handling of emulated (luminance/alpha) textures in initial states
* To simplify things we assume there won't be any user swizzling on
  luminance or alpha textures, and just apply our own to emulate rather
  than attempting to store & stack them.
2015-06-09 22:02:05 +02:00
baldurk 9d0c7bd41a In GL don't serialise any texture initial state if storage isn't alloc'd 2015-06-09 21:43:43 +02:00
baldurk ed971316b1 Handle weird unexplained case where texture dimensions query as 0x0x0 2015-06-09 21:22:14 +02:00
baldurk a45b359344 Apply luminance/alpha format emulation to TexStorage* functions 2015-06-09 21:20:51 +02:00
baldurk 0080de6703 Report ARB_direct_state_access in extension string correctly 2015-06-08 19:53:35 +02:00
baldurk 0a61d13d64 Make sure we don't get wrapped DXGI objects created with NULL inner ptrs 2015-06-04 22:29:07 +02:00
baldurk 4f5149a363 Add EXT aliases of glProgramUniform* for EXT_direct_state_access 2015-06-04 22:13:12 +02:00
baldurk 82fe9cdf3e Skip out on save/restore of binding if glBindBuffer target is GL_NONE 2015-06-04 22:12:44 +02:00
baldurk 9d98fe4197 Fix a super scary typo, using the wrong program for glGetUniformLocation 2015-06-04 22:11:36 +02:00
baldurk 1d05cf5e21 Implement Ctrl-F3/Ctrl-Shift-F3 to search for current word/selection 2015-06-04 21:46:35 +02:00
baldurk ae17d239d5 Make sure when loading texture data out of frame, unpack alignment is 1 2015-06-04 21:33:24 +02:00
baldurk 75a9bd4376 Expand out arrays of shader resources at lower priority than non-arrays
* An array of resources like SamplerState foo[8]; or Texture2D blah[8];
  show up as one entry in the reflection data, so need to be expanded
  out to several entries.
* Normally it's OK to overlap two resources in the same bind, as long
  as only one gets used - this doesn't matter to us since only the used
  one will show up in the reflection data. Unless there's an array e.g:
  SamplerState foo[8] : register(s0); // [0] and [5] used;
  SamplerState bar    : register(s3);
  in which case foo[] appears in the reflection data for the sake of [0]
  and [5], and bar will appear too (causing an overlap between foo[3]
  and bar. Since we know the reflection data is unambiguous, we
  prioritise individual entries over array entries by listing them
  first and using the first match for any bindpoint.
2015-06-04 21:04:08 +02:00
baldurk b36876a725 Fix for directly doing pixel history on a depth-stencil texture 2015-05-27 20:48:15 +02:00
baldurk 237fdd773d Make sure to properly cast FrameCapturer device pointer
* External users identify the D3D11 frame capturer by the ID3D11Device *
  but if we don't do that cast explicitly the returned pointer is not
  correct to what is returned to the user on device creation.
2015-05-27 20:36:02 +02:00
baldurk e328e6cd1d Validate SRV parameter to GenerateMips 2015-05-27 20:35:08 +02:00
baldurk 032700d0df Handle the case where the active window gets removed leaving us stuck
* When multiple windows are around if the active window gets removed
  we need to be careful when reassigning the active window.
2015-05-22 21:48:29 +02:00
baldurk 346ce0a778 Handle case where two cbuffers have identical names, assume same order
* Normally the cbuffers when listed in resources (to give the bind point
  info) and the cbuffers listed with their variables are not necessarily
  in the same order, so we match them up by name. It's possible to get
  multiple cbuffers with the same name though, so in this case we just
  have to assume they come in the same order in both lists.
* We do this by appending _s to each duplicate name (so handling many
  duplicates) in both iterations.
2015-05-22 21:48:28 +02:00
baldurk 03a3bafaf9 Make #include filename searching case insensitive 2015-05-22 21:48:27 +02:00
Baldur Karlsson 4e30afba58 Merge pull request #138 from zao/fix/qi-renderdoc-iunknown
Add explicit cast when QI for IRenderDoc_uuid
2015-05-11 23:51:27 +02:00
Lars Viklund 8da2062a89 Add explicit cast when QI for IRenderDoc_uuid
When assigning to the void** output parameter in QueryInterface, ensure
that the pointer written into the output is a COM pointer by casting to
the correct branch of the multiple inheritance.

As commit 2558b2cde introducing this functionality claims to return an
IUnknown*, so does this commit.
2015-05-11 23:23:44 +02:00
baldurk 7e66c2787c Raise limit on zoom to 25600% so manual zoom can be higher. Refs #137
* Still leaving some upper limit so that typos don't result in a zoom
  level of something crazy.
* This also allows 'fit to texture' to zoom in more, but I'm OK with
  that.
2015-05-09 16:23:37 +02:00
baldurk 397ef85342 Prevent unnecessary copies of DXBCFile*
* The DXBCFile* is new'd in the wrapped CreateShader function and passed
  to the wrapped shader instance, and ownership of the pointer lives
  with the ShaderEntry in WrappedShader::m_ShaderList.
* On destruction when a shader removes itself from that list, the
  DXBCFile* is deleted.
* The same lifespan applies to the ShaderReflection*
2015-05-02 16:45:09 +02:00
baldurk 26b9d7902b Bump version for future nightly builds to 0.25 2015-05-02 16:34:58 +02:00
baldurk fc831982eb Add a 'garbage collection' for cached state objects
* In extreme cases a program can create lots and lots of unique short-
  lived state objects, we cache them all and run out of the 4096 state
  objects that can be around, then further creates fail out.
* To handle this, if we have 4000 total state objects, we release any
  that are purely being held by us (not the program). This isn't an
  ideal solution but it's quite simple and non-invasive, and only has
  a slight impact on rare Create calls.
* Most programs will either create a few up-front (as intended), or at
  worst create a few dozen or even few hundred then re-use them as they
  are cached.
v0.24
2015-04-28 13:42:50 +02:00
baldurk 3dac5fe624 Fix calculation for aligning next serialised buffer. Refs #133 2015-04-28 12:21:36 +02:00
baldurk c58c406b20 Mark subresources with data as having data in serialiser
* This means that Map() calls won't redundantly generate more data on
  top of the data serialised with the texture creation chunk.
2015-04-28 12:17:02 +02:00
baldurk 6ce04a391e Fix comparisons being wrong in previous commit 9273a5b. Refs #123
* Thanks to @loosche for catching this mistake!
2015-04-28 10:34:11 +02:00
baldurk 88da82baa7 Actually handle serialised case of program=0 on replay 2015-04-26 21:04:49 +02:00
baldurk ab876ad78f Allow glUseProgramStages program parameter to be 0, unbinding program(s) 2015-04-26 20:17:16 +02:00
baldurk 2dde5ee52d Make sure MultiDraw calls properly create timeline bar sections 2015-04-25 15:59:58 +02:00
baldurk 63824680ea GS output never uses an index buffer (so mesh preview wasn't rendering) 2015-04-25 13:48:57 +02:00
baldurk 5392fc5c4b Make sure buffer alignment happens everywhere serialising needs to match 2015-04-25 13:44:32 +02:00
baldurk 23404656ce Make sure not to try to set empty text to clipboard 2015-04-25 13:19:48 +02:00
baldurk 7339be3c00 Fix crash if Ctrl-C is pressed while no log is loaded 2015-04-25 13:19:37 +02:00
baldurk 1ba89e4b16 Add Ctrl-C copy-paste handler to GL pipeline viewer
* Also fix a crash if ctrl-c is pressed while no log is loaded
2015-04-25 13:14:20 +02:00
baldurk 5279d58781 Update GL supported features in the documentation 2015-04-24 22:12:30 +02:00
baldurk 2558b2cdea Add ways to detect RenderDoc being injected in D3D11 and OpenGL
* D3D11 you query for interface with UUID of
  {A7AA6116-9C8D-4BBA-9083-B4D816B71B78}. It's just IUnknown*
* GL implements GL_EXT_debug_tool with spec here:
  https://renderdoc.org/debug_tool.txt
  with DEBUG_TOOL_EXT #define'd to 0x6789, DEBUG_TOOL_NAME_EXT to 0x678A
  and DEBUG_TOOL_PURPOSE_EXT to 0x678B. For now, reporting this ext is
  enough to identify RenderDoc.
2015-04-24 22:12:30 +02:00
baldurk f576a80cf7 Update Khronos GL header files, change function signatures to match 2015-04-24 22:12:29 +02:00
baldurk 584d439620 Add util function to align serialised buffers in chunks. Refs #133
* To align a buffer inside a chunk to a wider boundary like 32-bytes in
  this case, the chunk needs to be aligned and the buffer within it also
  needs to be aligned.
* The utility function accounts for the buffer serialised having a
  uint32 length in front of it, so it pads out until that will be at
  the desired boundary. This is a bit of a messy solution, but the
  easiest way to ensure the padding is there while being easily
  backwards compatible with old logs without the padding.
* D3D11 and GL serialise versions are bumped, D3D11 version is backwards
  compatible, GL breaks compatibility.
2015-04-24 11:07:02 +02:00
baldurk 24df051659 Skip any empty-named serialised items in serialiser debug text string 2015-04-24 10:21:04 +02:00
baldurk e35fc400dd Make sure to handle debugging 'invalid' indices
* Crash upload fix
* If a vertex is the strip restart index (displayed as "-1") or is
  reading out of bounds of the index buffer (displayed as "-") then we
  should still allow vertex debugging to go ahead, as if the index were
  just 0.
2015-04-21 21:00:51 +02:00
baldurk 392f9b7f2d Clamp texture view slice to number of slices (sanity checking)
* This should in theory be impossible as you can't create a view that
  points to after the number of slices, and we always make a list of all
  slices, but there was a crash report here so for now we'll just clamp
  so that it doesn't crash completely.
2015-04-21 21:00:51 +02:00
baldurk 3701b46611 Handle glGetIntermalformativ being missing
* Fixes a reported crash.
* This function was only core in 4.2 so it's perfectly valid for it to
  be missing - if so then we just skip using it to determine the size of
  a format and default to 8-bit colour or 32-bit depth/stencil formats.
2015-04-21 21:00:50 +02:00
baldurk 49b2cfc8f6 Compile fix for 53a6a94 2015-04-21 21:00:37 +02:00