OSDN Git Service

added assertion to check that texture width is non-zero
authorBrian <brian.paul@tungstengraphics.com>
Mon, 13 Aug 2007 22:18:32 +0000 (16:18 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 14 Aug 2007 00:20:04 +0000 (18:20 -0600)
src/mesa/pipe/softpipe/sp_tex_sample.c

index 40350ee..fb4f793 100644 (file)
@@ -489,6 +489,8 @@ sp_get_sample_2d(struct tgsi_sampler *sampler,
 
    level0 = choose_mipmap_level(sampler, lambda);
 
+   assert(sampler->texture->level[level0].width);
+
    switch (filter) {
    case PIPE_TEX_FILTER_NEAREST:
       {