ac: fix the return value in cull_bbox when bbox culling is disabled
authorMarek Olšák <marek.olsak@amd.com>
Thu, 12 Dec 2019 22:01:39 +0000 (17:01 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 16 Dec 2019 20:06:07 +0000 (20:06 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095>

src/amd/llvm/ac_llvm_cull.c

index 1c2da3e041849ea4ad6838e68992bc5954b6e655..9e8409fdbaf4a4f020de6974939b548496b39716 100644 (file)
@@ -136,7 +136,7 @@ static LLVMValueRef cull_bbox(struct ac_llvm_context *ctx,
        LLVMBuilderRef builder = ctx->builder;
 
        if (!cull_view_xy && !cull_view_near_z && !cull_view_far_z && !cull_small_prims)
-               return ctx->i1true;
+               return initially_accepted;
 
        /* Skip the culling if the primitive has already been rejected or
         * if any W is negative. The bounding box culling doesn't work when