Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-mesa: コミット

external/mesa


コミットメタ情報

リビジョン832990c0cebb1db8749d9d935390ffb0079dc924 (tree)
日時2017-09-09 04:58:51
作者Brian Paul <brianp@vmwa...>
コミッターBrian Paul

ログメッセージ

mesa: whitespace, formatting fixes in teximage.c

Reviewed-by: Eric Anholt <eric@anholt.net>

変更サマリ

差分

--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2444,7 +2444,8 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
24442444 _mesa_is_enum_format_unsigned_int(internalFormat) !=
24452445 _mesa_is_enum_format_unsigned_int(rb_internal_format)) {
24462446 _mesa_error(ctx, GL_INVALID_OPERATION,
2447- "glCopyTexImage%dD(signed vs unsigned integer)", dimensions);
2447+ "glCopyTexImage%dD(signed vs unsigned integer)",
2448+ dimensions);
24482449 return GL_TRUE;
24492450 }
24502451 }
@@ -2755,7 +2756,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
27552756 /* see if we've already chosen a format for the previous level */
27562757 if (level > 0) {
27572758 struct gl_texture_image *prevImage =
2758- _mesa_select_tex_image(texObj, target, level - 1);
2759+ _mesa_select_tex_image(texObj, target, level - 1);
27592760 /* See if the prev level is defined and has an internal format which
27602761 * matches the new internal format.
27612762 */
@@ -3025,22 +3026,22 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
30253026 * rarely-tested software fallback rendering.
30263027 */
30273028 if (border && ctx->Const.StripTextureBorder) {
3028- strip_texture_border(target, &width, &height, &depth, unpack,
3029- &unpack_no_border);
3029+ strip_texture_border(target, &width, &height, &depth, unpack,
3030+ &unpack_no_border);
30303031 border = 0;
3031- unpack = &unpack_no_border;
3032+ unpack = &unpack_no_border;
30323033 }
30333034
30343035 if (ctx->NewState & _NEW_PIXEL)
3035- _mesa_update_state(ctx);
3036+ _mesa_update_state(ctx);
30363037
30373038 _mesa_lock_texture(ctx, texObj);
30383039 {
3039- texImage = _mesa_get_tex_image(ctx, texObj, target, level);
3040+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
30403041
3041- if (!texImage) {
3042- _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s%uD", func, dims);
3043- }
3042+ if (!texImage) {
3043+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s%uD", func, dims);
3044+ }
30443045 else {
30453046 ctx->Driver.FreeTextureImageBuffer(ctx, texImage);
30463047
@@ -3071,6 +3072,7 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
30713072 }
30723073 }
30733074
3075+
30743076 /* This is a wrapper around teximage() so that we can force the KHR_no_error
30753077 * logic to be inlined without inlining the function into all the callers.
30763078 */
@@ -3242,7 +3244,7 @@ _mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image)
32423244 ctx->Driver.FreeTextureImageBuffer(ctx, texImage);
32433245
32443246 ctx->Driver.EGLImageTargetTexture2D(ctx, target,
3245- texObj, texImage, image);
3247+ texObj, texImage, image);
32463248
32473249 _mesa_dirty_texobj(ctx, texObj);
32483250 }
@@ -3694,6 +3696,7 @@ get_copy_tex_image_source(struct gl_context *ctx, mesa_format texFormat)
36943696 }
36953697 }
36963698
3699+
36973700 static void
36983701 copytexsubimage_by_slice(struct gl_context *ctx,
36993702 struct gl_texture_image *texImage,
@@ -3724,6 +3727,7 @@ copytexsubimage_by_slice(struct gl_context *ctx,
37243727 }
37253728 }
37263729
3730+
37273731 static GLboolean
37283732 formats_differ_in_component_sizes(mesa_format f1, mesa_format f2)
37293733 {
@@ -3983,8 +3987,8 @@ copyteximage(struct gl_context *ctx, GLuint dims,
39833987 x += border;
39843988 width -= border * 2;
39853989 if (dims == 2) {
3986- y += border;
3987- height -= border * 2;
3990+ y += border;
3991+ height -= border * 2;
39883992 }
39893993 border = 0;
39903994 }
@@ -3994,7 +3998,7 @@ copyteximage(struct gl_context *ctx, GLuint dims,
39943998 texImage = _mesa_get_tex_image(ctx, texObj, target, level);
39953999
39964000 if (!texImage) {
3997- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage%uD", dims);
4001+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage%uD", dims);
39984002 }
39994003 else {
40004004 GLint srcX = x, srcY = y, dstX = 0, dstY = 0, dstZ = 0;
@@ -4041,6 +4045,7 @@ copyteximage_err(struct gl_context *ctx, GLuint dims, GLenum target,
40414045 border, false);
40424046 }
40434047
4048+
40444049 static void
40454050 copyteximage_no_error(struct gl_context *ctx, GLuint dims, GLenum target,
40464051 GLint level, GLenum internalFormat, GLint x, GLint y,
@@ -4063,7 +4068,6 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
40634068 }
40644069
40654070
4066-
40674071 void GLAPIENTRY
40684072 _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
40694073 GLint x, GLint y, GLsizei width, GLsizei height,
@@ -4097,8 +4101,8 @@ _mesa_CopyTexImage2D_no_error(GLenum target, GLint level, GLenum internalFormat,
40974101
40984102
40994103 void GLAPIENTRY
4100-_mesa_CopyTexSubImage1D( GLenum target, GLint level,
4101- GLint xoffset, GLint x, GLint y, GLsizei width )
4104+_mesa_CopyTexSubImage1D(GLenum target, GLint level,
4105+ GLint xoffset, GLint x, GLint y, GLsizei width)
41024106 {
41034107 struct gl_texture_object* texObj;
41044108 const char *self = "glCopyTexSubImage1D";
@@ -4121,10 +4125,11 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
41214125 x, y, width, 1, self);
41224126 }
41234127
4128+
41244129 void GLAPIENTRY
4125-_mesa_CopyTexSubImage2D( GLenum target, GLint level,
4126- GLint xoffset, GLint yoffset,
4127- GLint x, GLint y, GLsizei width, GLsizei height )
4130+_mesa_CopyTexSubImage2D(GLenum target, GLint level,
4131+ GLint xoffset, GLint yoffset,
4132+ GLint x, GLint y, GLsizei width, GLsizei height)
41284133 {
41294134 struct gl_texture_object* texObj;
41304135 const char *self = "glCopyTexSubImage2D";
@@ -4148,11 +4153,10 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
41484153 }
41494154
41504155
4151-
41524156 void GLAPIENTRY
4153-_mesa_CopyTexSubImage3D( GLenum target, GLint level,
4154- GLint xoffset, GLint yoffset, GLint zoffset,
4155- GLint x, GLint y, GLsizei width, GLsizei height )
4157+_mesa_CopyTexSubImage3D(GLenum target, GLint level,
4158+ GLint xoffset, GLint yoffset, GLint zoffset,
4159+ GLint x, GLint y, GLsizei width, GLsizei height)
41564160 {
41574161 struct gl_texture_object* texObj;
41584162 const char *self = "glCopyTexSubImage3D";
@@ -4175,6 +4179,7 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
41754179 zoffset, x, y, width, height, self);
41764180 }
41774181
4182+
41784183 void GLAPIENTRY
41794184 _mesa_CopyTextureSubImage1D(GLuint texture, GLint level,
41804185 GLint xoffset, GLint x, GLint y, GLsizei width)
@@ -4198,6 +4203,7 @@ _mesa_CopyTextureSubImage1D(GLuint texture, GLint level,
41984203 0, x, y, width, 1, self);
41994204 }
42004205
4206+
42014207 void GLAPIENTRY
42024208 _mesa_CopyTextureSubImage2D(GLuint texture, GLint level,
42034209 GLint xoffset, GLint yoffset,
@@ -4223,7 +4229,6 @@ _mesa_CopyTextureSubImage2D(GLuint texture, GLint level,
42234229 }
42244230
42254231
4226-
42274232 void GLAPIENTRY
42284233 _mesa_CopyTextureSubImage3D(GLuint texture, GLint level,
42294234 GLint xoffset, GLint yoffset, GLint zoffset,
@@ -4268,6 +4273,7 @@ _mesa_CopyTexSubImage1D_no_error(GLenum target, GLint level, GLint xoffset,
42684273 x, y, width, 1);
42694274 }
42704275
4276+
42714277 void GLAPIENTRY
42724278 _mesa_CopyTexSubImage2D_no_error(GLenum target, GLint level, GLint xoffset,
42734279 GLint yoffset, GLint x, GLint y, GLsizei width,
@@ -4280,6 +4286,7 @@ _mesa_CopyTexSubImage2D_no_error(GLenum target, GLint level, GLint xoffset,
42804286 yoffset, 0, x, y, width, height);
42814287 }
42824288
4289+
42834290 void GLAPIENTRY
42844291 _mesa_CopyTexSubImage3D_no_error(GLenum target, GLint level, GLint xoffset,
42854292 GLint yoffset, GLint zoffset, GLint x, GLint y,
@@ -4292,6 +4299,7 @@ _mesa_CopyTexSubImage3D_no_error(GLenum target, GLint level, GLint xoffset,
42924299 yoffset, zoffset, x, y, width, height);
42934300 }
42944301
4302+
42954303 void GLAPIENTRY
42964304 _mesa_CopyTextureSubImage1D_no_error(GLuint texture, GLint level, GLint xoffset,
42974305 GLint x, GLint y, GLsizei width)
@@ -4303,6 +4311,7 @@ _mesa_CopyTextureSubImage1D_no_error(GLuint texture, GLint level, GLint xoffset,
43034311 xoffset, 0, 0, x, y, width, 1);
43044312 }
43054313
4314+
43064315 void GLAPIENTRY
43074316 _mesa_CopyTextureSubImage2D_no_error(GLuint texture, GLint level, GLint xoffset,
43084317 GLint yoffset, GLint x, GLint y,
@@ -4315,6 +4324,7 @@ _mesa_CopyTextureSubImage2D_no_error(GLuint texture, GLint level, GLint xoffset,
43154324 xoffset, yoffset, 0, x, y, width, height);
43164325 }
43174326
4327+
43184328 void GLAPIENTRY
43194329 _mesa_CopyTextureSubImage3D_no_error(GLuint texture, GLint level, GLint xoffset,
43204330 GLint yoffset, GLint zoffset, GLint x,
@@ -4410,6 +4420,7 @@ check_clear_tex_image(struct gl_context *ctx,
44104420 return true;
44114421 }
44124422
4423+
44134424 static struct gl_texture_object *
44144425 get_tex_obj_for_clear(struct gl_context *ctx,
44154426 const char *function,
@@ -4473,11 +4484,12 @@ get_tex_images_for_clear(struct gl_context *ctx,
44734484 return numFaces;
44744485 }
44754486
4487+
44764488 void GLAPIENTRY
4477-_mesa_ClearTexSubImage( GLuint texture, GLint level,
4478- GLint xoffset, GLint yoffset, GLint zoffset,
4479- GLsizei width, GLsizei height, GLsizei depth,
4480- GLenum format, GLenum type, const void *data )
4489+_mesa_ClearTexSubImage(GLuint texture, GLint level,
4490+ GLint xoffset, GLint yoffset, GLint zoffset,
4491+ GLsizei width, GLsizei height, GLsizei depth,
4492+ GLenum format, GLenum type, const void *data)
44814493 {
44824494 GET_CURRENT_CONTEXT(ctx);
44834495 struct gl_texture_object *texObj;
@@ -4522,8 +4534,7 @@ _mesa_ClearTexSubImage( GLuint texture, GLint level,
45224534 }
45234535
45244536 if (numImages == 1) {
4525- if (check_clear_tex_image(ctx, "glClearTexSubImage",
4526- texImages[0],
4537+ if (check_clear_tex_image(ctx, "glClearTexSubImage", texImages[0],
45274538 format, type, data, clearValue[0])) {
45284539 ctx->Driver.ClearTexSubImage(ctx,
45294540 texImages[0],
@@ -4535,8 +4546,7 @@ _mesa_ClearTexSubImage( GLuint texture, GLint level,
45354546 /* loop over cube face images */
45364547 for (i = zoffset; i < zoffset + depth; i++) {
45374548 assert(i < MAX_FACES);
4538- if (!check_clear_tex_image(ctx, "glClearTexSubImage",
4539- texImages[i],
4549+ if (!check_clear_tex_image(ctx, "glClearTexSubImage", texImages[i],
45404550 format, type, data, clearValue[i]))
45414551 goto out;
45424552 }
@@ -4553,6 +4563,7 @@ _mesa_ClearTexSubImage( GLuint texture, GLint level,
45534563 _mesa_unlock_texture(ctx, texObj);
45544564 }
45554565
4566+
45564567 void GLAPIENTRY
45574568 _mesa_ClearTexImage( GLuint texture, GLint level,
45584569 GLenum format, GLenum type, const void *data )
@@ -4574,10 +4585,8 @@ _mesa_ClearTexImage( GLuint texture, GLint level,
45744585 texObj, level, texImages);
45754586
45764587 for (i = 0; i < numImages; i++) {
4577- if (!check_clear_tex_image(ctx, "glClearTexImage",
4578- texImages[i],
4579- format, type, data,
4580- clearValue[i]))
4588+ if (!check_clear_tex_image(ctx, "glClearTexImage", texImages[i], format,
4589+ type, data, clearValue[i]))
45814590 goto out;
45824591 }
45834592
@@ -4733,15 +4742,12 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims,
47334742
47344743 /* this will catch any invalid compressed format token */
47354744 if (!_mesa_is_compressed_format(ctx, format)) {
4736- _mesa_error(ctx, GL_INVALID_ENUM,
4737- "%s(format)", callerName);
4745+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(format)", callerName);
47384746 return GL_TRUE;
47394747 }
47404748
47414749 if (level < 0 || level >= _mesa_max_texture_levels(ctx, target)) {
4742- _mesa_error(ctx, GL_INVALID_VALUE,
4743- "%s(level=%d)",
4744- callerName, level);
4750+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(level=%d)", callerName, level);
47454751 return GL_TRUE;
47464752 }
47474753
@@ -4759,9 +4765,7 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims,
47594765
47604766 expectedSize = compressed_tex_size(width, height, depth, format);
47614767 if (expectedSize != imageSize) {
4762- _mesa_error(ctx, GL_INVALID_VALUE,
4763- "%s(size=%d)",
4764- callerName, imageSize);
4768+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(size=%d)", callerName, imageSize);
47654769 return GL_TRUE;
47664770 }
47674771
@@ -4773,28 +4777,24 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims,
47734777 }
47744778
47754779 if ((GLint) format != texImage->InternalFormat) {
4776- _mesa_error(ctx, GL_INVALID_OPERATION,
4777- "%s(format=%s)",
4780+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(format=%s)",
47784781 callerName, _mesa_enum_to_string(format));
47794782 return GL_TRUE;
47804783 }
47814784
47824785 if (compressedteximage_only_format(ctx, format)) {
4783- _mesa_error(ctx, GL_INVALID_OPERATION,
4784- "%s(format=%s cannot be updated)",
4786+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(format=%s cannot be updated)",
47854787 callerName, _mesa_enum_to_string(format));
47864788 return GL_TRUE;
47874789 }
47884790
4789- if (error_check_subtexture_negative_dimensions(ctx, dims,
4790- width, height, depth,
4791- callerName)) {
4791+ if (error_check_subtexture_negative_dimensions(ctx, dims, width, height,
4792+ depth, callerName)) {
47924793 return GL_TRUE;
47934794 }
47944795
4795- if (error_check_subtexture_dimensions(ctx, dims,
4796- texImage, xoffset, yoffset, zoffset,
4797- width, height, depth,
4796+ if (error_check_subtexture_dimensions(ctx, dims, texImage, xoffset, yoffset,
4797+ zoffset, width, height, depth,
47984798 callerName)) {
47994799 return GL_TRUE;
48004800 }
旧リポジトリブラウザで表示