Commit Graph

949 Commits

Author SHA1 Message Date
baldurk 97afe6816a Fixes for mesh viewing on output stages 2014-12-21 13:02:47 +00:00
baldurk fafa036c37 Fix wchar_t to char conversion in renderdoccmd on win32 2014-12-21 12:48:03 +00:00
baldurk f1f72ec8ff Add process for programs to voluntarily remove renderdoc. Refs #115
* To remove renderdoc (e.g. if the API version doesn't match what is
  expected), user code can call RENDERDOC_Shutdown() to remove the running
  thread and undo any library hooks, then unload the dynamic library.
* This still isn't recommended as there could be unexpected side-effects,
  and it will definitely break if this happens after any APIs have been
  initialised, but it's an option.
2014-12-21 11:30:29 +00:00
baldurk 0df6e36ff5 Allow displaying any semantics as 'position' on mesh output view
* This means you can visualise the UVs directly, not just as a colour
  on the regular mesh.
2014-12-20 19:54:52 +00:00
baldurk 3dd6d7d296 Add a note about vendor-specific extensions not being supported 2014-12-20 19:54:52 +00:00
baldurk 3be08dbb71 Add a few more extensions we support, and some more we never will
* There are a handful of ARB and EXT extensions left that aren't in either
  the list of supported, or will-never support. These are ones that I want
  to support but haven't written the code for.
2014-12-20 19:54:51 +00:00
baldurk a1e3d80a6d Add a list of extensions that I never plan to support. 2014-12-20 19:54:51 +00:00
baldurk 9da77952e2 Add some EXT aliases and then report more supported EXT extensions 2014-12-20 19:54:51 +00:00
baldurk 44cdab44b4 Add some more easily-implemented extensions 2014-12-20 19:54:50 +00:00
baldurk da93a4e0a0 Implement KHR advanced blend equation extensions 2014-12-20 19:54:50 +00:00
baldurk c02a8d7786 Implement GREMEDY string marker and frame terminator extensions
* We don't try and detect duplicate markers between GREMEDY and KHR_debug,
  just assume the program is smart enough to detect that both are available
  and pick only one to use.
2014-12-20 19:54:50 +00:00
baldurk 00ee02eabc Implement EXT_polygon_offset_clamp 2014-12-20 19:54:49 +00:00
baldurk af4b0c1114 Update to latest Khronos headers. 2014-12-20 19:54:49 +00:00
baldurk 81a09a7323 Fix a few typos, mostly using #define enum values not typed enum 2014-12-20 19:54:49 +00:00
baldurk ee55bb43a3 Intersect renderdoc supported exts against driver supported exts
* For each context on first activation we fetch the extensions supported by
  the implementation, and intersect that with the list of extensions that
  renderdoc itself supports, so we return to the application the subset
  of 'real' supported extensions that we can support ourselves.
2014-12-20 19:54:48 +00:00
baldurk 7f133d4b33 Update master list of GL extensions our code currently handles
* This list includes all extensions that we support all the entry points,
  tokens, etc for. It still needs to be unioned with the extensions that
  the implementation supports to determine what to return to the program.
* A couple of extensions are a little hazy as we implement everything in
  them that 'modern' GL includes, but the extension itself also specifies
  some old/outdated functions. Any extensions that are entirely old
  functions are omitted from this list.
2014-12-20 19:54:48 +00:00
baldurk 3e9c178c8b Add some other aliases of functions we already implement 2014-12-20 19:54:48 +00:00
baldurk 45a3dba237 Handle ETC2/EAC in case, for GL_ARB_ES3_compatibility 2014-12-20 19:54:47 +00:00
baldurk dc8e865301 Track and restore per-texture seamless cubemap state
* This is for the ARB_seamless_cubemap_per_texture extension. We already
  track the global state that isn't specific to a texture.
2014-12-20 19:54:47 +00:00
baldurk b08592f502 Add EXT alias of glBlitFramebuffer for EXT_framebuffer_blit 2014-12-20 19:54:47 +00:00
baldurk a18b7505b8 Make sure to return 'real' debug callback/param, not our own 2014-12-20 19:54:47 +00:00
baldurk de702ac1d9 Stop filtering wgl extensions, just return all we don't hook as-is
* I will assume for now that any wgl functions I don't explicitly hook have
  no effect on the captured frame and we can safely just let them straight
  through to the real function.
2014-12-20 19:54:46 +00:00
baldurk 3298905d1d Optimise/improve hookset.pl, return dummy function pointers
* Now instead of returning NULL for entry points that we don't support and
  hoping the application will handle that or error out, instead we return
  a function that will log an error if it is ever called, and then pass
  through to the real function. In most cases, the capture will probably be
  broken as whichever function isn't saved.
* hookset.pl is much faster too, it outputs the whole gl_hookset_defs.h
  file and doesn't do multiple searches over the whole set of headers in
  official/ for each function.
2014-12-20 19:54:46 +00:00
baldurk fe3be81c94 Don't error about textures that aren't complete anyway 2014-12-20 19:54:46 +00:00
Baldur Karlsson 91f85838c5 Merge pull request #116 from loosche/show_normalized_uvs
Add normalized UV coordinates to the TextureViewer window.
2014-12-19 08:35:06 +00:00
loosche 9ef5080302 Change the normalized UV formatting to use Formatter.Format() instead of
doing it myself.
2014-12-19 00:31:17 -08:00
loosche 5f3b535d31 Add normalized UV coordinates to the TextureViewer window. 2014-12-19 00:11:19 -08:00
baldurk 4dcbe41a90 Mark framebuffers as high traffic/dirty after too many attachments
* Seen on Metro 2033 - if a single FBO is used for many cases, with
  attachments added and removed repeatedly. We just give up and fall back
  to fetching them as frame initial state for that framebuffer.
2014-12-19 00:11:49 +00:00
baldurk 08d82c43e9 Allow glBindBufferBase/glBindBufferRange and glBindBuffers for b2c
* Seen in Metro 2033 Redux.
* b2c = bind-to-create. These functions are valid to do that, so we
  serialise a glBindBuffer chunk to create them.
2014-12-19 00:11:41 +00:00
baldurk bc7867499a Add heuristic to avoid extreme bloating with repeated glTexImage
* Seen in Metro Redux, glTexImage was used to upload a 1920x1080 32bpp
  image over and over, and each chunk faithfully recorded the data. Instead
  we detect when glTexImage is called with the same size parameters, no
  resizing/recreation effectively occurs, so we drop the chunk and just
  mark the texture as dirty to fetch the data later.
2014-12-18 22:02:44 +00:00
baldurk 6b34b5815d Don't kill connection thread if user cancels closing 2014-12-18 18:02:50 +00:00
baldurk bbbf18b6f3 Try to avoid hooking into module that was unloaded elsewhere.
* There is still a small race condition, but worst case if it's hit then
  we load a library and free it, and the only way to protect it is to lock
  around FreeLibrary which is quite scary.
2014-12-17 22:13:03 +00:00
baldurk dfa8cf70ac GL_RGB5 is probably more correct as GL_UNSIGNED_SHORT_5_6_5
* It has one bit more precision in green, but it has the right number of
  channels, so it's a better fit than GL_UNSIGNED_SHORT_5_5_5_1
2014-12-17 21:22:32 +00:00
baldurk a974380dfb Handle glCopyTexImage as proper creation functions, not just copies
* Seen in Clockwork Empires - glCopyTexImage was used to create a texture
  and this wasn't being handled properly.
2014-12-17 20:57:49 +00:00
baldurk b1150987a4 Just warn for programs found that have no shaders attached
* Seen in Clockwork Empires, eventually this won't be a problem as the
  programs will get trimmed via not being referenced in the captured frame
2014-12-17 20:57:49 +00:00
baldurk 48bf8290df Fetching texture records more consistently/easily 2014-12-17 20:57:48 +00:00
baldurk 10172c0516 Get the sodding parameters the right way around.
* Idiot.
2014-12-17 20:54:21 +00:00
baldurk c1c97e291b When reading the frame don't fudge the current state
* e.g. when binding a buffer we only want to protect the current state (so
  as not to mess anything up like VAOs) before we're reading the frame.
2014-12-17 18:29:55 +00:00
baldurk 10926066bc Fix a couple of GL functions in the wrong hookset type 2014-12-17 18:22:05 +00:00
baldurk 194dd16504 Fix minmax incorrect always sampling from 2D texture (OpenGL) 2014-12-17 18:21:40 +00:00
baldurk 2ffde0988c Exclude steam's overlay dll. Credit to roalercon. Closes #114 2014-12-17 17:39:41 +00:00
baldurk b64e58916b Remove spammy debug message 2014-12-16 22:07:15 +00:00
baldurk 119d9242ab Demote error to warning
* This is the error 6152332e36 was intended
  to address!
2014-12-15 19:06:44 +00:00
Baldur Karlsson bfb22ee1fd Tweak to contributing section of README 2014-12-14 23:08:42 +00:00
baldurk abbc00adbf Work around glVertexArrayVertexAttribDivisorEXT not being present 2014-12-14 12:17:43 +00:00
baldurk 7d293ddd76 Add a vendor check to avoid glGetProgramPipelineiv+GL_COMPUTE_SHADER 2014-12-14 12:17:42 +00:00
baldurk 7c663de948 Add vendor check to avoid glCopyImageSubData on <4x4 compressed mips 2014-12-14 12:17:41 +00:00
baldurk 652f3529a3 Track if a context is core or not, re-check vendor checks on core
* When a compatibility context is created (via the old CreateContext, or
  via an appropriate CreateContextAttribs call), we can still do the vendor
  checks but we want to make sure we perform them again if we ever create a
  core profile context. Note that actually *using* a compatibility context
  isn't supported at the moment, but this won't explicitly break that.
2014-12-14 12:17:41 +00:00
baldurk 86c110184a Only query depth stencil texture mode for depth-stencil textures 2014-12-14 12:17:39 +00:00
baldurk a984352b74 Add a vendor check to avoid querying GL_POLYGON_MODE on AMD 2014-12-14 12:17:38 +00:00