Commit Graph

1044 Commits

Author SHA1 Message Date
baldurk ce7c8eb44f Don't fetch sampling parameters for texture buffers (invalid) 2015-01-17 15:49:03 +00:00
baldurk 25ab5520c5 Fixes for GL image texture render state
* When binding an empty texture, sanitise the parameters so we don't
  pass invalid enums for access/format.
* When fetching, actually use the indexed Get functions to get the right
  slot. Ooops :S.
2015-01-17 15:42:50 +00:00
baldurk 7e10c5c4ea Pass through ShaderResourceType per-texture for better type naming 2015-01-17 15:03:34 +00:00
baldurk af545e00c7 Don't include Samplers in texture array 2015-01-17 14:57:25 +00:00
baldurk b47fedf08c Remove a couple of TODOs from GL driver
* GL_MIN_MAP_BUFFER_ALIGNMENT is now satisfied (up to 64), and from reading
  the spec, yes the mip dimensions have to be defined as standard, you
  can't define just some crazy custom mip chain sizes as that's invalid.
2015-01-17 13:06:04 +00:00
baldurk 760e18c242 Save GL_SAMPLE_SHADING, GL_RASTERIZER_DISCARD and all tex bindings
* For every texture unit in GL, you can have one of each texture bound to
  it. So you can bind a 2d and a 3d to slot 5, and as long as you don't
  try to use both at once, you can use one in one shader, one in another,
  without needing to rebind. So the state vector we need to save includes
  every type of texture.
* I think, from checking against the spec tables, this should be the entire
  state vector saved now for core 4.5. There might still be some extension
  state not saved.
2015-01-17 13:05:04 +00:00
baldurk 772ee5ae3a Fix minor memory leak - array not being freed 2015-01-16 22:55:27 +00:00
baldurk 51a0ee1dc1 Fix typo! 2015-01-16 22:54:03 +00:00
baldurk c7a4a45d1d Only return interfaces where supported by real object. Refs #119
* Note in some cases we still unconditionally return an object (like
  ID3D11InfoQueue) just for compatibility's sake if it's pretty ubiquitous
  and programs might expect it to always be there. This change however will
  stop us from reporting interfaces that might actually not be HW or OS
  supported.
2015-01-16 22:18:01 +00:00
baldurk 75e3a54d32 Update visible copyrights (non-code) to 2015 2015-01-16 22:14:06 +00:00
baldurk e13f4b61d4 Crash fix for if the GL pipeline state is empty (e.g. a D3D11 log) 2015-01-16 14:02:14 +00:00
baldurk 035eecfb1e Show if GL_FRAMEBUFFER_SRGB is 0 for an SRGB FBO attachment 2015-01-16 11:34:35 +00:00
baldurk 7168a1b69c Clear primitive restart index text 2015-01-16 02:50:10 +00:00
baldurk b059e601c5 Send sampler information through to GL pipeline state for display 2015-01-16 02:49:00 +00:00
baldurk cceddc9b19 Tidy up constant buffer table per-shader in GL pipeline state view 2015-01-16 02:03:55 +00:00
baldurk d35abd9727 Give proper name on constant buffer previewer for GL 2015-01-16 02:01:56 +00:00
baldurk af51c4f1e6 Tweak rasterizer page display to be a bit nicer 2015-01-16 01:14:21 +00:00
baldurk 6f0284f170 Show depth and stencil states on GL pipeline view 2015-01-16 00:43:44 +00:00
baldurk 1265b5bc6e Set up display of blend equations (and logic, overriding) 2015-01-16 00:18:34 +00:00
baldurk f459c63380 Show restart index on GL pipe state, and handle it being disabled 2015-01-15 23:37:17 +00:00
baldurk 1096308755 Show generic vtx in attributes, and show attribute names from VS 2015-01-15 23:16:55 +00:00
baldurk 99f3eb78cf Set up vertex input stage properly on GL pipeline view 2015-01-15 22:36:44 +00:00
baldurk abbcd7c80f Combine and compress some of the data tables in the D3D11 pipe view
* e.g. class instances only crazy people use, so there's no point to have
  it eating up a ton of space when 99.9% of the time it's empty. Also
  the border colour in samplers is only listed if the addressing is set to
  use the border colour.
* I also collapsed down some of the columns to make it a little simpler
  visually, like min lod/max lod become just "lod clamp" with a range, and
  constant buffers simplified down to a couple of columns.
2015-01-15 22:14:03 +00:00
baldurk 57a1988755 Try not to scroll resource etc tables in pipeline state
* When jumping between draws the tables are rebuilt which destroys any
  vertical scrolling, so we save/restore it which means the same row will
  be at the top of the view. If there are fewer resources it'll just be
  as scrolled down as possible.
2015-01-15 19:02:10 +00:00
baldurk 930c1c53d5 Crash fixes if drawcall is NULL 2015-01-15 19:00:44 +00:00
baldurk b5f38a37d0 Compile fix for previous commit that somehow didn't get included 2015-01-15 18:34:23 +00:00
baldurk f013f6fd29 Store index format and topology in drawcall, to accommodate GL
* D3D11 just latches the state from the input assembler state into the
  drawcall when it's being added. GL stores the state per-draw.
2015-01-15 17:17:12 +00:00
baldurk b9f1b9820f Inline the glClear values in the description
* Even though this is latched state from glClearColor etc, this means we
  don't have to list that in the pipeline state, we can just show it here
  where it's relevant.
2015-01-15 15:25:18 +00:00
baldurk 1b256d4382 Fix case of buffer maps in idle writing state - don't generate chunks
* If we generate an unmap chunk on a buffer while idle, it contains
  'dangerous' data set at that point - it means that if we fetch the buffer
  initial contents at frame start, these are actually saved *before* the
  unmap chunk, in the initialisation/creation chunk which contains the
  shadow copy. Then the unmap overwrites with older data.
* When mapping buffers, we should always either update the initial chunk or
  mark the buffer dirty so the initial chunk is refreshed on capture.
* This was changed in commit 99c6719928 and
  was probably ok before then (although going into the serialise function
  was unnecessary and did some redundant copies into a chunk we were going
  to throw away). I'm not sure why I made that change, if it was to fix a
  bug I can't understand how. I guess I'll see if anything breaks.
2015-01-11 22:15:15 +00:00
baldurk 249638820f Tweak render state invalid output merger handling, and log warnings
* We were allowing *any* difference between depth and render targets, but
  that's not quite right. Oversized depth is fine, but e.g. mismatched
  multisampled and not is invalid.
* We also take frame references on invalid attempted OM sets, so that the
  targets don't get trimmed from the log and potentially make the set valid
2015-01-11 01:53:32 +00:00
baldurk fe1040fb81 Tweak utility debugmessage adding function 2015-01-11 01:51:43 +00:00
baldurk fb4e6e0a8a Add message about non-32bit UAV loads 2015-01-11 00:50:55 +00:00
baldurk 43f55a7cdc Add several more shader warning messages, add utility function 2015-01-11 00:44:37 +00:00
baldurk 04f1d4a378 Centralise debug message processing, and allow adding custom warnings
* This will allow the adding of things like 'redundant api call' for calls
  that have no effect, as well as potential problems like drawing with an
  empty viewport, or similar things that are common problems. Reading out-
  of-bounds on buffers etc is a good example of 'defined' behaviour that
  is probably not desired.
* These heuristics could also identify potential performance problems.
* It also supports adding debug messages after log-load time, so you could
  do an additional extra-strength pass, or do a detailed check of one
  draw call (e.g. a broken draw, to try and figure out the problem). If
  there are any unread debug messages, the status bar will flash and the
  debug messages window will show a count as (N).
2015-01-11 00:20:50 +00:00
baldurk 6de7644e68 Don't bail out quite so quickly if vertex buffers are insufficient
* This allows 'partial' rows in the mesh viewer, if a vertex input element
  references invalid/out of bounds data, but the others are fine (coming
  from different streams).
2015-01-09 00:48:18 +00:00
baldurk 4cf8d1a2ce Fix massive memory leak if shadow storage was continually allocated
* When idle if we map a resource that doesn't have backing store (like a
  texture that wasn't initialised on creation) we create shadow storage
  for the map. We only need it temporarily, so make sure to free it after
  we unmap, otherwise it will stick around for hte lifetime of that
  resource (!).
2015-01-07 23:52:39 +00:00
baldurk aded77cf1c warning disable on 64bit 2015-01-07 09:42:16 +00:00
baldurk 1c9269fc8d Add simple OpenEXR save/load support using tinyexr
* Thanks to https://github.com/syoyo/tinyexr for the load and save code!
2015-01-06 17:43:19 +00:00
baldurk 4a73f69821 Split LoadEXR and SaveEXR to expose functions that take a FILE* 2015-01-06 17:41:54 +00:00
baldurk 30ad13ff25 Ignore compile warnings in tinyexr code
* To avoid making too many changes downstream from tinyexr, I just ignore
  these warnings.
2015-01-06 17:38:48 +00:00
baldurk d2f51deca9 Add tinyexr from https://github.com/syoyo/tinyexr
* Unmodified, from revision 14ba590a376ffcb2436ede10f122a3d1797db4c4
2015-01-06 16:53:40 +00:00
baldurk 6952166271 remove extension listed twice 2015-01-06 16:34:11 +00:00
baldurk cc9490c977 Implement GL_ARB_shading_language_include (untested) 2015-01-05 20:55:26 +00:00
baldurk 133d363f29 Fixes for commenting INCLUDE_DXGI_1_2 to build without win8.1 SDK 2015-01-05 17:18:39 +00:00
baldurk 26ac392e79 Add note about new DXGI stuff to undefine if only using the DX SDK 2015-01-05 15:28:36 +00:00
baldurk 5cb999e970 Update extension support and add comment about upcoming extensions.
* Based on g_truc's latest hardware support matrix:
  http://www.g-truc.net/doc/OpenGL%204%20Hardware%20Matrix%202015-01.pdf
  and browsing of the registry.
2015-01-05 11:06:12 +00:00
baldurk 9df7d73b94 Only treat read-only maps as special, not read-write maps 2015-01-05 10:37:03 +00:00
baldurk c63f44f0aa Make sure to destroy GL debug context and associated resources 2015-01-05 02:15:00 +00:00
baldurk 85b9d7535a Make sure destructor is called for each element 2015-01-05 01:46:36 +00:00
baldurk 7d0579c594 Make sure preview window is destroyed on exit (just to be proper) 2015-01-05 01:18:57 +00:00