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.
This commit is contained in:
baldurk committed 2017-12-20 23:41:08 +00:00
1 parent 649e82b8ed
commit b070a371e2
15 files changed
+393 -56

No files matched your search

+18 -1
View File
@@ -704,10 +704,23 @@ struct OM
View DepthTarget;
DOCUMENT("``True`` if depth access to the depth-stencil target is read-only.");
bool DepthReadOnly = false;
DOCUMENT("``True`` if stenncil access to the depth-stencil target is read-only.");
DOCUMENT("``True`` if stencil access to the depth-stencil target is read-only.");
bool StencilReadOnly = false;
};
DOCUMENT("Describes the current state of predicated rendering.");
struct Predication
{
DOCUMENT("The :class:`ResourceId` of the active predicate.");
ResourceId Obj;
DOCUMENT("The value to go along with the predicate.");
bool Value = false;
DOCUMENT("``True`` if the current predicate would render.");
bool Passing = false;
};
DOCUMENT("The full current D3D11 pipeline state.");
struct State
{
@@ -735,6 +748,9 @@ struct State
DOCUMENT("A :class:`D3D11_OM` describing the output merger pipeline stage.");
OM m_OM;
DOCUMENT("A :class:`Predication` describing the predicated rendering state.");
Predication m_Predicate;
};
}; // namespace D3D11Pipe
@@ -759,4 +775,5 @@ DECLARE_REFLECTION_STRUCT(D3D11Pipe::Blend);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::BlendEquation);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::BlendState);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::OM);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::Predication);
DECLARE_REFLECTION_STRUCT(D3D11Pipe::State);
+3 -1
View File
@@ -1362,6 +1362,8 @@ pixel.
bool depthTestFailed;
DOCUMENT("``True`` if stencil testing eliminated this fragment.");
bool stencilTestFailed;
DOCUMENT("``True`` if predicated rendering skipped this call.");
bool predicationSkipped;
DOCUMENT(R"(Determine if this fragment passed all tests and wrote to the texture.
@@ -1371,7 +1373,7 @@ pixel.
bool passed() const
{
return !sampleMasked && !backfaceCulled && !depthClipped && !viewClipped && !scissorClipped &&
!shaderDiscarded && !depthTestFailed && !stencilTestFailed;
!shaderDiscarded && !depthTestFailed && !stencilTestFailed && !predicationSkipped;
}
};