Handle array textures and multiview properly in overlays. Closes #1895

This commit is contained in:
baldurk
2020-05-27 22:37:31 +01:00
parent b0cd8584fb
commit abb959e1fd
21 changed files with 732 additions and 235 deletions
@@ -146,6 +146,7 @@ float4 main() : SV_Target0
creator.GraphicsDesc.DepthStencilState.StencilEnable = FALSE;
creator.GraphicsDesc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_ALWAYS;
creator.PS(whitepsblob);
creator.DSV(DXGI_FORMAT_UNKNOWN);
ID3D12PipelineStatePtr whitepipe = creator;
ResourceBarrier(vb, D3D12_RESOURCE_STATE_COMMON, D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER);
+9 -4
View File
@@ -468,7 +468,7 @@ class Overlay_Test(rdtest.TestCase):
pipe: rd.PipeState = self.controller.GetPipelineState()
col_tex = pipe.GetOutputTargets()[0].resourceId
sub = rd.Subresource(pipe.GetOutputTargets()[0].firstMip, 0, 0)
sub = rd.Subresource(pipe.GetOutputTargets()[0].firstMip, pipe.GetOutputTargets()[0].firstSlice, 0)
for overlay in rd.DebugOverlay:
if overlay == rd.DebugOverlay.NoOverlay:
@@ -497,9 +497,14 @@ class Overlay_Test(rdtest.TestCase):
shift = 1
# All values in mip 0 should be 0 for all overlays
self.check_pixel_value(overlay_id, 200, 150, [0.0, 0.0, 0.0, 0.0], sub=rd.Subresource(0, 0, 0))
self.check_pixel_value(overlay_id, 197, 147, [0.0, 0.0, 0.0, 0.0], sub=rd.Subresource(0, 0, 0))
self.check_pixel_value(overlay_id, 203, 153, [0.0, 0.0, 0.0, 0.0], sub=rd.Subresource(0, 0, 0))
self.check_pixel_value(overlay_id, 200 >> shift, 150 >> shift, [0.0, 0.0, 0.0, 0.0], sub=rd.Subresource(0, 0, 0))
self.check_pixel_value(overlay_id, 197 >> shift, 147 >> shift, [0.0, 0.0, 0.0, 0.0], sub=rd.Subresource(0, 0, 0))
self.check_pixel_value(overlay_id, 203 >> shift, 153 >> shift, [0.0, 0.0, 0.0, 0.0], sub=rd.Subresource(0, 0, 0))
# Also for array slice 0 on this mip
self.check_pixel_value(overlay_id, 200 >> shift, 150 >> shift, [0.0, 0.0, 0.0, 0.0], sub=rd.Subresource(mip, 0, 0))
self.check_pixel_value(overlay_id, 197 >> shift, 147 >> shift, [0.0, 0.0, 0.0, 0.0], sub=rd.Subresource(mip, 0, 0))
self.check_pixel_value(overlay_id, 203 >> shift, 153 >> shift, [0.0, 0.0, 0.0, 0.0], sub=rd.Subresource(mip, 0, 0))
rdtest.log.success("Other mips are empty as expected for overlay {}".format(str(overlay)))