Commit Graph

320 Commits

Author SHA1 Message Date
baldurk 5986f209e1 Use Formatter::Format for formatting hex numbers 2017-05-15 10:11:55 +01:00
baldurk c05bea4563 Hook up compute thread debugging in qrenderdoc's D3D11 pipe viewer 2017-04-28 18:36:56 +01: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 dd2f6eb88a Don't delete objects allocated in renderdoc module outside it. 2017-04-27 19:47:49 +01:00
baldurk f415681f65 Expose a function to fetch the debug overlay's texture ID 2017-04-27 15:16:34 +01:00
baldurk 58a752b882 Fix some cases that didn't handle strip restart indices 2017-04-20 16:08:13 +01:00
baldurk 6930841705 Rename ReplayRenderer to ReplayController
* It's not a renderer, it's an interface to controlling the replay and
  any 'renderer' type work actually happens in ReplayOutput.
2017-04-18 14:57:47 +01:00
baldurk a7ab0d9300 Move capture-file handling functions into a single interface
* This allows us to return complex types like byte arrays or pairs of
  status & render handle.
* Also in future more introspection of the capture file will be possible
  and this provides an easy extension to that without adding new entry
  points.
2017-04-18 14:57:47 +01:00
baldurk dd1e090040 Make some parameter names more verbose 2017-04-18 14:57:47 +01:00
baldurk bc79e2296f Make EnvironmentModification struct and pass around array directly
* The old 'store in opaque void*' is kept as entry point wrappers only
  for the C# UI.
2017-04-18 14:57:47 +01:00
baldurk 43eb5072b4 Remove 'magic constant' use of ~0U as invalid/skip/no result.
* In python it's not as quick to get ~0U since ints aren't unsigned or
  fixed size. Adding named constants makes it easier for people to use
  the right values, and C++ users can still pass ~0U.
2017-04-18 14:57:47 +01:00
baldurk f6c045f473 Refactor public interface to be less strict C and more python friendly
* Generally this means removing ref out parameters and instead returning
  values. In a couple of cases we will want to avoid copies in future
  either by returning const references (e.g. to the pipeline state which
  is immutable).
* At the same time, some pointless bool return values that were always
  true and didn't indicate errors have been removed. They can be added
  again if an error condition comes back.
* Some free functions still have out parameters as C linkage doesn't
  allow returning user types by value.
* The C# UI still invokes into C wrappers for all the C++ classes, which
  handle taking the return value and doing a copy into an out parameter
  still for compatibility.
2017-04-18 14:57:46 +01:00
baldurk a1f2fdacbc Add std::initializer_list support to rdctype::array 2017-04-18 14:57:46 +01:00
baldurk 05d0e2eb77 Add utility functions for rdctype::pair, make_pair and cast to tuple
* make_pair is obvious, the cast to tuple allows using std::tie to split
  a returned pair into two local variables.
2017-04-18 14:57:46 +01:00
baldurk 2c978ef9e9 Document Vulkan pipeline state object 2017-04-18 14:57:46 +01:00
baldurk d139eb9657 Document the OpenGL pipeline state object 2017-04-18 14:57:46 +01:00
baldurk 94b97223b2 Document the D3D12 pipeline state object 2017-04-18 14:57:45 +01:00
baldurk 362aed739b Document the D3D11 pipeline state object 2017-04-18 14:57:45 +01:00
baldurk b31725ad67 Document renderdoc_replay.h, main interfaces and free functions
* Also include some guidelines on documentation writing.
2017-04-18 14:57:45 +01:00
baldurk 61b191b501 Document the remaining non-pipeline structures in data_types.h 2017-04-18 14:57:45 +01:00
baldurk ab73425ec6 Document the shader types 2017-04-18 14:57:45 +01:00
baldurk 90d8b2bd47 Copy capture options documentation from comments in renderdoc_app.h 2017-04-18 14:57:45 +01:00
baldurk 043b47ec91 Add documentation for data types in control_types.h 2017-04-18 14:57:45 +01:00
baldurk 83f769a2cd Document the enums in replay_enums.h 2017-04-18 14:57:44 +01:00
baldurk 2de280d494 Use protected default constructors/destructors to hide them from SWIG 2017-04-18 14:57:44 +01:00
baldurk 5adce29b44 Add support for documenting bindings API directly in code 2017-04-18 14:57:41 +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