Hello Guest

[FIXED] GLX_NV_multisample_coverage not detected correctly?

  • 7 Replies
  • 11196 Views
On my Ubuntu 11.04 linux machine, glxinfo tells me that GLX_NV_multisample_coverage is enabled:

$ glxinfo | grep GLX_NV_multisample_coverage
    GLX_NV_present_video, GLX_NV_copy_image, GLX_NV_multisample_coverage,

However, when trying to use a PixelFormat with it, I get an exception:

Caused by: org.lwjgl.LWJGLException: Color samples > 0 specified but there's no support for GLX_NV_multisample_coverage
   at org.lwjgl.opengl.LinuxDisplayPeerInfo.initDefaultPeerInfo(Native Method)
   at org.lwjgl.opengl.LinuxDisplayPeerInfo.<init>(LinuxDisplayPeerInfo.java:52)
   at org.lwjgl.opengl.LinuxDisplay.createPeerInfo(LinuxDisplay.java:717)
   at org.lwjgl.opengl.Display.create(Display.java:855)
   at org.lwjgl.opengl.Display.create(Display.java:785)

Any ideas?

Thanks,

-- Ulf

Re: [BUG] GLX_NV_multisample_coverage not detected correctly?
« Reply #1 on: August 16, 2011, 22:08:18 »
Here's a larger part of glxinfo:

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
    GLX_EXT_swap_control, GLX_EXT_texture_from_pixmap, GLX_ARB_create_context,
    GLX_ARB_create_context_profile, GLX_EXT_create_context_es2_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_multisample,
    GLX_NV_float_buffer, GLX_ARB_fbconfig_float, GLX_EXT_framebuffer_sRGB
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
    GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_swap_control, GLX_EXT_swap_control, GLX_ARB_create_context,
    GLX_ARB_create_context_profile, GLX_NV_float_buffer,
    GLX_ARB_fbconfig_float, GLX_EXT_fbconfig_packed_float,
    GLX_EXT_texture_from_pixmap, GLX_EXT_framebuffer_sRGB,
    GLX_NV_present_video, GLX_NV_copy_image, GLX_NV_multisample_coverage,
    GLX_NV_video_capture, GLX_EXT_create_context_es2_profile,
    GLX_ARB_create_context_robustness

I suppose it could be not detected correctly because it's reported as a client glx extension? [Err no, that's not it...]
« Last Edit: August 16, 2011, 22:13:27 by UlfJack »

*

Online spasi

  • *****
  • 2261
    • WebHotelier
Re: [BUG] GLX_NV_multisample_coverage not detected correctly?
« Reply #2 on: August 16, 2011, 22:47:30 »
Hmm, this is weird. Could you try another extension? For example .withSRGB(true) or .withFloatingPoint(true), see if those work.

Re: [BUG] GLX_NV_multisample_coverage not detected correctly?
« Reply #3 on: August 17, 2011, 19:23:18 »
.withSamples(4) works and .withSRGB(true) also works (though apparently SRGB also works on my machine if I don't set that).

*

Online spasi

  • *****
  • 2261
    • WebHotelier
Re: [BUG] GLX_NV_multisample_coverage not detected correctly?
« Reply #4 on: August 17, 2011, 19:58:27 »
This is the extension detection code on Linux:

Code: [Select]
extension_flags->GLX_SGI_swap_control = symbols_flags.GLX_SGI_swap_control && GLXQueryExtension(disp, screen, "GLX_SGI_swap_control");
extension_flags->GLX_ARB_multisample = GLXQueryExtension(disp, screen, "GLX_ARB_multisample");
extension_flags->GLX_ARB_fbconfig_float = GLXQueryExtension(disp, screen, "GLX_ARB_fbconfig_float");
extension_flags->GLX_EXT_fbconfig_packed_float = GLXQueryExtension(disp, screen, "GLX_EXT_fbconfig_packed_float");
extension_flags->GLX_ARB_framebuffer_sRGB = GLXQueryExtension(disp, screen, "GLX_ARB_framebuffer_sRGB") || GLXQueryExtension(disp, screen, "GLX_EXT_framebuffer_sRGB");
extension_flags->GLX_ARB_create_context = GLXQueryExtension(disp, screen, "GLX_ARB_create_context");
extension_flags->GLX_NV_multisample_coverage = GLXQueryExtension(disp, screen, "GLX_NV_multisample_coverage");
extension_flags->GLX_NV_present_video = GLXQueryExtension(disp, screen, "GLX_NV_present_video");
extension_flags->GLX_NV_video_capture = GLXQueryExtension(disp, screen, "GLX_NV_video_capture");

There's nothing special about GLX_NV_multisample_coverage, it's the same code and the same checks later on. Could you post your Display/PixelFormat initialization code?

Re: [BUG] GLX_NV_multisample_coverage not detected correctly?
« Reply #5 on: August 17, 2011, 20:58:01 »
Yep, I've also seen that. I do the Display initialization like this:

  private void init() throws LWJGLException {
    Display.setTitle("My fancy title");
    Display.setVSyncEnabled(enableVsync);
    Display.setDisplayMode(new DisplayMode(Constants.WIDTH, Constants.HEIGHT));
    PixelFormat format = new PixelFormat()
        .withSamples(4)
        .withCoverageSamples(4) // (fails right now)
        .withSRGB(true);
    Display.create(format);
    ....


*

Online spasi

  • *****
  • 2261
    • WebHotelier
Re: [BUG] GLX_NV_multisample_coverage not detected correctly?
« Reply #6 on: August 18, 2011, 17:19:47 »
I suppose it could be not detected correctly because it's reported as a client glx extension?

That was it actually. It looks like glXQueryExtensionsString returns only a subset of the available server & client extensions. Not sure why, but it happens on my system as well.

Try the next nightly, it should be working now. I changed the extension detection code to use both glXQueryServerString and glXGetClientString.

Re: [FIXED] GLX_NV_multisample_coverage not detected correctly?
« Reply #7 on: August 18, 2011, 19:43:58 »
Yay! It works now; or at least, it doesn't crash anymore. I also don't see a difference in the rendered image...