radeonsi: tell LLVM not to remove s_barrier instructions
[mesa.git] / src / gallium / drivers / llvmpipe / lp_surface.c
index 643c4162b036ff542c997e41e54fa76aed98ffb3..953b26e8cdbab4ad858e5d1cc8e6c4a0788325d2 100644 (file)
@@ -195,7 +195,7 @@ llvmpipe_clear_render_target(struct pipe_context *pipe,
 {
    struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
 
-   if (!llvmpipe_check_render_cond(llvmpipe))
+   if (render_condition_enabled && !llvmpipe_check_render_cond(llvmpipe))
       return;
 
    util_clear_render_target(pipe, dst, color,
@@ -215,7 +215,7 @@ llvmpipe_clear_depth_stencil(struct pipe_context *pipe,
 {
    struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
 
-   if (!llvmpipe_check_render_cond(llvmpipe))
+   if (render_condition_enabled && !llvmpipe_check_render_cond(llvmpipe))
       return;
 
    util_clear_depth_stencil(pipe, dst, clear_flags,
@@ -231,7 +231,8 @@ llvmpipe_init_surface_functions(struct llvmpipe_context *lp)
    lp->pipe.clear_depth_stencil = llvmpipe_clear_depth_stencil;
    lp->pipe.create_surface = llvmpipe_create_surface;
    lp->pipe.surface_destroy = llvmpipe_surface_destroy;
-   /* These two are not actually functions dealing with surfaces */
+   /* These are not actually functions dealing with surfaces */
+   lp->pipe.clear_texture = util_clear_texture;
    lp->pipe.resource_copy_region = lp_resource_copy;
    lp->pipe.blit = lp_blit;
    lp->pipe.flush_resource = lp_flush_resource;