ilo: construct depth/stencil command in create_surface()
[mesa.git] / src / gallium / drivers / ilo / ilo_state.c
index 3210bb4bf331860caefccd033d38be06f9861ebc..ba0efdd09ce805fd96cde0c11727cd9ab80f500c 100644 (file)
@@ -952,7 +952,11 @@ ilo_create_surface(struct pipe_context *pipe,
    else {
       assert(res->target != PIPE_BUFFER);
 
-      /* will construct dynamically */
+      ilo_gpe_init_zs_surface(ilo->dev, ilo_texture(res),
+            templ->format, templ->u.tex.level,
+            templ->u.tex.first_layer,
+            templ->u.tex.last_layer - templ->u.tex.first_layer + 1,
+            &surf->u.zs);
    }
 
    return &surf->base;
@@ -1133,6 +1137,9 @@ ilo_init_states(struct ilo_context *ilo)
 {
    ilo_gpe_set_scissor_null(ilo->dev, &ilo->scissor);
 
+   ilo_gpe_init_zs_surface(ilo->dev, NULL,
+         PIPE_FORMAT_NONE, 0, 0, 1, &ilo->fb.null_zs);
+
    ilo->dirty = ILO_DIRTY_ALL;
 }