i965: Drop bogus pthread_mutex_unlock in map_gtt error path.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_blorp.h
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 #ifndef BRW_BLORP_H
25 #define BRW_BLORP_H
26
27 #include "blorp/blorp.h"
28 #include "intel_mipmap_tree.h"
29 #include "program/prog_instruction.h"
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 void brw_blorp_init(struct brw_context *brw);
36
37 void
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);
51
52 void
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);
61
62 void
63 brw_blorp_clear_color(struct brw_context *brw, struct gl_framebuffer *fb,
64 GLbitfield mask, bool partial_clear, bool encode_srgb);
65 void
66 brw_blorp_clear_depth_stencil(struct brw_context *brw,
67 struct gl_framebuffer *fb,
68 GLbitfield mask, bool partial_clear);
69
70 void
71 brw_blorp_resolve_color(struct brw_context *brw,
72 struct intel_mipmap_tree *mt,
73 unsigned level, unsigned layer,
74 enum blorp_fast_clear_op resolve_op);
75
76 void
77 intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
78 unsigned int level, unsigned int start_layer,
79 unsigned int num_layers, enum blorp_hiz_op op);
80
81 void gen4_blorp_exec(struct blorp_batch *batch,
82 const struct blorp_params *params);
83 void gen45_blorp_exec(struct blorp_batch *batch,
84 const struct blorp_params *params);
85 void gen5_blorp_exec(struct blorp_batch *batch,
86 const struct blorp_params *params);
87 void gen6_blorp_exec(struct blorp_batch *batch,
88 const struct blorp_params *params);
89 void gen7_blorp_exec(struct blorp_batch *batch,
90 const struct blorp_params *params);
91 void gen75_blorp_exec(struct blorp_batch *batch,
92 const struct blorp_params *params);
93 void gen8_blorp_exec(struct blorp_batch *batch,
94 const struct blorp_params *params);
95 void gen9_blorp_exec(struct blorp_batch *batch,
96 const struct blorp_params *params);
97 void gen10_blorp_exec(struct blorp_batch *batch,
98 const struct blorp_params *params);
99
100 #ifdef __cplusplus
101 } /* extern "C" */
102 #endif
103
104 #endif /* BRW_BLORP_H */