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

MacOS: glgsg error when enabling msaa on floating point color buffer #756

Closed
el-dee opened this issue Oct 10, 2019 · 7 comments
Closed

MacOS: glgsg error when enabling msaa on floating point color buffer #756

el-dee opened this issue Oct 10, 2019 · 7 comments
Labels
Milestone

Comments

@el-dee
Copy link
Contributor

el-dee commented Oct 10, 2019

On MacOS, when activating MSAA on a frame buffer with floating point color the glgsg throws errors then abort because the configuration is not supported by the driver but not detected by Panda. This happens both with the legacy profile and the core profile.

Here is a minimal test program :

#!/usr/bin/env python

import panda3d.core as p3d
from direct.showbase.ShowBase import ShowBase
from direct.filter.FilterManager import FilterManager

p3d.load_prc_file_data("", "gl-check-errors #t\n")
#p3d.load_prc_file_data("", "gl-version 3 2\n")

base = ShowBase()

manager = FilterManager(base.win, base.cam)
fbprops = p3d.FrameBufferProperties()
fbprops.float_color = True
fbprops.set_multisamples(4)
scene_tex = p3d.Texture()
tonemap_quad = manager.render_scene_into(colortex=scene_tex, fbprops=fbprops)

base.run()

See forum thread : https://discourse.panda3d.org/t/gltf-viewer-glgsg-error-on-mac-when-using-msaa/25236

@rdb
Copy link
Member

rdb commented Oct 10, 2019

I'm getting some strong déjà vu:
https://discourse.panda3d.org/t/multisampling-srgb-and-intermediate-buffers/24304
886d44d

What's different here, I guess, is that the buffer is 16-bit float, but the multisample buffer is being created as 32-bit float, so we need to add an extra case.

@rdb rdb added the macos label Oct 10, 2019
@el-dee
Copy link
Contributor Author

el-dee commented Oct 10, 2019

You have a better memory than me :) And indeed, when setting explicitly the component size to 32 it works fine.

rdb added a commit that referenced this issue Oct 10, 2019
@rdb
Copy link
Member

rdb commented Oct 10, 2019

I think 6dcaab2 should fix it, would you mind testing it to be sure?

@el-dee
Copy link
Contributor Author

el-dee commented Oct 10, 2019

Will an installer be available on buildbot ? (I tried building from source but the resulting sdk crashes at startup when instancing CocoaGraphicsPipe(). Actually it's the first time I compile Panda on Mojave...)

@rdb
Copy link
Member

rdb commented Oct 10, 2019

@el-dee
Copy link
Contributor Author

el-dee commented Oct 10, 2019

Thanks, it works fine with your build :)

I will look why I can't have a valid build with Mojave...

@el-dee el-dee closed this as completed Oct 10, 2019
@rdb rdb added this to the 1.10.5 milestone Dec 31, 2019
@duburcqa
Copy link

For the record, to this day it is still crashing with the following image format:

import panda3d.core as p3d
from direct.showbase.ShowBase import ShowBase
from direct.filter.FilterManager import FilterManager

p3d.load_prc_file_data("", "gl-check-errors #t\n")

base = ShowBase()
manager = FilterManager(base.win, base.cam)
fbprops = p3d.FrameBufferProperties()
fbprops.set_rgba_bits(8, 8, 8, 0). # 8, 8, 8, 8 is working fine
fbprops.set_multisamples(4)
scene_tex = p3d.Texture()
tonemap_quad = manager.render_scene_into(colortex=scene_tex, fbprops=fbprops)
base.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants