Index: third_party/mesa/MesaLib/src/mesa/main/teximage.c |
diff --git a/third_party/mesa/MesaLib/src/mesa/main/teximage.c b/third_party/mesa/MesaLib/src/mesa/main/teximage.c |
index ca1bd6096e272fa57c9e74a05f5411d3c57bd4d8..ee663e499344fe23bc547292c2ab688dff886109 100644 |
--- a/third_party/mesa/MesaLib/src/mesa/main/teximage.c |
+++ b/third_party/mesa/MesaLib/src/mesa/main/teximage.c |
@@ -2798,7 +2798,7 @@ _mesa_TexSubImage3D( GLenum target, GLint level, |
format, type, texImage)) { |
/* error was recorded */ |
} |
- else if (width > 0 && height > 0 && height > 0) { |
+ else if (width > 0 && height > 0 && depth > 0) { |
/* If we have a border, xoffset=-1 is legal. Bias by border width */ |
xoffset += texImage->Border; |
yoffset += texImage->Border; |