Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: third_party/mesa/MesaLib/src/mesa/main/teximage.c

Issue 7074026: Fix mesa not checking for a valid depth in mesa's _mesa_TexSubImage3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | third_party/mesa/README.chromium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/mesa/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698