Inertia's picture

Catalyst 9.4

I'm experiencing some problems with Catalyst 9.4 and GL 2.1 contexts created by OpenTK. GL 3.0 contexts work fine, and GL2 contexts created by humus demos work fine aswell. I'm positive that the issue also appears with release builds, problem is not related to debug geterror spam.

The problem is simply very poor performance, 2.5fps in applications that ran over screen refresh rate with Catalyst 9.3. No GL Error is reported, I've attached a log of running the FBO example from OpenTK. Looks ok though.

Is anyone experiencing the same issue? :|

AttachmentSize
Catalyst 9.4 prob.log7.33 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Stencil size is 8bits as expected, the tokens look correct against the specs, DrawFramebuffer vs Framebuffer does not seem to affect anything - I have absolutely no idea where this InvalidEnum is coming from. I'll check on nvidia hardware tomorrow.

Float depth format you say? Worth a try.

Edit: No crash, but didn't work either (the result is all 0). I'll get some sleep and try again tomorrow.

Edit 2: Ok, tested on nvidia hardware. Results: pure depth renderbuffers work flawlessly (both integer and floating point formats). Why am I not surprised?

The InvalidEnum error with depth-stencil formats remains, which indicates an error in my code or in OpenTK. Will investigate further.

martinsm's picture
GL.FramebufferRenderbuffer(FramebufferTarget.Framebuffer,
                           FramebufferAttachment.DepthStencilAttachment,
                           RenderbufferTarget.Renderbuffer, id);

I do not think FramebufferAttachment.DepthStencilAttachment is right way to do it. You need to attach DepthStencil renderbuffer to two attachments - depth and stencil:

GL.FramebufferRenderbuffer(FramebufferTarget.Framebuffer,
                           FramebufferAttachment.DepthAttachment,
                           RenderbufferTarget.Renderbuffer, id);
GL.FramebufferRenderbuffer(FramebufferTarget.Framebuffer,
                           FramebufferAttachment.StencilAttachment,
                           RenderbufferTarget.Renderbuffer, id);

That is at least how I am doing this all the time.
See here: http://www.opengl.org/registry/specs/ARB/framebuffer_object.txt

Quote:

Usage Examples (from packed_depth_stencil)

(1) Attach a DEPTH_STENCIL texture image to an FBO as both the
depth and stencil buffers.
...

the Fiddler's picture

Makes sense. However, page 209 of the specs reads:

Quote:

Setting attachment to the value DEPTH STENCIL ATTACHMENT is a special
case causing both the depth and stencil attachments of the framebuffer object to
be set to texture. texture must have base internal format DEPTH STENCIL, or the
depth and stencil framebuffer attachments will be incomplete (see section 4.4.4).

Which indicates this approach should work. I'll try specifying the attachments separately.