microsoft / microsoft/DirectX-Graphics-Samples
Viewport corruption with AMD Radeon on window resize
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
-
modify https://github.com/microsoft/DirectX-Graphics-Samples/blob/master/Samples/Desktop/D3D12HelloWorld/src/HelloTriangle/D3D12HelloTriangle.cpp#L201 with the following code
// Define the geometry for a triangle.
Vertex triangleVertices[] =
{
{ { 0.0f, 1.f * m_aspectRatio, 0.0f }, { 1.0f, 0.0f, 0.0f, 1.0f } },
{ { 1.f, -1.f * m_aspectRatio, 0.0f }, { 0.0f, 1.0f, 0.0f, 1.0f } },
{ { -1.f, -1.f * m_aspectRatio, 0.0f }, { 0.0f, 0.0f, 1.0f, 1.0f } }
};
This will make the bug visible as the triangle will now extend to the window extents.
-
run app and resize the window a bit using the mouse (ex. bottom right corner)
-
see corruption in the viewport as it seems mismatched to the window client area

-
moving the window with the title bar will fix the bug
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Samples/Desktop/D3D12HelloWorld/src/HelloTriangle/D3D12HelloTriangle.cpp, including the geometry change at line 201, and run the HelloTriangle sample on an AMD Radeon system. Resize the window with the mouse and compare the viewport with the client area; done means repeated resizing no longer produces corruption and moving the window is not needed to correct it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100