OLD | NEW |
1 /* | 1 /* |
2 * mesa 3-D graphics library | 2 * mesa 3-D graphics library |
3 * Version: 7.6 | 3 * Version: 7.6 |
4 * | 4 * |
5 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. | 5 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. |
6 * Copyright (C) 2009 VMware, Inc. All Rights Reserved. | 6 * Copyright (C) 2009 VMware, Inc. All Rights Reserved. |
7 * | 7 * |
8 * Permission is hereby granted, free of charge, to any person obtaining a | 8 * Permission is hereby granted, free of charge, to any person obtaining a |
9 * copy of this software and associated documentation files (the "Software"), | 9 * copy of this software and associated documentation files (the "Software"), |
10 * to deal in the Software without restriction, including without limitation | 10 * to deal in the Software without restriction, including without limitation |
(...skipping 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2791 _mesa_lock_texture(ctx, texObj); | 2791 _mesa_lock_texture(ctx, texObj); |
2792 { | 2792 { |
2793 texImage = _mesa_select_tex_image(ctx, texObj, target, level); | 2793 texImage = _mesa_select_tex_image(ctx, texObj, target, level); |
2794 | 2794 |
2795 if (subtexture_error_check2(ctx, 3, target, level, | 2795 if (subtexture_error_check2(ctx, 3, target, level, |
2796 xoffset, yoffset, zoffset, | 2796 xoffset, yoffset, zoffset, |
2797 width, height, depth, | 2797 width, height, depth, |
2798 format, type, texImage)) { | 2798 format, type, texImage)) { |
2799 /* error was recorded */ | 2799 /* error was recorded */ |
2800 } | 2800 } |
2801 else if (width > 0 && height > 0 && height > 0) { | 2801 else if (width > 0 && height > 0 && depth > 0) { |
2802 /* If we have a border, xoffset=-1 is legal. Bias by border width */ | 2802 /* If we have a border, xoffset=-1 is legal. Bias by border width */ |
2803 xoffset += texImage->Border; | 2803 xoffset += texImage->Border; |
2804 yoffset += texImage->Border; | 2804 yoffset += texImage->Border; |
2805 zoffset += texImage->Border; | 2805 zoffset += texImage->Border; |
2806 | 2806 |
2807 ASSERT(ctx->Driver.TexSubImage3D); | 2807 ASSERT(ctx->Driver.TexSubImage3D); |
2808 ctx->Driver.TexSubImage3D(ctx, target, level, | 2808 ctx->Driver.TexSubImage3D(ctx, target, level, |
2809 xoffset, yoffset, zoffset, | 2809 xoffset, yoffset, zoffset, |
2810 width, height, depth, | 2810 width, height, depth, |
2811 format, type, pixels, | 2811 format, type, pixels, |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3875 _mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, | 3875 _mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, |
3876 GLint yoffset, GLint zoffset, GLsizei width, | 3876 GLint yoffset, GLint zoffset, GLsizei width, |
3877 GLsizei height, GLsizei depth, GLenum format, | 3877 GLsizei height, GLsizei depth, GLenum format, |
3878 GLsizei imageSize, const GLvoid *data) | 3878 GLsizei imageSize, const GLvoid *data) |
3879 { | 3879 { |
3880 compressed_tex_sub_image(3, target, level, xoffset, yoffset, zoffset, | 3880 compressed_tex_sub_image(3, target, level, xoffset, yoffset, zoffset, |
3881 width, height, depth, format, imageSize, data); | 3881 width, height, depth, format, imageSize, data); |
3882 } | 3882 } |
3883 | 3883 |
3884 | 3884 |
OLD | NEW |