mesa icon indicating copy to clipboard operation
mesa copied to clipboard

vc4: Add support for glInvalidateFramebuffer()

Open anholt opened this issue 9 years ago • 4 comments

This would let apps tell us that we can avoid storing the depth/stencil contents, saving memory bandwidth.

anholt avatar Feb 15 '16 21:02 anholt

I'm having issues using glDiscardFramebufferEXT (GLES2), would this be the same issue?

If I try to #define GL_GLEXT_PROTOTYPES it tells me it can't find the symbol, and if I try to declare the function using the symbol (PFNGLDISCARDFRAMEBUFFEREXTPROC) it segfaults.

loganmc10 avatar Jul 05 '16 03:07 loganmc10

No, it's that you can't directly use extensions in GL on Linux. You need to use glXGetProcAddress() / eglGetProcAddress() to get the function pointer. I'd recommend using libepoxy to avoid having to deal with that.

anholt avatar Jul 05 '16 15:07 anholt

Ok thanks, i guess the closed source driver works differently than most, using that driver i could just include gl2ext.h and then use glDiscardFramebufferEXT directly

loganmc10 avatar Jul 05 '16 15:07 loganmc10

Yeah, lots of implementations accidentally expose their functions like this. It's a shame that Khronos has standards saying that GL on Linux shouldn't expose functions like a normal library.

anholt avatar Jul 05 '16 17:07 anholt