Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1116
In D3D11DeviceContext::RSGetViewports, D3D11 only sets pNumViewports if pViewports is null.
I've verified this with Windows D3D11. Wine also does it that way.
The behavior for RSGetScissorRects is the same.
MyGUI (a gui library that Scrap Mechanic uses) has a useless assert that only checks D3D11 runtime behavior.
It does have a viewport at the point this gets executed but because it passes a valid pointer as pViewports, the count doesnt get changed.
https://github.com/MyGUI/mygui/blob/master/Platforms/DirectX11/DirectX11Platform/src/MyGUI_DirectX11RenderManager.cpp#L122
The MyGUI demos run fine with this PR.