diff --git a/src/tests/end2end/D3D12ResourceWrappingTests.cpp b/src/tests/end2end/D3D12ResourceWrappingTests.cpp index 72de44c07c..b8d3c65dc5 100644 --- a/src/tests/end2end/D3D12ResourceWrappingTests.cpp +++ b/src/tests/end2end/D3D12ResourceWrappingTests.cpp @@ -439,6 +439,7 @@ TEST_P(D3D12SharedHandleUsageTests, ClearInD3D11CopyAndReadbackInD3D12) { ComPtr dxgiKeyedMutex; WrapAndClearD3D11Texture(&baseDawnDescriptor, &baseD3dDescriptor, &dawnSrcTexture, clearColor, &d3d11Texture, &dxgiKeyedMutex); + ASSERT_NE(dawnSrcTexture.Get(), nullptr); // Create a texture on the device and copy the source texture to it. wgpu::Texture dawnCopyDestTexture = device.CreateTexture(&baseDawnDescriptor); @@ -462,6 +463,7 @@ TEST_P(D3D12SharedHandleUsageTests, ClearInD3D11ReadbackInD3D12) { ComPtr dxgiKeyedMutex; WrapAndClearD3D11Texture(&baseDawnDescriptor, &baseD3dDescriptor, &dawnTexture, clearColor, &d3d11Texture, &dxgiKeyedMutex); + ASSERT_NE(dawnTexture.Get(), nullptr); // Readback the destination texture and ensure it contains the colors we used // to clear the source texture on the D3D device. @@ -482,6 +484,7 @@ TEST_P(D3D12SharedHandleUsageTests, ClearInD3D12ReadbackInD3D11) { ComPtr dxgiKeyedMutex; WrapAndClearD3D11Texture(&baseDawnDescriptor, &baseD3dDescriptor, &dawnTexture, d3d11ClearColor, &d3d11Texture, &dxgiKeyedMutex); + ASSERT_NE(dawnTexture.Get(), nullptr); const wgpu::Color d3d12ClearColor{0.0f, 0.0f, 1.0f, 1.0f}; ClearImage(dawnTexture, d3d12ClearColor); @@ -507,6 +510,7 @@ TEST_P(D3D12SharedHandleUsageTests, ClearTwiceInD3D12ReadbackInD3D11) { ComPtr dxgiKeyedMutex; WrapAndClearD3D11Texture(&baseDawnDescriptor, &baseD3dDescriptor, &dawnTexture, d3d11ClearColor, &d3d11Texture, &dxgiKeyedMutex); + ASSERT_NE(dawnTexture.Get(), nullptr); const wgpu::Color d3d12ClearColor1{0.0f, 0.0f, 1.0f, 1.0f}; ClearImage(dawnTexture, d3d12ClearColor1); @@ -534,6 +538,7 @@ TEST_P(D3D12SharedHandleUsageTests, UninitializedTextureIsCleared) { ComPtr dxgiKeyedMutex; WrapAndClearD3D11Texture(&baseDawnDescriptor, &baseD3dDescriptor, &dawnTexture, clearColor, &d3d11Texture, &dxgiKeyedMutex, false); + ASSERT_NE(dawnTexture.Get(), nullptr); // Readback the destination texture and ensure it contains the colors we used // to clear the source texture on the D3D device. diff --git a/src/tests/end2end/D3D12VideoViewsTests.cpp b/src/tests/end2end/D3D12VideoViewsTests.cpp index 6f7938de58..d460433c27 100644 --- a/src/tests/end2end/D3D12VideoViewsTests.cpp +++ b/src/tests/end2end/D3D12VideoViewsTests.cpp @@ -189,13 +189,13 @@ namespace { // texture is left uninitialized. This is required for D3D11 and D3D12 interop. ComPtr dxgiKeyedMutex; hr = d3d11Texture.As(&dxgiKeyedMutex); - EXPECT_EQ(hr, S_OK); + ASSERT_EQ(hr, S_OK); hr = dxgiKeyedMutex->AcquireSync(0, INFINITE); - EXPECT_EQ(hr, S_OK); + ASSERT_EQ(hr, S_OK); hr = dxgiKeyedMutex->ReleaseSync(1); - EXPECT_EQ(hr, S_OK); + ASSERT_EQ(hr, S_OK); // Open the DX11 texture in Dawn from the shared handle and return it as a WebGPU // texture. @@ -266,6 +266,7 @@ TEST_P(D3D12VideoViewsTests, NV12SampleYtoR) { wgpu::Texture wgpuTexture; CreateVideoTextureForTest(wgpu::TextureFormat::R8BG8Biplanar420Unorm, wgpu::TextureUsage::Sampled, /*isCheckerboard*/ false, &wgpuTexture); + ASSERT_NE(wgpuTexture.Get(), nullptr); wgpu::TextureViewDescriptor viewDesc; viewDesc.aspect = wgpu::TextureAspect::Plane0Only; @@ -318,6 +319,7 @@ TEST_P(D3D12VideoViewsTests, NV12SampleUVtoRG) { wgpu::Texture wgpuTexture; CreateVideoTextureForTest(wgpu::TextureFormat::R8BG8Biplanar420Unorm, wgpu::TextureUsage::Sampled, /*isCheckerboard*/ false, &wgpuTexture); + ASSERT_NE(wgpuTexture.Get(), nullptr); wgpu::TextureViewDescriptor viewDesc; viewDesc.aspect = wgpu::TextureAspect::Plane1Only; @@ -371,6 +373,7 @@ TEST_P(D3D12VideoViewsTests, NV12SampleYUVtoRGB) { wgpu::Texture wgpuTexture; CreateVideoTextureForTest(wgpu::TextureFormat::R8BG8Biplanar420Unorm, wgpu::TextureUsage::Sampled, /*isCheckerboard*/ true, &wgpuTexture); + ASSERT_NE(wgpuTexture.Get(), nullptr); wgpu::TextureViewDescriptor lumaViewDesc; lumaViewDesc.aspect = wgpu::TextureAspect::Plane0Only;