bkaradzic / bgfx

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

Home Page:https://bkaradzic.github.io/bgfx/overview.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metal: Toggling MSAA at runtime fails validation and doesn't render correctly

rogual opened this issue · comments

Describe the bug
Toggling MSAA on/off at runtime causes rendering artifacts (corrupted textures and an overall dim render) and throws a Metal validation error:

-[MTLDebugRenderCommandEncoder validateFramebufferWithRenderPipelineState:]:1211: failed assertion `For color attachment 0, the texture sample count (8) does not match the renderPipelineState sampleCount (1).'

To Reproduce
Steps to reproduce the behavior:

  1. Run example 09-hdr
  2. Press F8 while it's running to toggle MSAA

Expected behavior
MSAA should toggle on or off

Additional context
MacOS 10.14 Mojave
Intel Iris Plus Graphics 640 1536 MB
MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
Bgfx with this patch to make it compile on 10.14