Commit Graph

7680 Commits

Author SHA1 Message Date
baldurk b0378e9858 Don't try and fetch fbconfig for NULL context in glXMakeCurrent 2018-07-12 15:33:54 +01:00
baldurk 64006a856c Register library hook even if callback is NULL. Refs #1040 2018-07-12 15:33:53 +01:00
baldurk fd5612e30a Change RENDERDOC_HOOK_EGL to a runtime option on an env var
* Environment variables are not user-friendly, but I don't want to promote this
  to a capture option since it's so niche.
* In future perhaps  it will be feasible to support selecting an arbitrary API
  to capture, or even capturing multiple APIs simultaneously - though with GLES-
  on-GL that will be quite difficult.
2018-07-12 15:33:53 +01:00
baldurk 7670c125c0 Fix EGL order-of-operations on windows
* On windows we can load libEGL which then loads opengl32.dll, so we ensure that
  opengl32.dll is loaded first at startup rather than have it appear last-minute
  in a recursive call.
* Likewise, when using EGL we forcibly forget all GL function pointers and fetch
  them through eglGetProcAddress, rather than having a mix-and-match dispatch
  table.
2018-07-12 15:33:52 +01:00
baldurk ec81a0329a Fix original pointers not being fetched for modules fetched last-minute 2018-07-12 15:33:52 +01:00
baldurk 15bb970dd9 Don't try to create indirect draw buffer while structured exporting 2018-07-12 15:33:51 +01:00
baldurk ba78e08394 Fix crash if VkImportMemoryWin32HandleInfoKHR::name is NULL 2018-07-12 15:33:51 +01:00
baldurk 57f2cabc9b Initialize device properties that might not all be filled out to 0 2018-07-12 15:33:50 +01:00
baldurk d72cfa58c7 Ensure we unwrap pNext chain on replay in vkQueueSubmit 2018-07-12 15:33:50 +01:00
baldurk 85cddfff07 Fix display calculation overflowing for large scrollbars 2018-07-12 15:33:50 +01:00
baldurk 3c7287cead Set driver for hooks earlier on WGL 2018-07-11 19:32:16 +01:00
baldurk b955ef0b52 Support a NULL window for functions that only need it for dialogs
* Primarily useful for Python where threading can cause problems, and there's no
  need.
2018-07-11 19:32:16 +01:00
baldurk 64c6c1affc Check for eglQueryString returning NULL
* This seems to happen sometimes during early startup on Android.
2018-07-11 19:32:15 +01:00
baldurk 504ebe5a1a Fill in compute shader inputs (thread/group ID variants). Refs #1038 2018-07-10 14:53:35 +01:00
baldurk e50c6436a2 Fix crash if debugging pixel shader without EvaluateAt* operations 2018-07-10 14:53:34 +01:00
baldurk ac4bd2c6a2 Add GL ES on windows to supported APIs in readme
* Requires either driver support (EXT_create_context_es2_profile) or a GLES
  emulating library like ANGLE.
* Note however that ANGLE doesn't at this point meet the minspec for replay, so
  it can only be captured from.
2018-07-09 17:04:00 +01:00
baldurk e976c0621f Linux compile fix 2018-07-09 17:04:00 +01:00
baldurk b00f62b976 Remove MaxImageAttachments on RP/FB, dynamically size. Closes #1033
* Render passes and framebuffers can have as many attachments as desired, and
  just use a small subset in each subpass. We shouldn't add an artificial limit
  without good reason.
2018-07-09 16:28:03 +01:00
baldurk 650a80db47 When searching start at selected not current event. Closes #1030
* When selecting a marker region, the more intuitive search is to find children
  of the marker first before searching onwards, even if the 'current event' is
  at the end of the marker region.
2018-07-09 16:28:03 +01:00
baldurk 3b05409eff Re-use glClear bitfield stringise for glBlitFramebuffer 2018-07-09 16:28:02 +01:00
baldurk 83355c521e Don't specify cache as derived resource if it's non-existant 2018-07-09 16:28:02 +01:00
baldurk 3acb726ed1 Specify the right texture target creating backbuffer depth/stencil 2018-07-09 16:28:01 +01:00
baldurk ad4f3ac864 Fix error message for unhandled format in GetByteSize 2018-07-09 16:28:01 +01:00
baldurk 1c510cb3a3 Don't crash if RemoteHost hostname is empty or short 2018-07-09 16:28:00 +01:00
baldurk 8c93750b00 Fix crash if texture tabs were open when restoring state. 2018-07-09 16:28:00 +01:00
baldurk 45a36c52e1 Limit recursion depth for IsUnmodified check
* We won't inline 10 levels of statements anyway, so there's no point in
  exponentially searching for inline candidates.
2018-07-09 16:27:59 +01:00
baldurk e334c805f8 Keep going after finding a specialization constant match
* It's perfectly valid to have the same ID fill out multiple variables.
2018-07-09 16:27:59 +01:00
baldurk 7ca23e7a87 Set all mips to valid when GenerateMipMaps is called 2018-07-09 16:27:58 +01:00
baldurk 30c8f01a25 Handle implementations on capture without ARB_vertex_binding 2018-07-09 16:27:58 +01:00
baldurk eff35de81b Handle case where an implementation can't readback 'native' format/type
* Sometimes a GLES implementation can refuse to copy back the 'native'
  format/type, most commonly if you want to read back from a GL_RGB texture it
  might require you to readback GL_RGBA.
* We handle this by just reading back the requested format in this case, and
  then copying only RGB tightly into the output buffer.
2018-07-09 16:27:57 +01:00
baldurk f2a2710823 save 'type' parameter as hint to internalformat
* Unfortunately it seems like sometimes in GL when creating an GL_RGB
  internalformat texture you can copy from another GL_RGB internalformat
  texture. Other times you can't.
* In particular the difference can just be the 'type' parameter passed when
  passing initial data, GL_UNSIGNED_BYTE vs eGL_UNSIGNED_SHORT_5_6_5
* We treat this as a 'soft' hint, so if it's not present we fall back to the old
  path.
2018-07-09 16:27:57 +01:00
baldurk 14cb449886 Support EGL_ANGLE_surface_orientation flipped backbuffers 2018-07-09 16:27:57 +01:00
baldurk 00985986d1 Implement missing stub on apple 2018-07-07 01:13:08 +01:00
baldurk 4e57f295b7 Disable GLES support on mac 2018-07-07 00:38:27 +01:00
baldurk ff61bf8def Fix case when GLES is enabled but GL is disabled on linux, or vice-versa 2018-07-07 00:00:04 +01:00
baldurk e5f6b24696 Declare proper calling convention for EGL hooks 2018-07-07 00:00:03 +01:00
baldurk c49888424f Disable GLES compilation for docs build 2018-07-07 00:00:03 +01:00
baldurk eeeba59058 Remove unnecessary GL/EGL link in qrenderdoc 2018-07-07 00:00:03 +01:00
baldurk 1665495289 ARB_viewport_array was not made core in GLES 3.2 2018-07-06 22:44:27 +01:00
baldurk 4040429fba Remove unnecessary link against libGL/libEGL in renderdoccmd
* This means it's easier to build with GLES support by default
2018-07-06 22:44:26 +01:00
baldurk a53797fc51 Remap EGLSurface back to native window pointer
* We need the native window pointer for registering frame capturers, and adding
  input window filters (on windows).
2018-07-06 22:44:26 +01:00
baldurk 296f84fb7e Change GL text rendering to be compatible with a wider set of versions
* In particular this will work with GLES 2.0
2018-07-06 22:44:26 +01:00
baldurk 08616c9ad1 Emulate ARB_program_interface_query using glslang's reflection
* In particular it wasn't added until GLES 3.1, and we need it during capture to
  determine the uniforms and other things, so we emulate the subset of queries
  that we need ourselves.
2018-07-06 22:44:26 +01:00
baldurk f00832f2f9 Fix vulkan shutdown crash, destroy GPUBuffer before device/instance 2018-07-06 22:44:25 +01:00
baldurk 178f61abd0 Separate out function to make shared context for vendor checks
* This is only to be used to make a temporary context to share with. We make
  sure to use the same visual/config as the parent context to ensure it will
  successfully share.
2018-07-06 22:44:25 +01:00
baldurk 44f9b08e71 Tweak some core versions for extensions
* ARB_geometry_shader4 was brought into desktop core GL in 3.2, not 4.1.
* Geometry shaders and viewport arrays were in GLES 3.2
2018-07-06 22:44:25 +01:00
baldurk 4bf028371d Check for geometry shaders before querying if framebuffer is layered 2018-07-06 22:44:25 +01:00
baldurk 5b0f51f9d9 Check extension for use of TEXTURE_BORDER_COLOR
* This wasn't supported on GLES until 3.2, or with OES_texture_border_color
2018-07-06 22:44:24 +01:00
baldurk 89a3da2171 Check for ARB_texture_multisample being available
* We need to hack around GLES, as it somehow added only part of the original
  extension - non-arrayed textures. So we conceptually split up the extension
  into two, and treat the real extension as a superset.
2018-07-06 22:44:24 +01:00
baldurk 3794d3facc Emulate glGetTexLevelParameter on GLES
* This function is not available until 3.1 so we can't rely on being able to use
  it - even if we get a valid function pointer for it.
* We emulate it by storing the data up front and allowing the emulation layer
  access to our texture info to look it up. It's a bit roundabout but it works.
2018-07-06 22:44:24 +01:00