/**
* Set *ptr to point to fb, with refcounting and locking.
+ * This is normally only called from the _mesa_reference_framebuffer() macro
+ * when there's a real pointer change.
*/
void
-_mesa_reference_framebuffer(struct gl_framebuffer **ptr,
- struct gl_framebuffer *fb)
+_mesa_reference_framebuffer_(struct gl_framebuffer **ptr,
+ struct gl_framebuffer *fb)
{
- assert(ptr);
- if (*ptr == fb) {
- /* no change */
- return;
- }
-
if (*ptr) {
/* unreference old renderbuffer */
GLboolean deleteFlag = GL_FALSE;
fb->Visual.rgbBits = fb->Visual.redBits
+ fb->Visual.greenBits + fb->Visual.blueBits;
fb->Visual.samples = rb->NumSamples;
+ fb->Visual.sampleBuffers = rb->NumSamples > 0 ? 1 : 0;
if (_mesa_get_format_color_encoding(fmt) == GL_SRGB)
fb->Visual.sRGBCapable = ctx->Const.sRGBCapable;
break;
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT:
- case GL_COLOR_INDEX:
case GL_RED_INTEGER_EXT:
case GL_GREEN_INTEGER_EXT:
case GL_BLUE_INTEGER_EXT:
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT:
- case GL_COLOR_INDEX:
case GL_RED_INTEGER_EXT:
case GL_GREEN_INTEGER_EXT:
case GL_BLUE_INTEGER_EXT: