3 * Copyright © 2013-2015 Intel Corporation
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
25 #ifndef BRW_FS_SURFACE_BUILDER_H
26 #define BRW_FS_SURFACE_BUILDER_H
28 #include "brw_fs_builder.h"
29 #include "brw_context.h"
32 namespace surface_access
{
34 emit_untyped_read(const fs_builder
&bld
,
35 const fs_reg
&surface
, const fs_reg
&addr
,
36 unsigned dims
, unsigned size
,
37 brw_predicate pred
= BRW_PREDICATE_NONE
);
40 emit_untyped_write(const fs_builder
&bld
, const fs_reg
&surface
,
41 const fs_reg
&addr
, const fs_reg
&src
,
42 unsigned dims
, unsigned size
,
43 brw_predicate pred
= BRW_PREDICATE_NONE
);
46 emit_untyped_atomic(const fs_builder
&bld
,
47 const fs_reg
&surface
, const fs_reg
&addr
,
48 const fs_reg
&src0
, const fs_reg
&src1
,
49 unsigned dims
, unsigned rsize
, unsigned op
,
50 brw_predicate pred
= BRW_PREDICATE_NONE
);
53 emit_typed_read(const fs_builder
&bld
, const fs_reg
&surface
,
54 const fs_reg
&addr
, unsigned dims
, unsigned size
);
57 emit_typed_write(const fs_builder
&bld
, const fs_reg
&surface
,
58 const fs_reg
&addr
, const fs_reg
&src
,
59 unsigned dims
, unsigned size
);
62 emit_typed_atomic(const fs_builder
&bld
, const fs_reg
&surface
,
64 const fs_reg
&src0
, const fs_reg
&src1
,
65 unsigned dims
, unsigned rsize
, unsigned op
,
66 brw_predicate pred
= BRW_PREDICATE_NONE
);
69 namespace image_access
{
71 emit_image_load(const fs_builder
&bld
,
72 const fs_reg
&image
, const fs_reg
&addr
,
73 unsigned surf_dims
, unsigned arr_dims
,
77 emit_image_store(const fs_builder
&bld
, const fs_reg
&image
,
78 const fs_reg
&addr
, const fs_reg
&src
,
79 unsigned surf_dims
, unsigned arr_dims
,
82 emit_image_atomic(const fs_builder
&bld
,
83 const fs_reg
&image
, const fs_reg
&addr
,
84 const fs_reg
&src0
, const fs_reg
&src1
,
85 unsigned surf_dims
, unsigned arr_dims
,
86 unsigned rsize
, unsigned op
);