mesa: whitespace and comment fixes in fbobject.c

This commit is contained in:
Brian Paul
2011-12-16 08:44:43 -07:00
parent 2b3fdb1fae
commit 45bd5c43ca

View File

@@ -819,7 +819,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
fbo_incomplete("width or height mismatch", -1); fbo_incomplete("width or height mismatch", -1);
return; return;
} }
/* check that all color buffer have same format */ /* check that all color buffers are the same format */
if (intFormat != GL_NONE && f != intFormat) { if (intFormat != GL_NONE && f != intFormat) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT; fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
fbo_incomplete("format mismatch", -1); fbo_incomplete("format mismatch", -1);
@@ -831,8 +831,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE; fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE;
fbo_incomplete("inconsistant number of samples", i); fbo_incomplete("inconsistant number of samples", i);
return; return;
} }
} }
} }
@@ -1273,7 +1272,7 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_RG32I: case GL_RG32I:
return ctx->Extensions.ARB_texture_rg && return ctx->Extensions.ARB_texture_rg &&
ctx->Extensions.EXT_texture_integer ? GL_RG : 0; ctx->Extensions.EXT_texture_integer ? GL_RG : 0;
case GL_INTENSITY8I_EXT: case GL_INTENSITY8I_EXT:
case GL_INTENSITY8UI_EXT: case GL_INTENSITY8UI_EXT:
case GL_INTENSITY16I_EXT: case GL_INTENSITY16I_EXT:
@@ -1820,7 +1819,7 @@ _mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
/* bind default */ /* bind default */
ASSERT(fb->RefCount >= 2); ASSERT(fb->RefCount >= 2);
_mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
} }
} }
/* remove from hash table immediately, to free the ID */ /* remove from hash table immediately, to free the ID */
@@ -1897,6 +1896,7 @@ _mesa_CheckFramebufferStatusEXT(GLenum target)
return buffer->_Status; return buffer->_Status;
} }
/** /**
* Replicate the src attachment point. Used by framebuffer_texture() when * Replicate the src attachment point. Used by framebuffer_texture() when
* the same texture is attached at GL_DEPTH_ATTACHMENT and * the same texture is attached at GL_DEPTH_ATTACHMENT and
@@ -1911,7 +1911,7 @@ reuse_framebuffer_texture_attachment(struct gl_framebuffer *fb,
struct gl_renderbuffer_attachment *src_att = &fb->Attachment[src]; struct gl_renderbuffer_attachment *src_att = &fb->Attachment[src];
assert(src_att->Texture != NULL); assert(src_att->Texture != NULL);
assert (src_att->Renderbuffer != NULL); assert(src_att->Renderbuffer != NULL);
_mesa_reference_texobj(&dst_att->Texture, src_att->Texture); _mesa_reference_texobj(&dst_att->Texture, src_att->Texture);
_mesa_reference_renderbuffer(&dst_att->Renderbuffer, src_att->Renderbuffer); _mesa_reference_renderbuffer(&dst_att->Renderbuffer, src_att->Renderbuffer);
@@ -1921,6 +1921,7 @@ reuse_framebuffer_texture_attachment(struct gl_framebuffer *fb,
dst_att->Zoffset = src_att->Zoffset; dst_att->Zoffset = src_att->Zoffset;
} }
/** /**
* Common code called by glFramebufferTexture1D/2D/3DEXT(). * Common code called by glFramebufferTexture1D/2D/3DEXT().
*/ */
@@ -1949,7 +1950,6 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
return; return;
} }
/* The textarget, level, and zoffset parameters are only validated if /* The textarget, level, and zoffset parameters are only validated if
* texture is non-zero. * texture is non-zero.
*/ */
@@ -2002,7 +2002,7 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
} }
} }
if ((level < 0) || if ((level < 0) ||
(level >= _mesa_max_texture_levels(ctx, texObj->Target))) { (level >= _mesa_max_texture_levels(ctx, texObj->Target))) {
_mesa_error(ctx, GL_INVALID_VALUE, _mesa_error(ctx, GL_INVALID_VALUE,
"glFramebufferTexture%sEXT(level)", caller); "glFramebufferTexture%sEXT(level)", caller);
@@ -2031,7 +2031,7 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
reuse_framebuffer_texture_attachment(fb, BUFFER_DEPTH, reuse_framebuffer_texture_attachment(fb, BUFFER_DEPTH,
BUFFER_STENCIL); BUFFER_STENCIL);
} else if (attachment == GL_STENCIL_ATTACHMENT && } else if (attachment == GL_STENCIL_ATTACHMENT &&
texObj== fb->Attachment[BUFFER_DEPTH].Texture) { texObj == fb->Attachment[BUFFER_DEPTH].Texture) {
/* As above, but with depth and stencil juxtasposed. */ /* As above, but with depth and stencil juxtasposed. */
reuse_framebuffer_texture_attachment(fb, BUFFER_STENCIL, reuse_framebuffer_texture_attachment(fb, BUFFER_STENCIL,
BUFFER_DEPTH); BUFFER_DEPTH);
@@ -2797,6 +2797,7 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
} }
#endif /* FEATURE_EXT_framebuffer_blit */ #endif /* FEATURE_EXT_framebuffer_blit */
#if FEATURE_ARB_geometry_shader4 #if FEATURE_ARB_geometry_shader4
void GLAPIENTRY void GLAPIENTRY
_mesa_FramebufferTextureARB(GLenum target, GLenum attachment, _mesa_FramebufferTextureARB(GLenum target, GLenum attachment,
@@ -2808,6 +2809,7 @@ _mesa_FramebufferTextureARB(GLenum target, GLenum attachment,
"not implemented!"); "not implemented!");
} }
void GLAPIENTRY void GLAPIENTRY
_mesa_FramebufferTextureFaceARB(GLenum target, GLenum attachment, _mesa_FramebufferTextureFaceARB(GLenum target, GLenum attachment,
GLuint texture, GLint level, GLenum face) GLuint texture, GLint level, GLenum face)