Debian Codegraph @

src/shaders/utils/mfc_batchbuffer_tail.asm

raw
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 * Authors:
24 * Xiang Haihao <[email protected]>
25 */
26
27 __TAIL:
28 (f0.1)jmpi (1) __EXIT ;
29
30 __TAIL_LOOP:
31 mov (8) msg_reg0.0<1>:ud tmp_slice_header<8,8,1>:ud {align1} ;
32
33 send (16)
34 msg_ind
35 ob_read_wb
36 null
37 data_port(
38 OB_CACHE_TYPE,
39 OB_READ,
40 OB_CONTROL_0,
41 BIND_IDX_MFC_SLICE_HEADER,
42 OB_WRITE_COMMIT_CATEGORY,
43 OB_HEADER_PRESENT
44 )
45 mlen 1
46 rlen ob_read_wb_len_slice_header
47 {align1};
48
49 mov (8) msg_reg0.0<1>:ud tmp_mfc_batchbuffer<8,8,1>:ud {align1} ;
50 mov (8) msg_reg1.0<1>:ud ob_read_wb0<8,8,1>:ud {align1} ;
51
52 send (16)
53 msg_ind
54 ob_write_wb
55 null
56 data_port(
57 OB_CACHE_TYPE,
58 OB_WRITE,
59 OB_CONTROL_0,
60 BIND_IDX_MFC_BATCHBUFFER,
61 OB_WRITE_COMMIT_CATEGORY,
62 OB_HEADER_PRESENT
63 )
64 mlen 2
65 rlen ob_write_wb_length
66 {align1};
67
68 /* the new offset */
69 add (1) tmp_slice_header.8<1>:ud tmp_slice_header.8<0,1,0>:ud 1:ud {align1} ;
70 add (1) tmp_mfc_batchbuffer.8<1>:ud tmp_mfc_batchbuffer.8<0,1,0>:ud 1:ud {align1} ;
71
72 add.z.f0.0 (1) tail_size<1>:w tail_size<0,1,0>:w -1:w {align1};
73 (-f0.0)jmpi (1) __TAIL_LOOP ;
74
75
76 __DONE:
77
78 and.z.f0.0 (1) null<1>:uw flags<0,1,0>:uw FLAG_MASK_LAST_SLICE {align1};
79 (f0.0)jmpi (1) __EXIT ;
80
81 /* bind index 5, write 1 oword, msg type: 8(OWord Block Write) */
82 mov (8) msg_reg0.0<1>:ud tmp_mfc_batchbuffer<8,8,1>:ud {align1} ;
83 mov (4) msg_reg1.0<1>:ud 0x0:ud {align1} ;
84 mov (1) msg_reg1.4<1>:ud MI_BATCH_BUFFER_END {align1} ;
85
86 send (16)
87 msg_ind
88 ob_write_wb
89 null
90 data_port(
91 OB_CACHE_TYPE,
92 OB_WRITE,
93 OB_CONTROL_0,
94 BIND_IDX_MFC_BATCHBUFFER,
95 OB_WRITE_COMMIT_CATEGORY,
96 OB_HEADER_PRESENT
97 )
98 mlen 2
99 rlen ob_write_wb_length
100 {align1};