microsoft / microsoft/DirectX-Graphics-Samples

Viewport corruption with AMD Radeon on window resize

Open
#754 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

samples
Dominant language
C++
Stars
6.8k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

  1. load https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/Samples/Desktop/D3D12HelloWorld/src/HelloTriangle

  2. 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.

  1. run app and resize the window a bit using the mouse (ex. bottom right corner)

  2. see corruption in the viewport as it seems mismatched to the window client area
    image

  3. moving the window with the title bar will fix the bug

DxDiag.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.