mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 16:50:44 +00:00
Test D3D discards with NULL region or rects
This commit is contained in:
@@ -244,6 +244,11 @@ RD_TEST(D3D11_Discard_Zoo, D3D11GraphicsTest)
|
||||
MakeTexture(DXGI_FORMAT_R16G16B16A16_FLOAT, 300, 300).Multisampled(4).Array(5).RTV());
|
||||
DiscardView<ID3D11RenderTargetViewPtr>(MakeRTV(tex).FirstSlice(2).NumSlices(1));
|
||||
|
||||
// test with DiscardView1 and NULL rect
|
||||
TEX_TEST("DiscardAll Slice2",
|
||||
MakeTexture(DXGI_FORMAT_R16G16B16A16_FLOAT, 300, 300).Multisampled(4).Array(5).RTV());
|
||||
ctx1->DiscardView1((ID3D11RenderTargetViewPtr)MakeRTV(tex).FirstSlice(2).NumSlices(1), NULL, 0);
|
||||
|
||||
// test 1D/3D textures
|
||||
ctx1->DiscardResource(tex1d);
|
||||
ctx1->DiscardResource(tex3d);
|
||||
|
||||
@@ -402,6 +402,18 @@ float4 main(v2f IN) : SV_Target0
|
||||
TEX_TEST(L"DiscardAll", MakeTexture(DXGI_FORMAT_BC7_UNORM, 300, 300));
|
||||
DiscardResource(cmd, tex);
|
||||
|
||||
// test with discarding a NULL region
|
||||
TEX_TEST(L"DiscardAll", MakeTexture(DXGI_FORMAT_R16G16B16A16_FLOAT, 300, 300));
|
||||
cmd->DiscardResource(tex, NULL);
|
||||
// and with NULL rects
|
||||
TEX_TEST(L"DiscardAll", MakeTexture(DXGI_FORMAT_R16G16B16A16_FLOAT, 300, 300));
|
||||
{
|
||||
D3D12_DISCARD_REGION reg = {};
|
||||
reg.FirstSubresource = 0;
|
||||
reg.NumSubresources = 1;
|
||||
cmd->DiscardResource(tex, ®);
|
||||
}
|
||||
|
||||
// test with different mips/array sizes
|
||||
TEX_TEST(L"DiscardAll", MakeTexture(DXGI_FORMAT_R16G16B16A16_FLOAT, 300, 300).Mips(5));
|
||||
DiscardResource(cmd, tex);
|
||||
|
||||
Reference in New Issue
Block a user