2 * Copyright © 2012 Intel Corporation
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:
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
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
27 #include "blorp/blorp.h"
28 #include "intel_mipmap_tree.h"
29 #include "program/prog_instruction.h"
35 void brw_blorp_init(struct brw_context
*brw
);
38 brw_blorp_blit_miptrees(struct brw_context
*brw
,
39 struct intel_mipmap_tree
*src_mt
,
40 unsigned src_level
, unsigned src_layer
,
41 mesa_format src_format
, int src_swizzle
,
42 struct intel_mipmap_tree
*dst_mt
,
43 unsigned dst_level
, unsigned dst_layer
,
44 mesa_format dst_format
,
45 float src_x0
, float src_y0
,
46 float src_x1
, float src_y1
,
47 float dst_x0
, float dst_y0
,
48 float dst_x1
, float dst_y1
,
49 GLenum filter
, bool mirror_x
, bool mirror_y
,
50 bool decode_srgb
, bool encode_srgb
);
53 brw_blorp_copy_miptrees(struct brw_context
*brw
,
54 struct intel_mipmap_tree
*src_mt
,
55 unsigned src_level
, unsigned src_logical_layer
,
56 struct intel_mipmap_tree
*dst_mt
,
57 unsigned dst_level
, unsigned dst_logical_layer
,
58 unsigned src_x
, unsigned src_y
,
59 unsigned dst_x
, unsigned dst_y
,
60 unsigned src_width
, unsigned src_height
);
63 brw_blorp_copy_buffers(struct brw_context
*brw
,
64 struct brw_bo
*src_bo
,
66 struct brw_bo
*dst_bo
,
71 brw_blorp_upload_miptree(struct brw_context
*brw
,
72 struct intel_mipmap_tree
*dst_mt
,
73 mesa_format dst_format
,
74 uint32_t level
, uint32_t x
, uint32_t y
, uint32_t z
,
75 uint32_t width
, uint32_t height
, uint32_t depth
,
76 GLenum target
, GLenum format
, GLenum type
,
78 const struct gl_pixelstore_attrib
*packing
);
81 brw_blorp_download_miptree(struct brw_context
*brw
,
82 struct intel_mipmap_tree
*src_mt
,
83 mesa_format src_format
, uint32_t src_swizzle
,
84 uint32_t level
, uint32_t x
, uint32_t y
, uint32_t z
,
85 uint32_t width
, uint32_t height
, uint32_t depth
,
86 GLenum target
, GLenum format
, GLenum type
,
87 bool y_flip
, const void *pixels
,
88 const struct gl_pixelstore_attrib
*packing
);
91 brw_blorp_clear_color(struct brw_context
*brw
, struct gl_framebuffer
*fb
,
92 GLbitfield mask
, bool partial_clear
, bool encode_srgb
);
94 brw_blorp_clear_depth_stencil(struct brw_context
*brw
,
95 struct gl_framebuffer
*fb
,
96 GLbitfield mask
, bool partial_clear
);
99 brw_blorp_resolve_color(struct brw_context
*brw
,
100 struct intel_mipmap_tree
*mt
,
101 unsigned level
, unsigned layer
,
102 enum isl_aux_op resolve_op
);
105 brw_blorp_mcs_partial_resolve(struct brw_context
*brw
,
106 struct intel_mipmap_tree
*mt
,
107 uint32_t start_layer
, uint32_t num_layers
);
110 intel_hiz_exec(struct brw_context
*brw
, struct intel_mipmap_tree
*mt
,
111 unsigned int level
, unsigned int start_layer
,
112 unsigned int num_layers
, enum isl_aux_op op
);
114 void gen4_blorp_exec(struct blorp_batch
*batch
,
115 const struct blorp_params
*params
);
116 void gen45_blorp_exec(struct blorp_batch
*batch
,
117 const struct blorp_params
*params
);
118 void gen5_blorp_exec(struct blorp_batch
*batch
,
119 const struct blorp_params
*params
);
120 void gen6_blorp_exec(struct blorp_batch
*batch
,
121 const struct blorp_params
*params
);
122 void gen7_blorp_exec(struct blorp_batch
*batch
,
123 const struct blorp_params
*params
);
124 void gen75_blorp_exec(struct blorp_batch
*batch
,
125 const struct blorp_params
*params
);
126 void gen8_blorp_exec(struct blorp_batch
*batch
,
127 const struct blorp_params
*params
);
128 void gen9_blorp_exec(struct blorp_batch
*batch
,
129 const struct blorp_params
*params
);
130 void gen10_blorp_exec(struct blorp_batch
*batch
,
131 const struct blorp_params
*params
);
132 void gen11_blorp_exec(struct blorp_batch
*batch
,
133 const struct blorp_params
*params
);
139 #endif /* BRW_BLORP_H */