1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
/*
* Copyright © 2006 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* Authors:
* Wang Zhenyu <zhenyu.z.wang@intel.com>
* Keith Packard <keithp@keithp.com>
*/
/*
* Input parameters
*/
define(`quote', `ifelse(`$#', `0', `', ``$*'')')
/* Destination X/Y */
define(`dst_x_uw', `g1.8<2,4,0>UW')
define(`dst_y_uw', `g1.10<2,4,0>UW')
define(`screen_x0', `g1.0<0,1,0>F')
define(`screen_y0', `g1.4<0,1,0>F')
/* Source transformation parameters */
define(`src_du_dx', `g3.0<0,1,0>F')
define(`src_du_dy', `g3.4<0,1,0>F')
define(`src_uo', `g3.12<0,1,0>F')
define(`src_dv_dx', `g3.16<0,1,0>F')
define(`src_dv_dy', `g3.20<0,1,0>F')
define(`src_vo', `g3.28<0,1,0>F')
define(`src_dw_dx', `g4.0<0,1,0>F')
define(`src_dw_dy', `g4.4<0,1,0>F')
define(`src_wo', `g4.12<0,1,0>F')
define(`mask_du_dx', `g4.16<0,1,0>F')
define(`mask_du_dy', `g4.20<0,1,0>F')
define(`mask_uo', `g4.28<0,1,0>F')
define(`mask_dv_dx', `g5.0<0,1,0>F')
define(`mask_dv_dy', `g5.4<0,1,0>F')
define(`mask_vo', `g5.12<0,1,0>F')
define(`mask_dw_dx', `g5.16<0,1,0>F')
define(`mask_dw_dy', `g5.20<0,1,0>F')
define(`mask_wo', `g5.28<0,1,0>F')
/*
* Local variables
*/
/* this holds the X dest coordinates */
define(`dst_x', `g8')
define(`dst_x_0', `dst_x')
define(`dst_x_1', `g9')
/* this holds the Y dest coordinates */
define(`dst_y', `g10')
define(`dst_y_0', `dst_y')
define(`dst_y_1', `g11')
/* When computing x * dn/dx, use this */
define(`temp_x', `g12')
define(`temp_x_0', `temp_x')
define(`temp_x_1', `g13')
/* When computing y * dn/dy, use this */
define(`temp_y', `g14')
define(`temp_y_0', temp_y)
define(`temp_y_1', `g15')
/* when loading x/y, use these to hold them in UW format */
define(`temp_x_uw', temp_x)
define(`temp_y_uw', temp_y)
/* compute source and mask u/v to this pair to send to sampler */
define(`src_u', `m1')
define(`src_v', `m3')
define(`mask_u', src_u)
define(`mask_v', src_v)
define(`src_w', `g16')
define(`src_w_0', src_w)
define(`src_w_1', `g17')
define(`mask_w', src_w)
define(`mask_w_0', src_w_0)
define(`mask_w_1', src_w_1)
/* sample src to these registers */
define(`src_sample0', `g18')
define(`src_sample1', `g19')
define(`src_sample2', `g20')
define(`src_sample3', `g21')
define(`src_sample4', `g22')
define(`src_sample5', `g23')
define(`src_sample6', `g24')
define(`src_sample7', `g25')
/* sample mask to these registers */
define(`mask_sample0', `g26')
define(`mask_sample1', `g27')
define(`mask_sample2', `g28')
define(`mask_sample3', `g29')
define(`mask_sample4', `g30')
define(`mask_sample5', `g31')
define(`mask_sample6', `g32')
define(`mask_sample7', `g33')
|