2 * Copyright © 2017 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 * on the rights to use, copy, modify, merge, publish, distribute, sub
8 * license, and/or sell copies of the Software, and to permit persons to whom
9 * the 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 NON-INFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
19 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21 * USE OR OTHER DEALINGS IN THE SOFTWARE.
25 #include "pipe/p_defines.h"
26 #include "pipe/p_state.h"
27 #include "pipe/p_context.h"
28 #include "pipe/p_screen.h"
29 #include "util/u_inlines.h"
30 #include "util/u_format.h"
31 #include "util/u_upload_mgr.h"
32 #include "util/ralloc.h"
33 #include "iris_context.h"
34 #include "iris_resource.h"
35 #include "iris_screen.h"
36 #include "intel/compiler/brw_compiler.h"
39 iris_clear(struct pipe_context
*ctx
,
41 const union pipe_color_union
*color
,
48 iris_clear_render_target(struct pipe_context
*ctx
,
49 struct pipe_surface
*dst
,
50 const union pipe_color_union
*color
,
51 unsigned dst_x
, unsigned dst_y
,
52 unsigned width
, unsigned height
,
53 bool render_condition_enabled
)
58 iris_clear_depth_stencil(struct pipe_context
*ctx
,
59 struct pipe_surface
*dst
,
63 unsigned dst_x
, unsigned dst_y
,
64 unsigned width
, unsigned height
,
65 bool render_condition_enabled
)
70 iris_init_clear_functions(struct pipe_context
*ctx
)
72 ctx
->clear
= iris_clear
;
73 ctx
->clear_render_target
= iris_clear_render_target
;
74 ctx
->clear_depth_stencil
= iris_clear_depth_stencil
;