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

[mtl] clear_attachments changes viewport but does not reset it #3109

Closed
zakorgy opened this issue Dec 18, 2019 · 0 comments · Fixed by #3110
Closed

[mtl] clear_attachments changes viewport but does not reset it #3109

zakorgy opened this issue Dec 18, 2019 · 0 comments · Fixed by #3110

Comments

@zakorgy
Copy link
Contributor

zakorgy commented Dec 18, 2019

Short info header:

  • GFX version: hal-0.4
  • OS: MacOS
  • GPU: Intel

Calling clear_attcahment after the viewport is set changes the viewport but does not reset it.
I've a modified quad example for it: https://github.com/zakorgy/gfx/tree/clear-attachment (just added a clear_attachment to clear an area to red)

The expected result with Vulkan and DX12:
Screenshot from 2019-12-18 09-08-13

The actual result with Metal, the rendered image is flipped:
Screenshot 2019-12-18 at 9 00 42

I suspect this is caused by changing the viewport in clear_attachments: https://github.com/gfx-rs/gfx/blob/hal-0.4/src/backend/metal/src/command.rs#L2953 . Also I'm not sure what happens with scissor, because it's also set for the clear but doesn't seem to affect the result.

cc @kvark

@zakorgy zakorgy changed the title [mtl] clear_attachments changes viewport but does not reset it [mtl] clear_attachments changes viewport but does not reset it Dec 18, 2019
@bors bors bot closed this as completed in 4fc0b4a Dec 18, 2019
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

Successfully merging a pull request may close this issue.

1 participant