[Mesa-dev] Making ext_framebuffer_multisample-accuracy run on non-i965 drivers

Ilia Mirkin imirkin at alum.mit.edu
Wed Sep 9 12:24:58 PDT 2015


Both st/mesa and the NVIDIA fail framebuffer completeness on this
command sequence:

270 glRenderbufferStorageMultisample(target = GL_RENDERBUFFER, samples
= 0, internalformat = GL_RGBA, width = 256, height = 256)
272 glFramebufferRenderbuffer(target = GL_DRAW_FRAMEBUFFER, attachment
= GL_COLOR_ATTACHMENT0, renderbuffertarget = GL_RENDERBUFFER,
renderbuffer = 1)
273 glBindRenderbuffer(target = GL_RENDERBUFFER, renderbuffer = 10)
274 glRenderbufferStorageMultisample(target = GL_RENDERBUFFER, samples
= 0, internalformat = GL_STENCIL_INDEX8, width = 256, height = 256)
275 glFramebufferRenderbuffer(target = GL_DRAW_FRAMEBUFFER, attachment
= GL_STENCIL_ATTACHMENT, renderbuffertarget = GL_RENDERBUFFER,
renderbuffer = 10)
276 glBindRenderbuffer(target = GL_RENDERBUFFER, renderbuffer = 9)
277 glRenderbufferStorageMultisample(target = GL_RENDERBUFFER, samples
= 0, internalformat = GL_DEPTH_COMPONENT24, width = 256, height = 256)
278 glFramebufferRenderbuffer(target = GL_DRAW_FRAMEBUFFER, attachment
= GL_DEPTH_ATTACHMENT, renderbuffertarget = GL_RENDERBUFFER,
renderbuffer = 9)
279 glCheckFramebufferStatus(target = GL_DRAW_FRAMEBUFFER) =
GL_FRAMEBUFFER_UNSUPPORTED

This is because (in the case of st/mesa), the depth and stencil
backing textures are different, which is not something that the
gallium API allows (nor does NVIDIA hardware handle).

For textures this is handled by merging attachment points when the
textures are identical, but this is harder to do with renderbuffers
since they're allocated implicitly, and can be attached/detached
individually.

I'm not sure that there's a clean way to fix this. I think that the
piglit should be fixed instead to not do this. However I know these
sorts of suggestions are often frowned upon, so I'm asking here.

  -ilia


More information about the mesa-dev mailing list