Commit Graph

1137 Commits

Author SHA1 Message Date
baldurk 72cfee5c0f Add GLSL syntax highlighting 2015-02-09 18:14:20 +00:00
baldurk 8ccf071865 Implement GetTextureData for GL - underlying code behind texture saving
* This should support all forms of textures off the bat, multisampled
  textures, 3D textures, arrays, compressed and uncompressed, etc.
2015-02-09 17:29:13 +00:00
baldurk bdb823c20b Slice index for 3D textures is always relative to overall depth 2015-02-09 12:32:44 +00:00
baldurk 381eb24b01 Don't set depth to 6 for cubemaps, set array size 2015-02-09 11:52:57 +00:00
baldurk f64e2ce1d1 Do a default inversion of Y co-ordinates on GL and invert w/ height-1 2015-02-09 11:50:11 +00:00
baldurk a282b68c58 Flip UV sample vertically for cubemap +ve X direction 2015-02-09 11:48:31 +00:00
baldurk 065acf8ac9 Fix crash in image viewer since it doesn't go through ReadLogInit() 2015-02-09 10:58:52 +00:00
baldurk 2513eabb17 Return compressed format ResourceFormat descriptors properly 2015-02-09 10:35:07 +00:00
baldurk ad1ff5712a SRGB8(_ALPHA8)? are UNSIGNED_BYTE based formats, not signed BYTE 2015-02-09 10:34:45 +00:00
baldurk 6e42f645e4 GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT is not enabled directly
* It's only used in glRasterSamplesEXT, so it's an error to either
  glEnable/glDisable it or check via glIsEnabled. It's already handled
  properly to RasterFixed, so just drop it from the enabled bits.
2015-02-09 10:34:22 +00:00
baldurk 6f711a3470 Handle a couple of error cases more gracefully in GL xfb 2015-02-08 10:45:36 +00:00
baldurk c3ca815da1 #version technically needs to come even before #if preprocessor stmts 2015-02-08 10:34:32 +00:00
baldurk 24577f3612 Drop LazyInit() inside GetDebugManager()
* We call LazyInit() in the first swapchain create, and on replay log
  initialisation. This is guaranteed to be before we use it (on replay
  it will always be hit, and in program if there's no swapchain, we
  won't use the debug manager for text rendering). It's also late enough
  that it won't be triggered for every device while enumerating or such.
2015-02-04 17:47:58 +00:00
baldurk e6e22b1fb7 Don't create shaders & UAV buffers that aren't necessary while injected
* This saves on errors and other spam (and internal compile errors if
  an older d3dcompiler.dll is used) when none of these resources are
  used. We only use what's necessary for font rendering.
2015-02-04 17:46:47 +00:00
baldurk 6208e3992d Fall back to WARP if D3D11 hardware isn't present. Closes #121
* If hardware support for feature level 11 isn't present, fall back to
  the WARP software rasterizer. This will support everything needed, but
  it certainly won't run well.
* There are loud warnings - I added a debug message to the debug errors&
  warnings window so the status bar will indicate that, and it's in the
  title.
* At most once every 3 weeks there will also be a message box pop up
  when loading a log, to remind the user so that it isn't forgotten, as
  for obvious reasons this is not the intended use-case (hopefully once
  per 3 weeks isn't too often to be annoying).
2015-02-01 19:57:09 +00:00
baldurk c5fafbed5d Implement GPU duration counters on OpenGL 2015-01-29 10:17:51 +00:00
baldurk 96d0f472e0 compile error fix 2015-01-29 08:19:46 +00:00
baldurk b7f9d5b6d0 Generalise drawcall timing to get arbitrary sets of counter values
* Client code can enumerate the IDs of counters that are supported -
  some of these will be general, some will be IHV specific. It can also
  request descriptions of the counters to determine the type of data or
  units. This can be used to 'discover' counters that aren't hard
  coded into renderdoc. I'll want to at least reserve IHV ranges so that
  counter IDs are globally unique, and ideally IHV counters will also be
  predeclared where possible.
* Also the refactor removes some ugly rdctype::array use outside of the
  replay layer and replaces it just with std::vector, which is a nice
  bonus.
2015-01-28 21:15:19 +00:00
baldurk 50e571e7d4 Restrict to windows only, in case stl structures change size elsewhere 2015-01-28 17:19:35 +00:00
baldurk 68b9179f89 Bring back the "manage replay hosts" window menu item 2015-01-28 13:11:49 +00:00
baldurk ea0ed8b064 Implement mesh rendering over the replay proxy - now feature complete! 2015-01-28 13:09:38 +00:00
baldurk 67f5724e53 Don't list primitive if it's not available (e.g. top level EID entry) 2015-01-28 12:34:28 +00:00
baldurk c9f106b0cb Fix up the replay proxy serialising functions
* Also add some compile time asserts to try and help keep them working.
2015-01-28 12:34:12 +00:00
baldurk 1b4bf97574 Fix for instance rates not being accounted for on vertex inputs 2015-01-28 02:23:30 +00:00
baldurk 6d64fc7a1a Handle NULL index buffer being bound for indexed draws better 2015-01-28 02:23:17 +00:00
baldurk a703dc54d0 Fix instancing support for post-vs mesh views on D3D11 and GL
* We stream-out or transform feedback the whole instanced draw at once,
  producing a buffer containing all N instances in one. Then when the
  client requests postvs data, an offset into the buffer is calculated
  (in 1/N chunks) and carried through everywhere.
* Since we were using the offset to indicate where the system position
  output lay for since-last-clear auto drawing of meshes, we rearrange
  the output attribute order so system position is always first in the
  list.
* Also since-last-clear now doesn't include the current event, but does
  include any previous instances before the current instance.
2015-01-28 02:21:14 +00:00
baldurk 7bf45d043b Fix incorrect null check that could crash with no VS bound 2015-01-26 19:55:42 +00:00
baldurk d41a285f4d Skip built-in input attributes when copying attrib locations over 2015-01-26 19:50:23 +00:00
baldurk 0777a87dee Fix mismatch between C# struct and C++ struct (was hidden in padding) 2015-01-26 19:48:19 +00:00
baldurk 4c44fc67cb Fix copy-paste error, use the right interface for getting name 2015-01-26 19:48:00 +00:00
baldurk 00226df891 Fix making TCS/TES/GS shaders separable by inserting gl_PerVertex 2015-01-26 19:10:00 +00:00
baldurk d7c8c1026c Support XFB from geometry or tessellation shaders
* Also set default near/far planes for auto-calculation to 0.1/100
2015-01-26 19:09:39 +00:00
baldurk 20927953ed Add some handling for strangely formed DXBC shader files. Refs #122
* This is the fun with reverse engineering formats, sometimes they do
  mad crazy stuff.
2015-01-26 18:07:01 +00:00
baldurk b8f54dc008 Add absolutely horrendously disgusting hack for 'fixing' XFB varyings
* This might be an nvidia bug but I honestly don't know what the syntax
  for varyings is, and the spec seems vague (it just says 'user-defined'
  variables). This system/heuristic works on NVIDIA and AMD though, so
  it'll have to do for now.
2015-01-26 17:20:31 +00:00
baldurk 577af9c257 Fix enum typo for polygon mode 2015-01-26 17:19:34 +00:00
baldurk 64bcf35838 Make sure to copy across attrib location values from 'real' vs program 2015-01-26 16:57:57 +00:00
baldurk 06a549cf01 Fix vertex inputs on GL to use input attrib bindpoint mapping 2015-01-26 16:55:07 +00:00
baldurk 184d3a6789 Prime post-vs data when log is loaded (or bufferviewer is newly opened)
* This fixes the bug that's been around for a while, where if you have
  an event selected and then open the buffer viewer, it won't have the
  post vs data available until you re-select that event.
2015-01-26 14:27:16 +00:00
baldurk 5c46ccb86d Use abs instead of saturate to do double-sided lighting on meshes
* This means we don't need to care about winding making normals inside
  out, and in this case it's not a bad thing to light backfaces I think.
2015-01-26 13:24:24 +00:00
baldurk 41be32a5cd Fix uniforms to make sure we don't get confused between two programs 2015-01-26 13:22:10 +00:00
baldurk 9c9c92b08f Use XFB to get postvs data (not post gs/tess yet), and render 2015-01-26 13:07:24 +00:00
baldurk 846a83d6b1 Set SSBO/UBO bindings by name so it's more robust
* This will work in case the binding order changes between two impls,
  and it also works if copying program state between two programs that
  might have different UBO/SSBO sets.
2015-01-26 02:07:45 +00:00
baldurk beae000c5a Upgrade functions from mostly to fully implemented
* As far as I know there are no problems - bugs will be reported I'm
  sure but they merit the status :).
2015-01-25 22:51:27 +00:00
baldurk 6bc7eedfa4 Implement vertex and triangle highlighting for GL buffer viewer 2015-01-25 22:50:18 +00:00
baldurk 29b40a0971 Bugfix for line topologies being compared wrongly 2015-01-25 22:49:53 +00:00
baldurk 6155d6d925 Suppress listing gl_PointSize or gl_ClipDistance if they weren't used 2015-01-25 21:38:40 +00:00
baldurk 9bd5fabe1a Implement axis markers and frustum helper on GL mesh view 2015-01-25 21:11:56 +00:00
baldurk 0f297734f3 Add geometry-shader calculated face normals for lit mesh view
* Also fix up the depth buffer part of output windows (since it wasn't
  used for anything else)
2015-01-25 20:30:03 +00:00
baldurk 4674b76930 Remove attributes not used in VS from GL vtx attribute list 2015-01-25 19:55:07 +00:00
baldurk 5972ffa661 Implement mesh-specific fragment shader to display secondary data 2015-01-25 19:31:47 +00:00