Commit Graph

73 Commits

Author SHA1 Message Date
Jake Turner 3cb8998841 Vulkan DebugPixel support for multiview debugging
Output "ViewIndex" into the pixel shader hits array
Select the pixel shader input which matches the viewIndex to the passed in view
Ignore the view parameter if set to ~0U (rd.ReplayController.NoPreference)
Ignore the view parameter if any subpass has empty multiviews
2024-03-13 07:58:48 +00:00
Jake Turner 7934d1d16e Change DebugPixel() to take a DebugShaderInputs struct
DebugShaderInputs struct contains existing the parameters:

sample
primitive

and a new parameter

view

Default constructor for DebugShaderInputs sets the parameters to NoPreference (~0U).
2024-03-13 07:58:48 +00:00
Jake Turner 5b55188260 Pixel History UI draw background colour for UINT and SINT targets 2024-02-29 06:47:14 +00:00
Jake Turner 893142d7f0 In Pixel History always shaderOut for depth targets
Including when there is no pixel shader bound
2024-02-13 17:27:05 +00:00
Jake Turner e254e66ae4 In Pixel History View do not force shaderOut to show four components
Matches the formatting used for "Tex Before" and "Tex After"
2024-02-13 17:27:05 +00:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
Jake Turner 0a330ef593 Add slice information to the Pixel History Window Title 2024-02-01 15:43:24 +00:00
William Pearson a214ffcaf3 Fix debug pixel at primitive and event message mixing parameter order up 2023-08-15 10:09:40 +01:00
baldurk 75bfff3481 Mark UAV writes appropriately in GL pixel history 2023-03-24 15:04:15 +00:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk 1eee00f01d Remove unnecessary sRGB conversions 2022-06-16 16:30:00 +01:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
baldurk d0accc409b Rename 'name' member of ActionDescription to 'customName'
* This is a deliberate break of compatibility since the field is now often
  empty, for non-markers. This means code will get a more explicit error when
  the name is being referenced, so it can be updated to fetch the name it needs
  as needed.
2021-07-01 15:15:05 +01:00
baldurk 7149302680 Rename 'draw' or 'drawcall' to action
* There's not a good accepted terminology for this kind of event, and for
  historical reasons 'drawcall' has been the accepted term, even though
  that can be quite confusing when a dispatch or a copy is a 'drawcall'.
* This is particularly highlighted by the event browser filters where
  $draw() includes draws and dispatches, but $dispatch() only includes
  dispatches, it's hard to intuitively understand why $draw() matches all
  of these calls.
* As a result we've defined the term 'action' to cover these types of
  events in the same way that we defined 'event' in the first place to
  mean a single atomic API call.
2021-07-01 15:15:05 +01:00
baldurk c6c133bdd0 Add icons for texture viewer pixel history/debug buttons 2021-05-11 16:15:31 +01:00
baldurk 30dd13feb8 Pull index byte width and topology out of drawcall state
* These are treated as state on most APIs, only GL treats it as a drawcall
  parameter.
2021-02-24 13:52:07 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk 7ff7e0a71d Replace fixed C arrays with wrapper class in public interface
* These map more naturally to python tuples and are easier to wrap in and out.
* We also tidy up the FloatVecVal etc and standardise the members of
  ShaderValue.
2020-12-09 18:16:08 +00:00
baldurk f6babe77fd Handle depth clipping and depth bounds failure separately
* This prevents truly depth-clipped fragments from being wrongly reported as
  other failures like backface culling.
2020-07-20 16:07:36 +01:00
baldurk 4d6d949f42 Manually check depth test to get per-fragment pass/fail 2020-07-16 20:45:19 +01:00
baldurk 08a3d05e71 Explicitly note which modifications in pixel history are unavailable 2020-07-16 20:39:25 +01:00
baldurk d4ddb565d0 Add a per-shader debuggable flag to allow finer grained status
* E.g. on D3D12 we can debug DXBC shaders but not DXIL shaders. On vulkan this
  will allow us to have the UI work better when encountering shaders with
  unsupported capabilities or extensions.
2020-06-18 17:22:45 +01:00
baldurk ca28154fc0 Check for geometryShader feature when fetching prim ID in pixel history 2020-05-15 19:03:27 +01:00
baldurk 9c42e886ae Pass boundaries don't have any sub-draw modifications, same as clears 2020-05-06 19:35:50 +01:00
baldurk 936e6372cb Remove use of 3rdparty/ prefix from includes
* We instead always have 3rdparty/ in the relevant include search paths and rely
  on that. Each library still has its own unique base dir within 3rdparty to
  clarify where the include is coming from.
2020-03-11 18:00:53 +00:00
baldurk 661ee35f30 Refactor ShaderDebugTrace to not return a single list of complete states
* The ShaderDebugTrace now only sets up the initial state of an opaque
  ShaderDebugger handle.
* This handle can then be passed to a new function - ContinueDebug - to
  iteratively return N more states. The number of states is implementation
  defined and may be a fixed number or it may run for a fixed time.
* The states themselves no longer contain a complete snapshot of all variables,
  but instead only the changed variables for that iteration. The changes are
  stored as before and after value to make it easier to step forwards and
  backwards (only the ShaderDebugState is needed to move forward or backwards,
  you don't have to search back for the last set value of a variable to 'undo' a
  change).
2020-02-06 17:58:42 +00:00
Steve Karolewics 824188d047 Fix text contrast in pixel history view with dark UI theme 2020-01-09 17:56:54 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk db563bb0bf Refactor public interface around handling of textures
* Subresource handling is more consistent - we pass around a struct now that
  contains the array slice, mip level, and sample. We remove the concept of
  'MSAA textures count samples as extra slices within the real slices' and
  internalise that completely. This also means we have a consistent set
  everywhere that we need to refer to a subresource.
* Functions that used to be in the ReplayOutput and use a couple of implicit
  parameters from the texture viewer configuration are now in the
  ReplayController and take them explicitly. This includes GetMinMax,
  GetHistogram, and PickPixel.
* Since these functions aren't ReplayOutput relative, if you want to decode the
  custom shader texture or the overlay texture you need to pass that ID
  directly.
2019-11-26 17:38:25 +00:00
baldurk 01344c7e83 Rename typeHint to typeCast 2019-11-26 17:38:25 +00:00
Steve Karolewics c4caf64464 Fix brush colors in pixel history view
The shader output brush colors were displaying the tex before color
instead of the shader output color. Updated the linear -> sRGB formula
to match what DirectX does.
2019-08-05 10:37:39 +01:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk ad4bc8911e Always display all 4 components of output from shader in pixel history
* This means the alpha that was output (and maybe used for blending) is
  displayed even when the target texture doesn't have an alpha component.
2018-11-12 19:26:35 +00:00
baldurk 615b743b8e Make shader debugging soft-blocking, pop up progress bar while working
* This prevents the user from accidentally triggering some other process while
  the debug is still on-going, if it's taking a while.
2018-10-08 17:24:00 +01:00
baldurk 0dda96a045 Change previous/next/parent IDs in DrawcallDescription to pointers
* This is a legacy holdover from the C# interop not being able to preserve
  pointers easily.
2018-06-18 18:39:06 +01:00
baldurk 9b25f3948e Fix copy-paste error of shader output values in wrong places in history 2018-06-07 16:08:28 +01:00
baldurk 72eb734964 Correctly pass selected primitive to DebugPixel from pixel history 2018-05-17 01:35:26 +01:00
baldurk 082ab4d75d GUIInvoke takes a QObject* to avoid callbacks after object lifetime
* The GUIInvoke object takes a QObject, and uses QPointer to check that
  it hasn't been deleted when the callback fires. This prevents delayed
  callbacks from executing after the object has been deleted and
  crashing.
* In most cases the pointer is just 'this'.
2018-05-08 11:54:34 +01:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk ebaefc82a9 Normalise and make python/public interface more consistent
* We enforce a naming scheme more strongly - types, member functions,
  and enum values must be UpperCaseCamel, and member variables must be
  lowerCaseCamel. No underscores allowed.
* eventId not eventID or EID, and Id preferred to ID in general. Also
  for resourceId.
* Removed some lingering hungarian m_Foo naming.
* Some pipeline state structs that are almost identical between the
  different APIs are pulled out into common structs. Where something
  doesn't make sense (e.g. viewport enable for vulkan) it will just be
  set to a sensible default (in that case always true).
* Changed scissors to be x/y & width/height instead of sometimes
  left/top/right/bottom
* Abbreviations are discouraged, e.g. operation not op, function not
  func.
2017-12-22 13:02:36 +00:00
baldurk b070a371e2 Improve D3D11 predication handling, and track other asyncs independently
* Instead of replaying predication, we now always skip it during replay,
  so all objects will render. This is much more consistent and
  understandable behaviour instead of things mysteriously disappearing
  with no obvious reason why.
* We track the predication that would have happened and replay Begin/End
  pairs so that we can know if the predication *would* have failed.
* This is displayed in the UI (currently in the raster state, for lack
  of a better location) with the pass/fail that would have happened.
* This information can feed into other places for analysis like the
  pixel history.
2017-12-20 23:41:08 +00:00
baldurk 602511bf33 Reduce parameters that need to be passed for viewing shaders 2017-11-22 19:11:27 +00:00
baldurk 33ff48811b Normalise terminology in UI code - don't call captures 'logs'
* Log is an overloaded term since it can also mean the debug log. We now
  consistently refer to capture files as capture files or just captures
  for short. The log is just for log messages and diagnostics.
* The user-facing UI was mostly already consistent, but many of the
  public interfaces exposed to python needed to be renamed, and it made
  more sense just to make everything consistent.
2017-11-17 16:30:57 +00:00
baldurk 2ac0802b10 When a custom name is changed, refresh the UI to propagate it properly 2017-11-17 16:30:54 +00:00
baldurk 7c8628b237 Centralise resource naming with capture context to allow customisation
* We remove the now unneeded name fields in buffer/texture descriptions
  and some of the pipeline state structs.
* A single function will give the human-readable name for a resource id.
  This will look up a custom set of renames, on top of the names from
  the resource descriptions.
2017-11-17 16:30:53 +00:00
baldurk e6c5c03896 Remove rdctype namespace. Rename rdctype::str -> rdcstr, rdcarray, etc
* Since these types are more prevalent than originally designed, it
  makes more sense to remove the namespace for ease of typing/naming.
* Also add a specialised type 'bytebuf' for an array of bytes.
* This makes mapping easier to SWIG since there's no special casing for
  namespaced arrays. Especially so for nested cases like
  rdctype::array<rdctype::str> -> rdcarray<rdcstr>
2017-11-03 16:04:59 +00:00
baldurk 5e59616a8c Update rdctype::array to have a more stl-like mutable interface
* For the most part the interface is stl-compatible, but we have a few
  little changes of our own for convenience.
* This class is still needed after deleting the C# UI, because we don't
  want to pass C++ stl structs over module boundaries and possibly run
  into hard to diagnose incompatibilities.
2017-11-03 16:01:58 +00:00
baldurk 42abaf2b4f Prefer using VK_AMD_shader_info to disassemble when available. 2017-10-23 15:05:29 +01:00
baldurk b66d11086c Remove a TODO that's already been implemented 2017-10-02 15:54:53 +01:00
baldurk e85c8d19bf Combine 'special' with 'specialFormat' as single resource format type
* There was no good reason to have a flag indicating if the special
  format was valid or not. Now it's a single enum, with a value
  'Regular' indicating that the compCount/compWidth/compType fully
  describe the format itself.
* This makes code patterns easier as you no longer need to check for
  special then check for specialFormat, you can just test the type
  directly.
2017-08-24 10:37:16 +01:00