Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTT mip-maps are not being generated automatically on D3D12 #1265

Open
docEdub opened this issue Jul 21, 2023 · 3 comments
Open

RTT mip-maps are not being generated automatically on D3D12 #1265

docEdub opened this issue Jul 21, 2023 · 3 comments
Assignees
Milestone

Comments

@docEdub
Copy link
Contributor

docEdub commented Jul 21, 2023

Running playground https://playground.babylonjs.com/#W7E7CF#25 on D3D12 shows the following when the window is small or the camera is moved far enough away...

MicrosoftTeams-image (4)

It should look like this ...

Cedric and I looked at this in RenderDoc and saw the RTT mip-maps are missing on D3D12. They are generated automatically for other graphics APIs, but not D3D12.

@docEdub docEdub added the bug Something isn't working label Jul 21, 2023
@CedricGuillemet
Copy link
Contributor

I believe we can close this issue ? @docEdub

@docEdub
Copy link
Contributor Author

docEdub commented Jul 24, 2023

I believe we can close this issue ? @docEdub

I don't think this is fixed, yet.

@bghgary bghgary added this to the 7.0 milestone Jul 31, 2023
@docEdub
Copy link
Contributor Author

docEdub commented Sep 19, 2023

I found this bgfx issue that may be related: bkaradzic/bgfx#798

TLDR; Automatic mip-map generation is not provided by D3D12, Vulkan, or Metal, so it needs to be explicitly implemented in bgfx to match the behavior seen in other graphics APIs. For Vulkan, this was implemented in bgfx in PR bkaradzic/bgfx#2472, and for Metal in PR bkaradzic/bgfx#2784, but it has not been implemented in D3D12, yet, and afaict there is no plan to do so.

The end-result is the mip-map layers get created by bgfx on D3D12, but they are all black.

@docEdub docEdub removed the bug Something isn't working label Sep 19, 2023
docEdub added a commit that referenced this issue Sep 21, 2023
Three validation tests for scissors are failing on D3D12 due to mip-maps
being created but not populated by bgfx. See
#1265. While we are
waiting for the fix in bgfx, we want to disable these tests on D3D12.

This change adds a key to the validation tests config.json named
`excludedGraphicsApis` that takes an array of strings specifying which
graphics apis to skip for the given test. For example, to skip the D3D12
graphics api when running one of the broken scissor tests, it would look
like this:
```
        {
            "title": "Scissor test",
            "renderCount": 10,
            "playgroundId": "#W7E7CF#12",
            "referenceImage": "scissor-test.png",
            "excludedGraphicsApis": ["D3D12"]
        },
```

The config.json key's name of `excludedGraphicsApis` was chosen to match
a similar key in the Babylon.js validation test config.json named
`excludedEngines`.
@bghgary bghgary modified the milestones: 7.0, Future Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants