Jump to content
  • Advertisement
Sign in to follow this  
Chris_F

Bindless texture bug?

This topic is 2072 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying out bindless textures and I noticed what I think may be a driver bug, but I am not certain.

 

Basically, if my shader looks like this:

#version 440 core
#extension GL_ARB_bindless_texture : require
 
layout(location = 0) uniform sampler2D texture0;

I get an error saying that sampler handle updates are not allowed if the bindless_sampler qualifier is not set. Fair enough. Change the shader to this and all is well.

#version 440 core
#extension GL_ARB_bindless_texture : require
 
layout(location = 0, bindless_sampler) uniform sampler2D texture0;

However, if I do this:

#version 440 core
 
layout(location = 0) uniform sampler2D texture0;

Then I get no errors and everything works fine, despite the fact that I am still using a bindless handle. The GL code is:

GLuint64 texture_handle = glGetTextureHandleARB(texture);

glMakeTextureHandleResidentARB(texture_handle);

glProgramUniformHandleui64ARB(shader_program, 0, texture_handle);
Edited by Chris_F

Share this post


Link to post
Share on other sites
Advertisement

Undefined behavior is allowed to result in "everything works fine" and is not a driver bug. You can use GL_ARB_debug_output to help find cases of undefined behavior.

 

I am using GL_ARB_debug_output, and that's what I mean by "no error" and "I think this is a 'bug'". Surely debug output should give some kind of warning for this.

Share this post


Link to post
Share on other sites

Short answer is yes, it should tell you about this type of stuff. As my prior post suggested, I expected that so strongly I assumed you must not even be using GL_ARB_debug_output.

 

Unfortunately, it is not technically a bug though. GL_ARB_debug_output only requires information about errors, and undefined behavior may or may not generate an error. All other information reported is optional.

 

Are you using nVidia drivers? I know nVidia is a bit more lax about generating errors, so I'm just curious if that's all this is or if maybe I'm wrong in thinking this is undefined in the first place.

Share this post


Link to post
Share on other sites

Since this is OpenGL 4.4 it means Nvidia is currently the only possibility. This may not technically be a bug, but just the same I am going to report this in hopes that they will improve their debug output.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!