diff options
author | Topi Pohjolainen <topi.pohjolainen@intel.com> | 2015-10-26 14:31:28 +0200 |
---|---|---|
committer | Topi Pohjolainen <topi.pohjolainen@intel.com> | 2015-10-26 14:31:28 +0200 |
commit | 5d7d9c67514894885dae52ef06d1c154bedd7d76 (patch) | |
tree | f41b3162cc4bc3354da64092b4105af1f7b63f8a | |
parent | cd641f59bc5ffde9863b8dc1c684e152790f60d1 (diff) |
Revert "Reject invalid dimensions"
This reverts commit cd641f59bc5ffde9863b8dc1c684e152790f60d1.
-rw-r--r-- | tests/texturing/texsubimage.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/tests/texturing/texsubimage.c b/tests/texturing/texsubimage.c index bb2f2ab50..5d38736da 100644 --- a/tests/texturing/texsubimage.c +++ b/tests/texturing/texsubimage.c @@ -482,23 +482,16 @@ test_format(GLenum target, GLenum intFormat) glDeleteTextures(1, &tex); for (t = 0; t < 10; t++) { - GLint tw = 0; - GLint th = 0; - GLint td = 0; - GLint tx, ty, tz; - /* Choose random region of texture to update. * Use sizes and positions that are multiples of * the compressed block size. */ - while (!tw || (h > 1 && !th) || (d > 1 && !td)) { - tw = (rand() % w) & wMask; - th = (rand() % h) & hMask; - td = (rand() % d) & dMask; - tx = (rand() % (w - tw)) & wMask; - ty = (rand() % (h - th)) & hMask; - tz = (rand() % (d - td)) & dMask; - } + GLint tw = (rand() % w) & wMask; + GLint th = (rand() % h) & hMask; + GLint td = (rand() % d) & dMask; + GLint tx = (rand() % (w - tw)) & wMask; + GLint ty = (rand() % (h - th)) & hMask; + GLint tz = (rand() % (d - td)) & dMask; /* Recreate the original texture */ tex = create_texture(target, intFormat, w, h, d, |