[NV310.33] clear textures

Hey guys,

sorry about posting potential bugs in this forum, but the nvidia developer forums still seem to have problems.
The following code worked with prev. drivers, but I get an error now (“GL_INVALID_OPERATION error generated. Texture 0 is base level inconsistent. Check texture size.” - card: nv560ti):

GLuint texid;
GLuint fbid;
float color[] = {0,0,0,0};

glGenTextures(1, &texid);
glTextureStorage2DEXT(texid, GL_TEXTURE_2D, 1, GL_RGBA16F, 128, 128);
glGenFramebuffers(1, &fbid);
glFramebufferDrawBufferEXT(fbid, GL_COLOR_ATTACHMENT0);
glNamedFramebufferTextureEXT(fbid, GL_COLOR_ATTACHMENT0, texid, 0);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbid);
glClearBufferfv(GL_COLOR, 0, &color[0]);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);

Am I missing something or is it a bug?

Thanks for feedback,

If Texture 0 is referring to the name 0 it’s no wonder you get an error since the default object is not allowed. What’s the value of texid after glGenTextures()?

ok, I guessed this, but it kind of seemed unreal.
A quick update: texid has a proper id different from 0, i.e., the texture was created.
It’s also not because of DSA, without, I get the same error.
However, using the old glClearColor works. -> For some reason, the clearbuffer doesn’t notice that there is a texture at drawbuffer 0.

The thing is, glClearBuffer doesn’t generate an INVALID_OPERATION. I’d check the inputs to the texture commands and compare them to the allowed values according to the extension.

well, the really odd things are:

  • the same code worked before with a couple of drivers
  • I cannot imaging any simpler gl code fragment
  • adding some rendering before (without glclearbuffer) works as it did with the other drivers

I am using ARB_debug_output to catch the errors, I therefore guess, I am not missing any error before this one.

Well, if your code is by all means correct I suppose it might be a driver bug. If you can, test it on different hardware and see if it works on Intel and/or AMD hardware (if the ext. is supported by AMD). This should give you enough info.

Well, I am not claiming to have bug-free code. However, I posted the super short and simple example and was hoping that someone gives me a hint, if I am missing something.
I do not have other hardware at hand and I was hoping to get feedback from the nvidia guys, like “nope, works for us” or “indeed, there is something wrong”.

You can ignore the “GL_INVALID_OPERATION error generated” part of the debug output message. This is a bug in the driver and this message was given the wrong debug type and debug category by mistake. In this case there was no glError generated and, despite the scary debug message, your app will continue to function fine. We’ll try to get the debug message fixed soon.

oh, ok, thanks.
I also get an GL_INVALID_VALUE (+ base level inconsistent…) when rendering.
However, I also have other, more random hangs, that I could not yet track down, which is why I thought that this error message has more impact.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.