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
30 #include "intel_resolve_map.h" /* needed for enum gen6_hiz_op */
31 #include "intel_bufmgr.h" /* needed for drm_intel_bo */
34 struct brw_wm_prog_key
;
40 struct blorp_context
{
43 const struct isl_device
*isl_dev
;
51 bool (*lookup_shader
)(struct blorp_context
*blorp
,
52 const void *key
, uint32_t key_size
,
53 uint32_t *kernel_out
, void *prog_data_out
);
54 void (*upload_shader
)(struct blorp_context
*blorp
,
55 const void *key
, uint32_t key_size
,
56 const void *kernel
, uint32_t kernel_size
,
57 const void *prog_data
, uint32_t prog_data_size
,
58 uint32_t *kernel_out
, void *prog_data_out
);
61 void blorp_init(struct blorp_context
*blorp
, void *driver_ctx
,
62 struct isl_device
*isl_dev
);
63 void blorp_finish(struct blorp_context
*blorp
);
67 const struct isl_surf
*surf
;
71 const struct isl_surf
*aux_surf
;
74 enum isl_aux_usage aux_usage
;
76 union isl_color_value clear_color
;
80 brw_blorp_blit(struct brw_context
*brw
,
81 const struct brw_blorp_surf
*src_surf
,
82 unsigned src_level
, unsigned src_layer
,
83 enum isl_format src_format
, int src_swizzle
,
84 const struct brw_blorp_surf
*dst_surf
,
85 unsigned dst_level
, unsigned dst_layer
,
86 enum isl_format dst_format
,
87 float src_x0
, float src_y0
,
88 float src_x1
, float src_y1
,
89 float dst_x0
, float dst_y0
,
90 float dst_x1
, float dst_y1
,
91 uint32_t filter
, bool mirror_x
, bool mirror_y
);
94 blorp_fast_clear(struct brw_context
*brw
,
95 const struct brw_blorp_surf
*surf
,
96 uint32_t level
, uint32_t layer
,
97 uint32_t x0
, uint32_t y0
, uint32_t x1
, uint32_t y1
);
100 blorp_clear(struct brw_context
*brw
,
101 const struct brw_blorp_surf
*surf
,
102 uint32_t level
, uint32_t layer
,
103 uint32_t x0
, uint32_t y0
, uint32_t x1
, uint32_t y1
,
104 enum isl_format format
, union isl_color_value clear_color
,
105 bool color_write_disable
[4]);
108 brw_blorp_ccs_resolve(struct brw_context
*brw
, struct brw_blorp_surf
*surf
,
109 enum isl_format format
);
112 blorp_gen6_hiz_op(struct brw_context
*brw
, struct brw_blorp_surf
*surf
,
113 unsigned level
, unsigned layer
, enum gen6_hiz_op op
);
116 } /* end extern "C" */
117 #endif /* __cplusplus */