Path: blob/21.2-virgl/src/gallium/drivers/llvmpipe/lp_bld_depth.h
4570 views
/**************************************************************************1*2* Copyright 2009 VMware, Inc.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS18* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.20* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR21* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,22* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE23* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/262728/**29* Depth/stencil testing to LLVM IR translation.30*31* @author Jose Fonseca <[email protected]>32*/3334#ifndef LP_BLD_DEPTH_H35#define LP_BLD_DEPTH_H363738#include "pipe/p_compiler.h"39#include "pipe/p_state.h"4041#include "gallivm/lp_bld.h"4243struct lp_depth_state;44struct gallivm_state;45struct util_format_description;46struct lp_type;47struct lp_build_mask_context;484950struct lp_type51lp_depth_type(const struct util_format_description *format_desc,52unsigned length);535455void56lp_build_depth_stencil_test(struct gallivm_state *gallivm,57const struct lp_depth_state *depth,58const struct pipe_stencil_state stencil[2],59struct lp_type z_src_type,60const struct util_format_description *format_desc,61struct lp_build_mask_context *mask,62LLVMValueRef *cov_mask,63LLVMValueRef stencil_refs[2],64LLVMValueRef z_src,65LLVMValueRef z_fb,66LLVMValueRef s_fb,67LLVMValueRef face,68LLVMValueRef *z_value,69LLVMValueRef *s_value,70boolean do_branch);7172void73lp_build_depth_stencil_load_swizzled(struct gallivm_state *gallivm,74struct lp_type z_src_type,75const struct util_format_description *format_desc,76boolean is_1d,77LLVMValueRef depth_ptr,78LLVMValueRef depth_stride,79LLVMValueRef *z_fb,80LLVMValueRef *s_fb,81LLVMValueRef loop_counter);8283void84lp_build_depth_stencil_write_swizzled(struct gallivm_state *gallivm,85struct lp_type z_src_type,86const struct util_format_description *format_desc,87boolean is_1d,88LLVMValueRef mask_value,89LLVMValueRef z_fb,90LLVMValueRef s_fb,91LLVMValueRef loop_counter,92LLVMValueRef depth_ptr,93LLVMValueRef depth_stride,94LLVMValueRef z_value,95LLVMValueRef s_value);969798void99lp_build_occlusion_count(struct gallivm_state *gallivm,100struct lp_type type,101LLVMValueRef maskvalue,102LLVMValueRef counter);103104#endif /* !LP_BLD_DEPTH_H */105106107