Commit Graph

610 Commits

Author SHA1 Message Date
baldurk 060801db20 Check GL_MAX_VERTEX_ATTRIBS on apply as well as fetch 2014-11-10 23:13:20 +00:00
baldurk 77a5d9d7b5 Overlay should be Y-Flipped if main view is 2014-11-10 23:11:18 +00:00
baldurk 9da25f020e First implementation of initial contents for GPU dirty textures 2014-11-10 23:07:18 +00:00
baldurk ed2661514a Since the debug layer complains for me, respect GL_MAX_VERTEX_ATTRIBS
* I need to respect the GL_MAX_* values all over the render state, but the
  other things don't complain so I can ignore it for now :).
2014-11-10 23:07:18 +00:00
baldurk 165e00a5f9 Fill m_Textures during cap, and store tex dimension & # MSAA samples 2014-11-10 23:07:18 +00:00
baldurk 9b5864bbd2 Remove assumptions in resource_manager that resources are pointers 2014-11-10 23:03:11 +00:00
baldurk c406804d24 Bump D3D11 serialise version for ce0a67e8, and add backwards compat
* This is the first attempt at backwards logfile compatibility. Since most
  captures are fairly ephemeral I don't know to what degree I'll go in
  future to support old captures, but since this was a fairly trivial
  example (just skip serialising a bit of data if it's an old version
  without it), I'll test this out.
2014-11-10 17:53:31 +00:00
baldurk ef950b63db Fix installer to include necessary Microsoft.Dynamic.dll 2014-11-10 17:30:28 +00:00
baldurk 41f80630ec Include IronPython component in installers, mark as 64bit 2014-11-10 17:20:00 +00:00
baldurk 11bf575a1d Fix reference to non-existant file in docs 2014-11-10 17:16:11 +00:00
baldurk 14e81f9a18 Protect against invalid lookup in vector of operand indices
* ld_ms has 4 operands but the operand in [3] is not a sampler and won't
  have any indices.
* Speculative fix for a crash report uploaded with a crash here on a ld_ms
2014-11-09 22:12:17 +00:00
baldurk ce0a67e8f1 Fetch and serialise hidden stream-out buffer counters. Closes #105
* Essentially when streamout'ing to a buffer a hidden counter is saved with
  it that contains the number of primitives written.
* With this change we issue queries over each buffer's duration as a
  stream-out target so we have those counters available when necessary.
* At the start of frame capture, we save out the current value of all those
  queries, and use them if that buffer is used for a DrawAuto() without
  being streamout'd to again in the captured frame.
2014-11-09 16:17:47 +00:00
baldurk 5a96f07a0a SOSetTargets should explicitly NULL any buffers it doesn't set 2014-11-09 15:35:49 +00:00
baldurk ea9054b752 Hack for crash in D3DGear if ppDevice pointer is NULL. 2014-11-09 11:28:48 +00:00
baldurk e57cf457a4 Handle textures that were created but not typed/initialised 2014-11-09 02:00:09 +00:00
baldurk b3c5587420 Handle pixel unpack buffers on replay 2014-11-09 02:00:08 +00:00
baldurk 9ec7d9eff5 Lightweight state push/pop of only what's needed for overlay
* The full state vector push/pop was slow (admittedly this was probably
  because it's not optimal, and for some things will read over the max).
2014-11-09 02:00:08 +00:00
baldurk 7aca4a8603 glBufferSubData applies to UpdateCount on high traffic resources 2014-11-09 02:00:08 +00:00
baldurk 7c6ef6faf7 Fixes for glTexSubImage* to handle unpack buffers
* If a pixel unpack buffer is bound, we mark the resource as dirty when
  idle. When capframing we serialise just the pointer value as offset, not
  the buffer contents.
2014-11-09 02:00:07 +00:00
baldurk f13f07ee4e Implement remaining functions that UE4 uses
* glBindFragDataLocation
* glMultiDraw* (non indirect)
* glDraw*Indirect
* glDispatchComputeIndirect
2014-11-08 23:00:13 +00:00
baldurk 54abe30ee6 Implement glObjectPtrLabel 2014-11-08 23:00:13 +00:00
baldurk 47e5874aa4 Check for proxy texture targets and don't serialise those calls 2014-11-08 23:00:12 +00:00
baldurk d50b74694d Implement glTexBuffer, multisampled tex functions, glTexImage*
* glTexImage probably makes some assumptions about usage, at the least it
  assumes that it won't be called to re-size/re-allocate textures (that
  will probably break), and it also assumes that level 0 will always be
  glTexImage'd and the other levels are standard mip sizes (I don't know
  what happens in GL if you specify non pow-2 descending mip sizes for
  different levels. Given we're only targetting core 3.2 and above, this is
  probably a safe set of assumptions.
2014-11-08 23:00:12 +00:00
baldurk 23a748eca9 Add renderbuffer support 2014-11-08 18:03:48 +00:00
baldurk 1276eda4c7 Add glFlushMappedBufferRange, but not implemented yet
* Still need to implement persistant/etc buffer Map()s
2014-11-08 13:49:23 +00:00
baldurk 5b3a8aabdb Implement glClearBufferSubData 2014-11-08 13:48:41 +00:00
baldurk 06b8b76973 Implement glCopy*Image functions
* When not capturing a frame, we just mark the resource as dirty
2014-11-08 13:48:41 +00:00
baldurk e4edec0d4e Implement glQueryCounter 2014-11-08 13:48:41 +00:00
baldurk 8dbdd97a2f Implement glSampleCoverage 2014-11-08 13:48:40 +00:00
baldurk fbabc0180b Add a couple of missing glGet*s 2014-11-08 13:48:40 +00:00
baldurk 9756b60a8a Add some missing ARB aliases of core functions 2014-11-08 13:48:39 +00:00
baldurk d3650cc73d Remove wgl/glx from hookset.pl - unused. Also skip blank lines 2014-11-08 13:48:39 +00:00
baldurk 9b02d4a73e Implement remaining glVertexAttrib functions 2014-11-07 01:18:04 +00:00
baldurk d0b3078b95 Implement glPointParameter* 2014-11-06 23:30:00 +00:00
baldurk 7c7503432d Implement glBlendEquation{,i} 2014-11-06 23:18:42 +00:00
baldurk 840d2ad5d8 Fix for compiling on 64bit 2014-11-06 23:18:26 +00:00
baldurk d86b6e8808 VAOs get marked as dirty via VertexArrayUpdateCheck() 2014-11-05 00:11:28 +00:00
baldurk d61ad6994e VAOs are required, don't save bad VAO operations to device record 2014-11-05 00:10:54 +00:00
baldurk 41caebcdca Implement a whole bunch of glGet* glIs* API functions as pass-through 2014-11-04 21:54:33 +00:00
baldurk d318ca5182 Implement all glUniformN_ and glProgramUniformMatrixMxN_ variants
* Using macros for most implementations redirecting to either
  Serialise_glUniformVector or Serialise_glUniformMatrix
2014-11-03 22:25:11 +00:00
baldurk c7528aeb49 Serialise glUniform through glProgramUniform 2014-11-03 20:59:28 +00:00
baldurk b590377345 Do NaN/-ve/inf checks before range application, feels more consistent
* Before, we'd remap the visible range (if the range was 0.25-0.75 this
  meant 0.0 would be mapped to 'negative') before checking on negative
  values, which didn't feel like the right thing for the overlay to show.
2014-11-03 00:50:46 +00:00
baldurk 93f4141abd Implement viewport/scissor and depth/stencil test overlays for GL 2014-11-03 00:47:29 +00:00
baldurk 602b28c614 Abstract out function to copy uniform values between programs
* This needs to be refactored to use the program interface query API so
  we can get the location of uniform blocks and set them
* We also need to copy over sampler uniform values (getting away with it
  for now as we're generally replacing the pixel shader, so there aren't
  any samplers used in the cases I've tested).
2014-11-02 22:47:52 +00:00
baldurk fc349db45f Don't use FetchTexture in GLReplay, as overlay texture doesn't have it
* Instead of using FetchTexture we store the internal format in the texture
  data in the driver, so it's available for use.
* This fixes some issues with the overlay textures
2014-11-02 21:55:50 +00:00
baldurk 912382e413 Implement NaN/inf/-ve and clipping overlays on OpenGL 2014-11-02 21:20:06 +00:00
baldurk facea8d019 Fix issues with float inaccuracy on 'clipping' overlay
* There was a problem where a value of 1.0 would show up as 'clipping' if
  the range meant that it was transformed to something like 1.0000000432f
  so we use FLT_EPSILON as a slight fudge factor.
2014-11-02 21:19:48 +00:00
baldurk ad2b26b238 Implement texture histogram for OpenGL 2014-11-02 20:59:36 +00:00
baldurk 65e567d91f Implement glClearBufferData 2014-11-02 20:54:21 +00:00
baldurk 02aa3e7912 Implement min/max calculation for OpenGL
* Same implementation as D3D11 essentially
* Split out the texture sampling from texdisplay.frag into its own file so
  it can be reused. Also removed the discard;s from the texture sample
  functions and moved them up into the texture display function.
2014-11-02 20:26:09 +00:00