[g3dvl] remove invalid use of assert
authorChristian König <deathsimple@vodafone.de>
Tue, 23 Nov 2010 21:43:29 +0000 (22:43 +0100)
committerChristian König <deathsimple@vodafone.de>
Tue, 23 Nov 2010 21:43:29 +0000 (22:43 +0100)
src/gallium/auxiliary/vl/vl_idct.c
src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c

index d6f065750f012f12a2c145ae0afa3d960a8b0af0..1cc4c470ae54d775b5afe437a771d98c773b86a1 100644 (file)
@@ -338,10 +338,10 @@ xfer_buffers_unmap(struct vl_idct *idct)
 static bool
 init_shaders(struct vl_idct *idct)
 {
-   assert(idct->vs = create_vert_shader(idct));
-   assert(idct->transpose_fs = create_transpose_frag_shader(idct));
-   assert(idct->matrix_fs = create_matrix_frag_shader(idct));
-   assert(idct->eb_fs = create_empty_block_frag_shader(idct));
+   idct->vs = create_vert_shader(idct);
+   idct->transpose_fs = create_transpose_frag_shader(idct);
+   idct->matrix_fs = create_matrix_frag_shader(idct);
+   idct->eb_fs = create_empty_block_frag_shader(idct);
 
    return 
       idct->vs != NULL &&
index 32728413700aab63d4c6c21a514ea1e5e64c4ff5..8099929b8b0525cf8af29489f1efff76172160d0 100644 (file)
@@ -599,20 +599,30 @@ init_shaders(struct vl_mpeg12_mc_renderer *r)
 {
    assert(r);
 
-   assert(r->i_vs = create_vert_shader(r, 0, 0));
-   assert(r->i_fs = create_intra_frag_shader(r));
+   r->i_vs = create_vert_shader(r, 0, 0);
+   r->i_fs = create_intra_frag_shader(r);
    
-   assert(r->p_vs[0] = create_vert_shader(r, 1, 1));
-   assert(r->p_vs[1] = create_vert_shader(r, 1, 2));
-   assert(r->p_fs[0] = create_frame_pred_frag_shader(r));
-   assert(r->p_fs[1] = create_field_pred_frag_shader(r));
-
-   assert(r->b_vs[0] = create_vert_shader(r, 2, 1));
-   assert(r->b_vs[1] = create_vert_shader(r, 2, 2));
-   assert(r->b_fs[0] = create_frame_bi_pred_frag_shader(r));
-   assert(r->b_fs[1] = create_field_bi_pred_frag_shader(r));
-
-   return true;
+   r->p_vs[0] = create_vert_shader(r, 1, 1);
+   r->p_vs[1] = create_vert_shader(r, 1, 2);
+   r->p_fs[0] = create_frame_pred_frag_shader(r);
+   r->p_fs[1] = create_field_pred_frag_shader(r);
+
+   r->b_vs[0] = create_vert_shader(r, 2, 1);
+   r->b_vs[1] = create_vert_shader(r, 2, 2);
+   r->b_fs[0] = create_frame_bi_pred_frag_shader(r);
+   r->b_fs[1] = create_field_bi_pred_frag_shader(r);
+
+   return
+      r->i_vs != NULL &&
+      r->i_fs != NULL &&
+      r->p_vs[0] != NULL &&
+      r->p_vs[1] != NULL &&
+      r->p_fs[0] != NULL &&
+      r->p_fs[1] != NULL &&
+      r->b_vs[0] != NULL &&
+      r->b_vs[1] != NULL &&
+      r->b_fs[0] != NULL &&
+      r->b_fs[1] != NULL;
 }
 
 static void