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 · 6 comments
Closed

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

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

Comments

@el-dee
Copy link
Contributor

@el-dee 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

This comment has been minimized.

Copy link
Member

@rdb 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

This comment has been minimized.

Copy link
Contributor Author

@el-dee 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

This comment has been minimized.

Copy link
Member

@rdb rdb commented Oct 10, 2019

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

@el-dee

This comment has been minimized.

Copy link
Contributor Author

@el-dee 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

This comment has been minimized.

Copy link
Member

@rdb rdb commented Oct 10, 2019

@el-dee

This comment has been minimized.

Copy link
Contributor Author

@el-dee 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 Oct 10, 2019
@rdb rdb added this to the 1.10.5 milestone Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.