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 40350eec750671240315bbce4dbc5b74f414cb85..fb4f7930ac5de6edcadef8e02204db70f771a6a1 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:
       {