Commit Graph

4827 Commits

Author SHA1 Message Date
baldurk 5c8fca5791 Require GL_ARB_shader_image_load_store for quad-overdraw resolve pass 2017-01-17 18:38:32 +00:00
baldurk a88486d380 Fix uint/int cast compile error 2017-01-17 18:38:32 +00:00
baldurk 5ea84f84ee Only re-interpret pixels from float to int if it was an int texture 2017-01-17 17:46:40 +00:00
baldurk 8f55abdde9 Check for extensions during replay for pipeline state save, tex display 2017-01-17 17:46:26 +00:00
baldurk 34834d802f Check for texture storage extension in vendor check 2017-01-17 16:55:38 +00:00
baldurk 21d6f41c97 Change GLSL shaders to compile at #version 150 and add #extensions
* For some #extensions we can fallback to a lesser path (or just drop
  that functionality - e.g. displaying cubemap arrays if there's no
  extension for it).
2017-01-17 16:55:26 +00:00
baldurk 031ea659be Fix check for glClipControl to check extension not just function pointer 2017-01-17 16:54:18 +00:00
baldurk 6be852bfa2 Check for extensions needed when creating replay shaders
* If a replay shader can't be created we'll just skip the replay
  functionality it is needed for.
2017-01-17 16:54:03 +00:00
baldurk e8456f5d36 Check and save the GLSL version, vs specifically checking for 420 2017-01-17 16:51:26 +00:00
baldurk ec41661f5f Remove replay-time use of buffer/texture storage
* Of course if the capture used the storage functions during capture,
  then they will still be used on replay. We are only removing extra
  usage here for internal textures/buffers
2017-01-17 16:47:46 +00:00
baldurk d214098dce Create the highest versioned context possible on replay 2017-01-17 11:02:47 +00:00
baldurk 2b722541e7 Compile/warning fixes 2017-01-17 11:02:46 +00:00
baldurk 00ebb7d8a3 Check for SSBO support before introspecting programs for SSBO binds 2017-01-17 11:02:45 +00:00
baldurk ed358ab8a3 Check extensions properly for GL state fetch and apply 2017-01-17 11:02:45 +00:00
baldurk 97e11a45a3 Fix a minor typo 2017-01-17 11:02:44 +00:00
baldurk 69bb551f22 Make sure enable bits in GL render state are properly extension guarded 2017-01-17 11:02:43 +00:00
baldurk 07df2cc37c Check for KHR_debug when calling glDebugMessageCallback 2017-01-17 11:02:43 +00:00
baldurk 8fb49d08f3 Reduce minimum requirements for replay to 3.2 + a few extensions
* The checking for a capable replay context is centralised so there's
  less code duplication between linux (GLX) and windows (WGL)
2017-01-17 11:02:42 +00:00
baldurk a9fb044874 Pass through texture swizzles on FBO attachments and display 2017-01-17 11:02:41 +00:00
baldurk 16dd02a4a4 Check that texture swizzle extension is available before using it 2017-01-17 11:02:41 +00:00
baldurk eb5761dabe Use non-instanced triangle lists to draw text overlay
* Mesa GL seems like it doesn't like the instanced draw, for whatever
  reason.
2017-01-17 11:02:40 +00:00
baldurk ae0f6ea3a0 Don't query texture level/layer properties for renderbuffer attachments 2017-01-17 11:02:39 +00:00
baldurk 749434872d Remove GL_TEXTURE_COMPRESSED_IMAGE_SIZE vendor check
* This is even messier than I thought - I didn't realise, but it in fact
  varied depending on if the image was initialised with glTexStorage or
  glTexImage (or possibly glCompressedTexImage2D).
* Either way, the query is much too unreliable to try and use and work
  around, so instead we'll just use the GetCompressedByteSize function
  and work out the size ourselves.
2017-01-17 11:02:38 +00:00
baldurk bb538a7d76 Add emulated versions of extensions we want to use but not require
* EXT_direct_state_access emulated by pushing/popping current bind
* ARB_copy_image emulated with framebuffer blits
* ARB_clear_buffer_object emulated with Map + memset/memcpy
* ARB_internalformat_query2 emulated with a limited hardcoded database
2017-01-17 11:02:38 +00:00
baldurk 7450d4f84d Compile text rendering shaders as GLSL 150 and add extensions needed 2017-01-17 11:02:37 +00:00
baldurk 6252fc23f3 Avoid EXT_direct_state_access or ARB_texture_storage use in vendor check 2017-01-17 11:02:36 +00:00
baldurk baa18e78af Check for core versions or extensions before doing vendor checks 2017-01-17 11:02:35 +00:00
baldurk 533080ede0 Check for relevant extensions or core versions for resource dirtying 2017-01-17 11:02:35 +00:00
baldurk c66dd62a2e Add more checks for extensions being present, for future use 2017-01-17 11:02:34 +00:00
baldurk 4a80a744c3 Add explicit cast (gl_InstanceID is int), fixes errors on mesa compiler 2017-01-17 11:02:33 +00:00
baldurk c5dbd7d6f0 Don't allow aliases to overwrite core function pointers
* This is a bit of a hack. Mesa seems to return a function pointer for
  functions it recognises but doesn't support. So e.g. if you query for
  glBindFramebuffer you'll get the implementation, if you query for
  glBindFramebufferEXT then you get a stub that errors out.
* So in this case we ensure that any EXT/ARB aliases only set their
  function pointer if we don't have the core function already. This will
  fix some cases but obviously doesn't help if the core function is the
  error-stub and the extension is supported...
2017-01-17 11:02:33 +00:00
baldurk d2d8a978e4 When creating a dummy shared context, create a pbuffer
* It's not valid to try and bind a context with no drawable.
2017-01-17 11:02:32 +00:00
baldurk 61410d10c3 Fix some typos causing mis-aliased functions 2017-01-17 11:02:31 +00:00
baldurk e596e85f31 Remove VK_LAYER_LUNARG_monitor layer during replay. Refs #490 2017-01-17 10:50:14 +00:00
Alex Smith 6e2fc42cbd qrenderdoc: Show currently selected event in the API inspector
Currently, selecting an event with children (e.g. vkCmdExecuteCommands)
in the event browser will cause the API inspector window to show the
final child event, rather than the event itself. This behaviour makes
sense everywhere else: selecting an event with children shows the state
after all children have completed.

However, for the API inspector, we want to be able see API calls for
the parent event when it is selected rather than those of its last
child, particularly in the case of vkCmdExecuteCommands which may have
other API calls leading up to it.

To allow this, distinguish between the "current event" and "selected
event". For an event with children, the former refers to the last
child, while the latter refers to the event itself. ILogViewerForm now
has two separate event callbacks for when either one changes.

The API inspector now makes use of the selected event, while everything
else continues to use the current event.
2017-01-14 20:23:51 +00:00
Michael Rennie ba30bc0a57 Fix editing compute shader modules, with new MakeComputePipelineInfo().
Before editing a pipeline, we need to recreate its creation info struct.
Compute pipelines have their own VkComputePipelineCreateInfo instead of
VkGraphicsPipelineCreateInfo, and we now make that distinction.
2017-01-13 16:28:54 +00:00
baldurk 4e665d445f If a texture is typeless, use type hint to check if it's int/uint 2017-01-12 13:15:32 +00:00
baldurk 01c3a76625 Apply the type hint when displaying pixel values in texture viewer 2017-01-12 13:15:32 +00:00
baldurk 94b34f6718 Fix a crash if a connection fails to start very early 2017-01-11 17:23:39 +00:00
baldurk b558cd4af4 Check top-level stride of buffers to know if we need to pad. Refs #485 2017-01-11 17:23:39 +00:00
baldurk 34b4cee42c Add markers during replay to make it easier to self-debug 2017-01-11 17:23:39 +00:00
baldurk 9077203f71 Always allocate at least 2048 slots for pixel history
* This means that any 'degenerate' cases of only one event or so on will
  still have enough slots to be able to handle reasonable amount of
  overdraw. The only case that will fail is if every event has loads of
  hits, but on average there should be enough slots allocated.
2017-01-11 17:23:39 +00:00
Alex Smith 6358517ac2 Add missing strings for VK_PIPELINE_STAGE_ALL_{GRAPHICS,COMMANDS}_BIT 2017-01-11 16:51:34 +00:00
baldurk ac47036368 Add an option to hide any markers with only "API Calls" but no draws. 2017-01-09 18:15:45 +00:00
baldurk 029ffec6e6 Do shader debugging without replaying the capture at all
* This requires that every operation on output windows leaves the state
  untouched, so make a few changes to arrange that.
* By doing this it means any unstable/non-deterministic results are
  consistent between the current capture inspection and the shader
  debug results.
2017-01-09 18:15:26 +00:00
baldurk 7e26f97f17 Update CONTRIBUTING document with better guidelines for larger changes 2017-01-09 15:14:51 +00:00
baldurk 7947361345 Compress README a bit for readability's sake 2017-01-09 13:19:27 +00:00
baldurk 10053b8be8 Update docs to mention that Vulkan/D3D12 don't support Map() verifying 2017-01-09 11:42:47 +00:00
baldurk ffbb2da206 As a hack, only check AMD driver for broken texelFetch on windows
* Without this, the RADV open source driver also gets checked, and its
  version is 0.0.1 so it gets marked as buggy.
* Unfortunately there's not a great way to identify different drivers
  for the same piece of hardware (ie. PCI IDs are the same).
2017-01-09 11:31:55 +00:00
baldurk 3bfbd1c6ac Only create VK Array <-> MS copy shaders if device has required features 2017-01-09 11:31:02 +00:00