Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / gallium / drivers / softpipe / sp_quad_depth_test.c
index 4cce9e9bc127e5b957951f1ef898ee8e89021f97..e8433814c34edd349b0480e6518f894eb892975a 100644 (file)
@@ -31,7 +31,7 @@
  */
 
 #include "pipe/p_defines.h"
-#include "util/u_format.h"
+#include "util/format/u_format.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 #include "tgsi/tgsi_scan.h"
@@ -782,7 +782,7 @@ depth_test_quads_fallback(struct quad_stage *qs,
 {
    unsigned i, pass = 0;
    const struct tgsi_shader_info *fsInfo = &qs->softpipe->fs_variant->info;
-   boolean interp_depth = !fsInfo->writes_z;
+   boolean interp_depth = !fsInfo->writes_z || qs->softpipe->early_depth;
    boolean shader_stencil_ref = fsInfo->writes_stencil;
    struct depth_data data;
    unsigned vp_idx = quads[0]->input.viewport_index;
@@ -803,7 +803,7 @@ depth_test_quads_fallback(struct quad_stage *qs,
       data.tile = sp_get_cached_tile(qs->softpipe->zsbuf_cache, 
                                      quads[0]->input.x0, 
                                      quads[0]->input.y0, quads[0]->input.layer);
-      data.clamp = !qs->softpipe->rasterizer->depth_clip;
+      data.clamp = !qs->softpipe->rasterizer->depth_clip_near;
 
       near_val = qs->softpipe->viewports[vp_idx].translate[2] - qs->softpipe->viewports[vp_idx].scale[2];
       far_val = near_val + (qs->softpipe->viewports[vp_idx].scale[2] * 2.0);
@@ -902,7 +902,7 @@ choose_depth_test(struct quad_stage *qs,
 {
    const struct tgsi_shader_info *fsInfo = &qs->softpipe->fs_variant->info;
 
-   boolean interp_depth = !fsInfo->writes_z;
+   boolean interp_depth = !fsInfo->writes_z || qs->softpipe->early_depth;
 
    boolean alpha = qs->softpipe->depth_stencil->alpha.enabled;
 
@@ -916,7 +916,7 @@ choose_depth_test(struct quad_stage *qs,
 
    boolean occlusion = qs->softpipe->active_query_count;
 
-   boolean clipped = !qs->softpipe->rasterizer->depth_clip;
+   boolean clipped = !qs->softpipe->rasterizer->depth_clip_near;
 
    if(!qs->softpipe->framebuffer.zsbuf)
       depth = depthwrite = stencil = FALSE;