Commit Graph

219 Commits

Author SHA1 Message Date
Baldur Karlsson 12a30a7b97 Add IAT based hooking to allow hooking 64bit opengl32.dll
* Needs vigorous testing in as many situations as I can think of, not least
  32bit, 64bit, D3D11, D3D9, OpenGL, managed apps, different windows SDKs,
  delay loading dlls (not sure if these will work), statically linked libs,
  LoadLibrary + GetProcAddress
* Credit goes to jslutter for originally bringing it to my attention &
  suggesting it.
* References:
  http://msdn.microsoft.com/en-us/magazine/bb985992.aspx
  http://msdn.microsoft.com/en-us/magazine/cc301808.aspx
  http://www.codeproject.com/Articles/6265/Process-wide-API-spying-an-ultimate-hack
2014-08-06 15:43:16 +01:00
Baldur Karlsson 23543d6a43 length returned from program introspection includes space for '\0' 2014-08-06 15:43:00 +01:00
Baldur Karlsson c648904cba DebugMessage description is an ascii string 2014-08-06 15:42:33 +01:00
Baldur Karlsson 2e3a3ac175 Serialise depth function as part of render state 2014-08-06 12:27:46 +01:00
Baldur Karlsson 9bf0ee93b6 Typo using wrong blend GLenum for source alpha 2014-08-06 12:26:51 +01:00
baldurk 9f9411b758 Merge pull request #75 from valeriog-crytek/master
Added debugging support for GATHER4* opcodes.
2014-08-05 17:57:47 +01:00
valeriog 8452d0a12f Added debugging support for GATHER4* opcodes.
Fixed sampler state setting in LD/SAMPLE opcodes when debugging non-vertex shaders.
2014-08-05 14:44:20 +02:00
Baldur Karlsson 51b840844e Handle default case in switch 2014-08-05 11:28:09 +01:00
baldurk 15f98e3749 Show pixel history events in the timeline bar 2014-08-03 16:25:14 +01:00
baldurk fb6b4a98b0 Show the pixel history tab early, fill it in with data when ready 2014-08-03 16:04:34 +01:00
baldurk 6fa46b359e Implement right click options to debug or hide failed events 2014-08-03 15:54:40 +01:00
baldurk b230be570f Inherit channel visibility from viewer, display inherited state
* A label is shown at the top of the pixel history showing the range
  display and visible channels. The channel visibility behaves the same as
  in the texture viewer - 2 or more and the other channels display as black
  and 1 channel displays grayscale.
2014-08-03 15:32:52 +01:00
baldurk aeb6ae3bcb Explicitly list stencil as hex with 0xXX form. 2014-08-03 15:04:24 +01:00
baldurk 4e6c8202b4 Save on unnecessary thrown ArgumentExceptions (convenience) 2014-08-03 15:03:59 +01:00
baldurk b695ba2070 Pass indexable temps through and display in UI. Closes #73
* The storage is rather wasteful (once per state), but the temp registers
  are mutable so could be changed from state to state.
2014-08-03 14:28:27 +01:00
Baldur Karlsson f45315f1cc When copying row-by-row, only copy one row at a time! 2014-07-30 12:54:24 +01:00
Baldur Karlsson c9146bdd9e Move FillCBufferValue function to be member of GLReplay 2014-07-29 17:03:12 +01:00
Baldur Karlsson 513b9572f9 Compile fixes. Whoops. 2014-07-29 17:03:00 +01:00
Baldur Karlsson b26b816d81 Implement FillCBufferVariables for buffer-backed UBOs 2014-07-29 14:07:56 +01:00
Baldur Karlsson c31852532b Use a more friendly enum for BufferBindings array indices 2014-07-29 13:59:57 +01:00
Baldur Karlsson a76d70831a Add a few new glGet functions 2014-07-29 13:59:21 +01:00
Baldur Karlsson 3952dfba2b Save location as vec if variable is not buffer backed 2014-07-28 16:52:43 +01:00
Baldur Karlsson 4e145925d1 Retrieve details of UBOs and variables inside them 2014-07-28 16:21:08 +01:00
Baldur Karlsson a728f3289b move RDCBREAK() OS-implementation from inline function to macro
* It's a little messier as it's easier for the os-specific header to not
  define it and get confusing errors, but that's a one-time problem and
  having an extra function in a callstack and not showing source at the
  point of the RDCBREAK is annoying every time.
2014-07-28 12:17:34 +01:00
Baldur Karlsson cda21724f5 GetTexture and GetBuffer are fully implemented now 2014-07-28 12:04:39 +01:00
Baldur Karlsson 7dc6debb19 Fetch width/height/depth for replay side textures (fake BB etc) 2014-07-28 12:04:29 +01:00
Baldur Karlsson df86071362 Return correct ResourceFormat for GL depth formats 2014-07-28 12:03:54 +01:00
Baldur Karlsson c956d8a6cb GetByteSize respects align parameter, calculate for textures 2014-07-28 11:32:16 +01:00
Baldur Karlsson 8d8b308859 Fix typo 2014-07-28 11:31:50 +01:00
Baldur Karlsson a3cdece239 Determine creationflags throughout initial read pass 2014-07-28 11:31:45 +01:00
Baldur Karlsson 6d7283f580 Fetch current framebuffer bindings per-draw 2014-07-28 11:27:19 +01:00
Baldur Karlsson 9fda74fc07 Add a button on the texture viewer that flips the tex in Y
* Useful for systems that render OpenGL upside down with a final flip,
  for example.
2014-07-28 10:28:28 +01:00
baldurk d10e9e239f On x86 windows IsWow64 returns false always. Closes #66
* On x64 windows IsWow64 returns true for 32bit programs, but on x86
  windows there is no such thing as Wow64 so it returns false. Detect this
  by checking our own processes Wow64 nature (which should always return
  true if Wow64 is a thing).
2014-07-27 22:24:12 +01:00
baldurk 6e9b08e382 Add faint default working directory when textbox is 'blank'
* If the working directory is empty, the directory containing the exe is
  used instead, make this more clear in the UI.
2014-07-25 10:28:28 +01:00
baldurk 6ab037f952 Erase descriptor before filling it out 2014-07-25 10:06:21 +01:00
baldurk ca043bf3e2 Add ability to view buffer elements as hex with xint/xshort/xbyte 2014-07-25 08:58:49 +01:00
baldurk 74a0330271 Ensure C# UI uses consistent culture on all threads. Closes #72
* This means that e.g. decimal separator will always be . and similar
  effects, which avoids the need to have culture specific formatting or
  special-case handling around CSV export etc.
2014-07-23 08:36:05 +01:00
baldurk e94726cbc1 linux compile fixes 2014-07-22 10:46:19 +01:00
baldurk 18d6368853 register(bX) for cbuffers, only bind and copy stencil when valid 2014-07-18 00:07:43 +01:00
baldurk 07b41426a2 Add RGBA value prefixes, only print valid elements, preview depth 2014-07-18 00:07:18 +01:00
baldurk 9075812226 Pass stencil as int32_t so depth or stencil of -1 indicates no data 2014-07-18 00:03:04 +01:00
baldurk e462ab15b3 Collect depth and stencil values before/after.
* This code is just to test if the method works, it's super ugly and needs
  to be tidied up (as does this whole function!)
2014-07-17 21:13:33 +01:00
baldurk b09df40cda Don't use operator[] in case id isn't valid (creating empty entry) 2014-07-17 12:32:56 +01:00
baldurk 43229f2145 Drain annotation queue at end of frame to include final EndEvents 2014-07-16 09:27:09 +01:00
baldurk 2d299961e1 Properly quote parameters of xcopy to handle spaces in paths 2014-07-15 17:34:59 +01:00
baldurk 7f6e960d85 Bake in range-select min and max when opening a pixel history view
* I'm not sure if this 'hidden' latched UI state is good or bad, but it
  means the colours are visible if you've adjusted the range way outside
  of 0-1.
2014-07-15 12:06:25 +01:00
baldurk ddb2578662 Set a depth-stencil state that tests, writes, but trivially passes
* Occlusion queries seem to be unhappy with a depth-stencil state that
  performs no tests and sometimes can produce incorrect results. This
  appears to make the queries more reliable and fixed cases where depth
  clip was showing as discarding pixels incorrectly.
* There's still something weird going on here, I'm not super happy with it.
2014-07-15 12:02:24 +01:00
baldurk 844f080300 Change priority of node background colours, so select colour works 2014-07-13 18:58:47 +01:00
baldurk a2b288ec7e Test shader discard first (unconditionally) and drop dirty flags
* Also do a full replay after the shader discard test as there seems to be
  some kind of D3D/driver bug that can cause false positives on test
  failures.
2014-07-13 18:58:46 +01:00
baldurk 3bb382d9cf Further progress on pixel history view
* Added simple UI
* Don't apply SRGB curve to alpha data
* Account for clear calls not returning occlusion query results, and for
  depth/colour clears.
2014-07-13 18:58:45 +01:00