Home | History | Annotate | Download | only in i965
      1 /*
      2  * Copyright  2012 Intel Corporation
      3  *
      4  * Permission is hereby granted, free of charge, to any person obtaining a
      5  * copy of this software and associated documentation files (the "Software"),
      6  * to deal in the Software without restriction, including without limitation
      7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      8  * and/or sell copies of the Software, and to permit persons to whom the
      9  * Software is furnished to do so, subject to the following conditions:
     10  *
     11  * The above copyright notice and this permission notice (including the next
     12  * paragraph) shall be included in all copies or substantial portions of the
     13  * Software.
     14  *
     15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
     21  * IN THE SOFTWARE.
     22  */
     23 
     24 #pragma once
     25 
     26 #include "blorp/blorp.h"
     27 #include "intel_mipmap_tree.h"
     28 #include "program/prog_instruction.h"
     29 
     30 #ifdef __cplusplus
     31 extern "C" {
     32 #endif
     33 
     34 void brw_blorp_init(struct brw_context *brw);
     35 
     36 void
     37 brw_blorp_blit_miptrees(struct brw_context *brw,
     38                         struct intel_mipmap_tree *src_mt,
     39                         unsigned src_level, unsigned src_layer,
     40                         mesa_format src_format, int src_swizzle,
     41                         struct intel_mipmap_tree *dst_mt,
     42                         unsigned dst_level, unsigned dst_layer,
     43                         mesa_format dst_format,
     44                         float src_x0, float src_y0,
     45                         float src_x1, float src_y1,
     46                         float dst_x0, float dst_y0,
     47                         float dst_x1, float dst_y1,
     48                         GLenum filter, bool mirror_x, bool mirror_y,
     49                         bool decode_srgb, bool encode_srgb);
     50 
     51 void
     52 brw_blorp_copy_miptrees(struct brw_context *brw,
     53                         struct intel_mipmap_tree *src_mt,
     54                         unsigned src_level, unsigned src_logical_layer,
     55                         struct intel_mipmap_tree *dst_mt,
     56                         unsigned dst_level, unsigned dst_logical_layer,
     57                         unsigned src_x, unsigned src_y,
     58                         unsigned dst_x, unsigned dst_y,
     59                         unsigned src_width, unsigned src_height);
     60 
     61 bool
     62 brw_blorp_clear_color(struct brw_context *brw, struct gl_framebuffer *fb,
     63                       GLbitfield mask, bool partial_clear, bool encode_srgb);
     64 
     65 void
     66 brw_blorp_resolve_color(struct brw_context *brw,
     67                         struct intel_mipmap_tree *mt,
     68                         unsigned level, unsigned layer);
     69 
     70 void
     71 intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
     72 	       unsigned int level, unsigned int layer, enum blorp_hiz_op op);
     73 
     74 void gen6_blorp_exec(struct blorp_batch *batch,
     75                      const struct blorp_params *params);
     76 void gen7_blorp_exec(struct blorp_batch *batch,
     77                      const struct blorp_params *params);
     78 void gen75_blorp_exec(struct blorp_batch *batch,
     79                       const struct blorp_params *params);
     80 void gen8_blorp_exec(struct blorp_batch *batch,
     81                      const struct blorp_params *params);
     82 void gen9_blorp_exec(struct blorp_batch *batch,
     83                      const struct blorp_params *params);
     84 
     85 #ifdef __cplusplus
     86 } /* extern "C" */
     87 #endif
     88