Commit Graph
3958 Commits
Author SHA1 Message Date
baldurk 657def5fb2 Refactor out-of-bounds check to handle negative (~0U in uint) idxs 2017-05-10 10:24:58 +01:00
baldurk dd3f3aa91b When setting command buffer names in vulkan, propagate to baked cmds
* We don't create any objects with the ID that the original name was
  applied to, we create a buffer for each baked version of that handle.
* So on replay we need to apply the name down from the original object,
  and this also means temporarily storing the name in the original ID
  instead of as a live ID (since there is no live ID for the original
  command buffer object).
2017-05-09 15:26:31 +01:00
baldurk 89246077fa Ignore Workgroup globals for the purposes of shader reflection 2017-05-09 15:26:31 +01:00
baldurk b8d7726822 Make SPIR-V disassembly more robust over empty structs or cbuffers 2017-05-09 15:26:31 +01:00
baldurk 8c68bc4ae8 Add new alias for param check layer 2017-05-09 15:26:30 +01:00
Michael Rennie 385f54d523 GL_UNSIGNED_BYTE mapped to CompType::UNorm in MakeResourceFormat.
For the opposite in MakeGLFormat, we already return GL_RGBA8 from UNorm.
Encountered with fmt of GL_BGRA8_EXT.
2017-05-09 07:26:04 -07:00
Michael Rennie f19e67bb59 Thumbnail generation fix on GLES by glReadPixels(RGBA) instead of RGB. 2017-05-09 07:26:04 -07:00
Peter Gal 5fd460ecba Add BGRA8_EXT support for the emulated glGetInternalFormat 2017-05-05 11:33:11 -07:00
baldurk 023cb57c66 Work around nvidia driver bug with EXT_dsa access to VAO leaking state 2017-05-05 09:00:53 +01:00
baldurk c4740054ca Fix restoring VAO state with double-formatted attribs 2017-05-04 20:36:46 +01:00
baldurk 02044c141d Push and pop the pixel unpack state when uploading overlay font texture 2017-05-04 20:36:45 +01:00
Peter Gal a375d3093a Add missing alias entries for GL_OES_mapbuffer extension
In #598 the alias glMapBufferOES and glUnmapBufferOES macros
were added for the gl_hookset_defs.h but the alias
entries in the gl_hookset.h was missed.

Also expose the glGetBufferPointervOES as part of the
GL_OES_mapbuffer extension.
2017-05-04 07:43:21 -07:00
Peter Gal 2e39757f17 Expose GL_KHR_debug for GL ES backend
Added KHR suffixed aliases for the methods defined in
the GL_KHR_debug extension:
* glDebugMessageControlKHR
* glDebugMessageInsertKHR
* glDebugMessageCallbackKHR
* glGetDebugMessageLogKHR
* glPushDebugGroupKHR
* glPopDebugGroupKHR
* glObjectLabelKHR
* glGetObjectLabelKHR
* glObjectPtrLabelKHR
* glGetObjectPtrLabelKHR
2017-05-04 05:33:51 -07:00
babymustgrowstrong 43d4268263 Various changes/fixes for OpenGLES
bgra8_ext support
glMapBufferOES support
shader compile fix debuguniforms.h
2017-05-03 15:30:43 -07:00
baldurk 93cf884ad7 Add ConvertComponent handling for double/uint64 data, albeit downcasted 2017-05-03 20:00:10 +01:00
baldurk 390e3c1bf4 Don't try to relink programs created by glCreateShaderProgramv
* When creating a program with glCreateShaderProgramv it implicitly acts
  as if the shaders are detached and deleted after linking. This means
  it cannot be relinked again.
* However the only time we need to relink a program is when we are
  copying across fragdata and vertex attrib bindings in case they were
  changed from creation - but for the same reason that we can't relink
  a program to apply them, the application can't either - which means
  the data must be unchanged from creation, and so the copy is not
  needed.
2017-05-03 20:00:10 +01:00
baldurk 9876b6e5cb Emulate EXT_dsa functions in-place and catch promoted-to-DSA functions
* Originally when I added the EXT_dsa emuluation, I targeted it
  specifically to only those functions that I call outside of the replay
  loop, for internal analysis purposes. For that reason the emulation
  was only applied to a separate hookset, and only during replay (not
  during capture).
* However this doesn't account for some of the streamlined serialisation
  of functions like glBufferStorage, glBufferData, etc. To simplify
  code paths, I 'promote' all variants of these types of functions to
  the EXT_dsa variant (except ARB_dsa for texture functions which is
  actually different by not requiring the texture target parameter).
* Note: most of these functions were emulated already (except three -
  glNamedBufferStorageEXT, glTextureBufferEXT and
  glTextureBufferRangeEXT) but on replay we didn't use the internal
  hookset, just the normal one, which was not emulated.
* Rather than try to decide when these should use the internal hookset
  and when the regular one, or switch them all over to the internal
  hookset, instead re-evaluate the reason for a separate hookset in the
  first place: Emulating functions separately means the original func
  pointers are returned during capture time, for unsupported extensions.
* However mesa has proven that unsupported extensions don't have to
  return NULL, as it's undefined what they return - they should not be
  called if the extension isn't available. So in actual fact there's
  little harm to be done by emulating in-place and returning some
  different pointers to the application. In the worst case, they get a
  bit of EXT_dsa emulation themselves.
2017-05-03 20:00:10 +01:00
Michael Rennie 980f3fd004 Fix unaligned read ARM crash in Serialise_glProgramUniformVector/Matrix 2017-05-03 11:44:39 -07:00
baldurk 9b45ed217b Update GL enums from official headers 2017-05-03 09:24:57 +01:00
baldurk eebdf84d4f Add OpenGL ES extension header to fetch enums from.
* There's a minor conflict over GL_ACTIVE_PROGRAM_EXT being defined to
  different values in GLES and GL extension headers. Since in the GL
  extension header it's defined to the value that eventually became
  GL_CURRENT_PROGRAM we remove that define.
2017-05-03 09:24:28 +01:00
baldurk 6bcd293a3f Don't mutate VAO binding when replaying glEnable/DisableVertexAttrib
* These calls need to go through DSA access like all the other VAO
  functions.
2017-05-02 22:58:12 +01:00
baldurk 78ea82315c Add a super extra hack on the vendor checks to avoid checking on intel
* It seems like even running the simple check to see if we need our
  workarounds can completely break intel's driver and lead to infinite
  hangs later. So instead we just assume these hacks are always on for
  intel drivers.
2017-05-02 22:58:12 +01:00
baldurk ddc555fd31 Hook LoadLibrary/GetProcAddress variants in 'libraryloader' API sets 2017-05-02 22:58:11 +01:00
baldurk 478f22559c Add FileIO::exists() function 2017-05-02 22:58:11 +01:00
David McFarland f22d38bc63 Don't resume threads created with CREATE_SUSPENDED
This fixes errors in Unity 5.6 when it creates baking processes.
2017-05-01 12:48:19 -07:00
baldurk c05bea4563 Hook up compute thread debugging in qrenderdoc's D3D11 pipe viewer 2017-04-28 18:36:56 +01:00
baldurk 58050e89ef Remove hardcoded version numbers from vulkan layer json, set in build
* In CMake this is easy as we're already passing it through sed, but
  in msbuild it's a little more complex as we need to write a little
  in-line C# code to read out the version number and replace the
* We also update the JSON generation for layer registration on linux.
2017-04-28 18:36:55 +01:00
baldurk 8580b7b2c7 Hand-edit vcxproj files to remove duplicated properties
* By default VS creates a huge section of properties copy-pasted for
  every Configuration|Platform combination, which is almost all the
  same for each one.
* We instead create a common section with most of the properties that
  are fixed, and then override/add to them for the few that vary (e.g.
  optimisation settings for release, preprocessor macros).
2017-04-28 18:36:55 +01:00
baldurk 5fa195ded8 Switch to using precompiled header files on renderdoc VS projects 2017-04-28 18:36:55 +01:00
baldurk 27035d19d8 #define NOMINMAX and WIN32_LEAN_AND_MEAN before including windows.h 2017-04-28 18:36:54 +01:00
baldurk 993aee449d Use std::min/std::max instead of windows min/max macros 2017-04-28 18:36:54 +01:00
baldurk 5ef7d76d21 Change default warning level to 3 in SPIR-V project
* Since most of the project is glslang, we instead increase the level
  per-file for our own files. It means fewer exceptions in the build
  file.
2017-04-28 18:36:54 +01:00
baldurk 6e83f27c9e Remove glslang warning disable as override is fully supported on VS2015 2017-04-28 18:36:54 +01:00
baldurk 95f366344a Rename parameters near/far to avoid conflicts with macros from windows.h 2017-04-28 18:36:54 +01:00
baldurk 199d5266ad Move disable of warning 4100 from command line to property, remove 4512
* We used to ignore C4512 but we no longer need to.
  C4100: 'identifier' : unreferenced formal parameter
  C4512: 'class' : assignment operator could not be generated
2017-04-28 18:36:54 +01:00
Peter Gal 6fde3cbb6a Query allowed extensions when the GL driver knows which mode is it in
Previously the allowed extension list was set when the
WrappedOpenGL driver was created. However at that point it is not always
clear if we are in GL or GL ES mode.
2017-04-28 10:35:43 -07:00
Elizabeth Baumel 8f69735780 Serialisation definitions/preliminary support for D3D12 tiled resources. 2017-04-27 14:16:40 -07:00
baldurk ae50fa99ee Revamp version tagging, remove ugly suffix on git hash. Refs #571
* Tacking -official onto the git hash was a hack only needed on windows,
  and since we want more information it doesn't scale.
* Instead we track anything we need to know about the version in
  separate variables, like whether it's a stable build or a nightly/
  local build. Or if it's built by a downstream distribution then the
  version number for the downstream build.
2017-04-27 19:47:50 +01:00
baldurk 13f61eaf8e Disable edit and continue debug information, since E&C is disabled 2017-04-27 19:47:49 +01:00
baldurk dd2f6eb88a Don't delete objects allocated in renderdoc module outside it. 2017-04-27 19:47:49 +01:00
baldurk a9c500a3bf Ditch array suffix from typename in element descriptors
* The suffix is superfluous in the string name - it can be reconstructed
  using the array size data. It just confuses things when trying to
  replicate a variable declaration. E.g. int indices[4]; shouldn't be
  listed as int[4] indices[4];
2017-04-27 19:47:48 +01:00
baldurk f65ef594f3 For GL array textures, cache glGet*TexImage data returned
* Our function to get texture data requests a single mip and a single
  array slice at a time. However this interacts badly with the GL get
  function that returns array data all at once.
* Worst case, we end up fetching N array slices N times, meaning we do
  N^2 work, and allocate way more memory than is required. There was
  also a bug that caused the allocated memory for compressed arrays to
  return all array slices instead of returning one slice, offsetted.
* Now instead we cache the returned array data and look it up for
  subsequent requests, since it's very likely that we're going to ask
  for the other array slices.
2017-04-27 15:56:59 +01:00
baldurk f415681f65 Expose a function to fetch the debug overlay's texture ID 2017-04-27 15:16:34 +01:00
baldurk 922b095d2d Add support for interpreting depth formats saving to HDR/EXR
* In particular, depth 24 which needs special handling
2017-04-27 15:16:34 +01:00
Michael Rennie 34d692330e Only create client memory VBOs the first time context is activated.
Also added corresponding deletion code in WrappedOpenGL::DeleteContext.
2017-04-27 06:51:18 -07:00
Peter Gal 59536d4db0 Skip GL_DEPTH_CLAMP enum usages when in GL ES mode
The GL_DEPTH_CLAMP is not valid in GL ES calls.
2017-04-27 06:50:54 -07:00
Cody Northrop 5863607ba2 android: Attempt to call adb directly if path not provided 2017-04-26 20:47:04 +01:00
baldurk 2f83933616 Serialise and restore program attrib and fragdata bindings
* If an app only relies on reflection to set up its VAO, then its VAO
  will morph to match the built-in implementation defined initial
  locations of attribs and fragdata.
* Then when replaying on another implementation the VAO will no longer
  match the changed locations.
* So instead we save the locations (whether they're user set or still
  implementation defined) and restore them explicitly.
2017-04-26 20:47:03 +01:00
baldurk 0da47c8102 Don't replay glDetachShader so programs can be relinked
* We need to relink programs to update attrib bindings, which means the
  shaders need to be still attached. There doesn't seem to be any harm
  in leaving a shader attached to a program that should be detached -
  it can still be used just fine in other programs.
2017-04-26 20:47:03 +01:00
Michael Rennie 58ac90e831 GetSizedFormat better depth decision based on data type, if available. 2017-04-26 04:28:01 -07:00