Commit Graph

5242 Commits

Author SHA1 Message Date
baldurk 2e87ca4531 Require qt creator to locate the cmake project to build on non-windows
* Previously the cmake build would put librenderdoc.so in a /bin folder
  in the source folder so the qt creator project could link against a
  fixed path when just opening the project solo.
* This won't scale though for fetching the SWIG outputs from cmake, and
  it's ugly to modify the source folder for out-of-source builds.
* Instead we have cmake generate a qt creator include file with all of
  the settings and paths needed, and pass the CMAKE_BINARY_DIR into
  qmake when building. This does mean that when opening the project in
  qt creator you need to specify CMAKE_DIR=/path/to/build though.
* As a bonus, this means we can let cmake identify where python is and
  have qt creator link against it rather than having to hardcode include
  paths etc.
2017-04-18 14:57:40 +01:00
baldurk fd6fce7a78 Refactor pipeline states to expose opaque string properties as enums.
* Things like addressing modes, stencil operations, and other things the
  UI didn't need to know about previously were only exposed as string
  values to be passed through and displayed.
* Now we describe these with enums so the API can be properly
  introspected and used by consumers that might want to know the actual
  values of these states.
2017-04-18 14:57:40 +01:00
baldurk ebb398ae00 Refactor pipeline states to use in-class initialisers, not constructors 2017-04-18 14:57:38 +01:00
baldurk 8262bd2770 Refactor viewport to have X/Y separate members instead of TopLeft[2] 2017-04-18 14:57:38 +01:00
baldurk f1df7423e2 Standardise pipeline object names with name/customName where relevant 2017-04-18 14:57:38 +01:00
baldurk 42b599ff70 Remove legacy ElementOffset/ElementWidth from D3D11 pipeline state 2017-04-18 14:57:38 +01:00
baldurk 587fba0b68 Rename DirectoryFile/FileProperty to Path, and re-use struct in OS code
* They describe directories or files, and really describe a single path
  on the remote system.
2017-04-18 14:57:38 +01:00
baldurk 637d4089e2 Rename colour to color in public API code
* Following the principle of least surprise, color tends to be more
  commonly used in APIs and graphics code even outside the USA.
2017-04-18 14:57:37 +01:00
baldurk d94f387399 Refactor bucketing code a little to use a record type enum 2017-04-18 14:57:37 +01:00
baldurk 4887ecc851 Remove InvocationIndex shader builtin and remap it
* We map it to either GSInstanceIndex or OutputControlPointIndex
2017-04-18 14:57:36 +01:00
baldurk 0ad5709df3 Remove poorly chosen 'Fetch' prefix from a few data structures.
* This goes all the way back to the first iterations where these were
  the only structures and 'Fetch' referred to them returning data from
  the core code to the UI.
2017-04-18 14:57:36 +01:00
baldurk bd199ca8e6 Remove declarations for C interface from renderdoc_replay.h header
* The functions are still exported and that's all renderdocui cares for.
* The interface is no longer to be used so gets in the way of the
  generated SWIG bindings.
2017-04-18 14:57:36 +01:00
baldurk 455ac56d5b Borrow a concept from an upcoming larger refactor to get typenames
* For SWIG bindings we need something that will go type -> string name
  so we can look up the SWIG type in a template to convert elements in
  arrays.
* An upcoming refactor will contain this kind of typename for proper
  reflection, so to minimise code churn and avoid adding multiple new
  solutions for the same kind of thing, we borrow the macro name and
  implement it for the API structs we need.
2017-04-18 14:57:35 +01:00
baldurk 1be8c70da6 Make ResourceId::id member private, add ResourceId::Null() 2017-04-18 14:57:35 +01:00
baldurk ce4a99b7b8 Rename ShaderResource::IsSRV to a more generic IsReadOnly property 2017-04-18 14:57:35 +01:00
baldurk 96f11095da Change type of FrameStatistics::recorded to bool32 to be more accurate 2017-04-18 14:57:35 +01:00
baldurk 018dcb073c Rename uavWrite to more generic directShaderWrite 2017-04-18 14:57:35 +01:00
baldurk b7c755192c Remove no-longer used 'context' member of APIEvent structure 2017-04-18 14:57:35 +01:00
baldurk 4f21c29258 Remove unused firstEvent value, since the first event is always 1 2017-04-18 14:57:34 +01:00
baldurk 36ed9fdc70 Remove unused rawType from SpecialFormat 2017-04-18 14:57:34 +01:00
baldurk c44f355380 Remove nested structs from D3D12 pipeline state and move to namespace 2017-04-18 14:57:34 +01:00
baldurk af33e5d296 Remove nested structs from Vulkan pipeline state and move to namespace 2017-04-18 14:57:34 +01:00
baldurk 9e23443356 Remove nested structs from GL pipeline state and move to namespace 2017-04-18 14:57:34 +01:00
baldurk b4d3401866 Remove nested structs from D3D11 pipeline state and move to namespace
* Moving into a namespace makes it easier to give the structs non-clumsy
  names while still being unique and not overlapping with the other API
  pipeline states.
2017-04-18 14:57:33 +01:00
baldurk b271eb3103 Remove nested structs in replay API (not including pipe states)
* SWIG doesn't handle nested structs conversion to python, so we are
  going to split out all structs. Mostly this is the case in the
  pipeline state structs, but this commit splits out a few in the rest
  of the API.
2017-04-18 14:57:33 +01:00
baldurk d40fc8471d Change API enums to enum class, remove now redundant prefixing
* This gives a little nicer syntax, a bit better type safety, and also
  reflects better for SWIG bindings. Overall it's a minor change but
  better.
* We don't update the C# UI at all, since it's soon to be removed and
  not worth the effort/code churn.
* For now so we're ABI compatible with C#, all enums are uint32_t, but
  that is an obvious optimisation in future to reduce struct packing.
* We avoid 'None' as an enum value, because it's a reserved word in
  python so will cause problems generating bindings.
2017-04-18 14:57:33 +01:00
Janos Pantos 71e779a08f Fix driver warnings during android replay
Eliminate driver warnings for invalid framebuffer attachments, blends
and image formats (in case of glBindImageTexture). Framebuffer
attachment data query and setter codes are also refactored a bit.
2017-04-18 06:56:37 -07:00
Janos Pantos 942a323b8e Add check for EXT_texture_filter_anisotropic extension 2017-04-18 06:56:37 -07:00
Janos Pantos 7f04526b39 Fix replay errors on android
Avoid executing non-GLES codes, and add checks for missing function
pointers.
2017-04-18 06:56:37 -07:00
Janos Pantos 910501062b Emulate some missing functions required for GLES
Emulate missing DSA texture and renderbuffer functions, and add some
draw functions which are not available before GLES 3.2.
2017-04-18 06:56:37 -07:00
Janos Pantos 25c4123119 Fix checking function pointers in case of GLES 2017-04-18 06:56:37 -07:00
baldurk faa1b6ced5 Hold references to used resources on deferred command lists
* We need to keep any resources used on deferred contexts alive until
  the produced command list is released. Otherwise the resource might be
  destroyed before we replay it, and we'll have lost that information.
2017-04-17 13:37:19 +01:00
baldurk d81f708f8c Serialised config settings list has to be public for the auto-xml-ising
* Private variables are skipped by the serialisation unfortunately.
2017-04-17 12:28:42 +01:00
baldurk 1be2e1086a Make sure shader info search paths are always available. Refs #572
* Previously they were only set when replaying a recorded SetPrivateData
  which meant any blob paths specified in the private blob part didn't
  have the search paths configured for locating relative paths.
2017-04-17 12:28:13 +01:00
baldurk 8983e67dc2 Specify SHADER_READ_ONLY_OPTIMAL layout for images in RenderTexture 2017-04-17 12:12:19 +01:00
baldurk 7e24b78586 Un-ignore the shader checker validation layer
* No longer seems to spam lots of nonsense, so for now we'll let it run.
2017-04-17 12:12:19 +01:00
baldurk 2b5d07d749 Assert that the whole-memory buffer created has valid requirements
* This keeps the validation layers happy
2017-04-17 12:12:19 +01:00
baldurk 9278af463a Check for sparse buffer memory requirements when unbinding. Refs #580
* If a buffer is small, its memory requirements might be aligned up to
  a larger value for sparse binding.
2017-04-17 12:12:18 +01:00
baldurk af40baca4e Make sure to submit and delete any semaphores created during replay 2017-04-17 12:12:18 +01:00
baldurk 11739e0575 Check for depthClamp phys device feature and only enable if available 2017-04-17 12:12:18 +01:00
Janos Pantos 32855233d0 Fix determining available extensions for GLES 2017-04-17 02:39:46 -07:00
Janos Pantos 7e98ef32d1 Add list of supported extensions for GLES 2017-04-17 02:39:37 -07:00
Peter Gal 588eb083db Remove obsolete workarounds to force shared library linking
As the --no-as-needed linker option was added there is now
no need to force link to GL/EGL shared libraries via
extern methods.
2017-04-17 02:39:29 -07:00
Peter Gal 081f65dff1 Disallow the linker to ingore shared libraries during linking
In some cases when the renderdoccmd/qrenderdoc is linked the linker
ignores the libEGL.so and only uses the librenderdoc.so.
This is because the renderdoc shared library provides the
same symbols as the libEGL.so. However we need to keep the
libEGL.so as we are using RTLD_NEXT in the renderdoc shared
library.
2017-04-17 02:39:29 -07:00
Peter Gal 386c830b1d Load wrapped library early in case of Android
On newer Android it is not possible to use the
LD_PRELOAD functionality. The target application
should be directly linked with the RenderDoc library.
However in that case we also need to load the
target library early, so a simple implementation
for the PosixHookLibrary is added.
2017-04-12 05:09:54 -07:00
Rémi Verschelde b37a01d8ad Support LIB_SUFFIX for lib64-using distros 2017-04-09 15:14:42 -07:00
baldurk 71e347d3b3 Add some missing extension-function checks. Refs #569 2017-04-09 17:34:45 +01:00
baldurk 729706e7f1 memcpy into the right structure, avoids trashing data. 2017-04-08 16:12:48 +01:00
Peter Gal 12f4f08e56 Guard glPolygonMode call in GL ES
In GL ES the glPolygonMode is not supported so we'll
ignore calls to it.
2017-04-08 08:12:36 -07:00
Peter Gal 0d088a9b48 Export EGL functions which we don't intercept as pass-through functions 2017-04-08 08:12:26 -07:00