Compare commits
909 Commits
skl-fast-c
...
vulkan-pro
Author | SHA1 | Date | |
---|---|---|---|
|
e9dff5bb99 | ||
|
39cd3783a4 | ||
|
a95f51c1d7 | ||
|
00d18a661f | ||
|
f5e72695e0 | ||
|
913a9b76f7 | ||
|
bc17f9c9d7 | ||
|
e1a7c721d3 | ||
|
99e62f5ce8 | ||
|
429665823d | ||
|
76be58efce | ||
|
041f5ea089 | ||
|
f406b708a5 | ||
|
616db92b01 | ||
|
a788e7c659 | ||
|
595e6cacf1 | ||
|
d616493953 | ||
|
3b8aa26b8e | ||
|
b5f6889648 | ||
|
dcf424c98c | ||
|
5f57ff7e18 | ||
|
15624fcf55 | ||
|
55daed947d | ||
|
c55fa89251 | ||
|
8c6bc1e85d | ||
|
74bf7aa07c | ||
|
222ddac810 | ||
|
85520aa070 | ||
|
622a317e4c | ||
|
6221593ff8 | ||
|
0ecafe0285 | ||
|
b659a066e9 | ||
|
ffa61e1572 | ||
|
eed74e3a02 | ||
|
e01d5a0471 | ||
|
8c8ad6dddf | ||
|
2b4a2eb592 | ||
|
c3086c54a8 | ||
|
7487371056 | ||
|
de5220c7ce | ||
|
b908c67816 | ||
|
fd21f0681a | ||
|
8040dc4ca5 | ||
|
060720f0c9 | ||
|
1bee19e023 | ||
|
2f3de6260d | ||
|
4d73ca3c58 | ||
|
612b13aeae | ||
|
fe786ff67d | ||
|
35fcd37fcf | ||
|
87d02f515b | ||
|
9be43ef99c | ||
|
01924a03d4 | ||
|
2c4ae00db6 | ||
|
b3c037f329 | ||
|
9a95d08ed6 | ||
|
6d5dafd779 | ||
|
7174d155e9 | ||
|
f32d16a9f0 | ||
|
9e2c13350e | ||
|
f3bdb93a8e | ||
|
48e87c0163 | ||
|
348cb29a20 | ||
|
06d8fd5881 | ||
|
c0b97577e8 | ||
|
ca3cfbf6f1 | ||
|
3d9fbb6575 | ||
|
beb466ff5b | ||
|
9a7600c9b5 | ||
|
8af3624651 | ||
|
7c1d20dc48 | ||
|
316c8ac53b | ||
|
6e35a1f166 | ||
|
1d787781ff | ||
|
c4dbff58d8 | ||
|
b5e90f3f48 | ||
|
82396a5514 | ||
|
c4b30e7885 | ||
|
2e346c882d | ||
|
0cb26523d3 | ||
|
28503191f1 | ||
|
be0a4da6a5 | ||
|
362ab2d788 | ||
|
126ade0023 | ||
|
0c2d476935 | ||
|
16ebe883a4 | ||
|
86c3476668 | ||
|
6350c97412 | ||
|
22fdb2f855 | ||
|
ce70cae756 | ||
|
24b0c53231 | ||
|
f4608bc530 | ||
|
85cf2385c5 | ||
|
de4f379a70 | ||
|
024c49e95e | ||
|
f6a0eff1ba | ||
|
4956bbaa33 | ||
|
c62be38286 | ||
|
a1e136711b | ||
|
756b00389c | ||
|
fe220ebd37 | ||
|
a992909aae | ||
|
45963c9c64 | ||
|
2887e68f36 | ||
|
62b094a81c | ||
|
ca51d926fd | ||
|
b6562bbc30 | ||
|
4a63761e1d | ||
|
6fc7911d15 | ||
|
9da6d808be | ||
|
1feeee9cf4 | ||
|
577c09fdad | ||
|
66fc7f252f | ||
|
9e03b6724c | ||
|
91b3b46d8b | ||
|
9197e3b9fc | ||
|
b7904b8281 | ||
|
d216dcee94 | ||
|
f36fabb736 | ||
|
7bf4b53f1c | ||
|
7d64741a5e | ||
|
112c607216 | ||
|
4fa1366392 | ||
|
e709a4ebb8 | ||
|
67af6c59f2 | ||
|
5e6c5e3c8e | ||
|
366366c7f7 | ||
|
befecb3c55 | ||
|
399e962d25 | ||
|
ac4d459aa2 | ||
|
3a266a18ae | ||
|
2494055631 | ||
|
2a023f30a6 | ||
|
5bb94c9b12 | ||
|
53bff3e445 | ||
|
0db3e4dd72 | ||
|
1169fcdb05 | ||
|
b79916dacc | ||
|
ac60aba351 | ||
|
78eabc6153 | ||
|
2c585a722d | ||
|
b20d9f5643 | ||
|
9d92b4fd0e | ||
|
0af4bf4d4b | ||
|
9f9628e9dd | ||
|
44e6ea74b0 | ||
|
9cebdd78d8 | ||
|
5e7c7b2a4e | ||
|
98abed2441 | ||
|
dbc3eb5bb4 | ||
|
ea56d0cb1d | ||
|
a2d15ee698 | ||
|
84cfc08c10 | ||
|
053d32d2a5 | ||
|
14e1d58fb7 | ||
|
31af126229 | ||
|
bff2879abe | ||
|
4f852c76dc | ||
|
104c4e5ddf | ||
|
aacb7bb9b6 | ||
|
641c25dd55 | ||
|
c6f19b4248 | ||
|
35b0262a2d | ||
|
b2ee317e24 | ||
|
798acb2464 | ||
|
4461392343 | ||
|
941b48e992 | ||
|
c313a989b4 | ||
|
2a8d1ac958 | ||
|
4e3ee043c0 | ||
|
375a65d5de | ||
|
c8365c55f5 | ||
|
efc2cce01f | ||
|
33cabeab01 | ||
|
5446bf352e | ||
|
36134e1050 | ||
|
74e076bba8 | ||
|
4bb9915755 | ||
|
9b387b5d3f | ||
|
5360edcb30 | ||
|
647a60226d | ||
|
7e5afa75b5 | ||
|
00e7799c69 | ||
|
6a1098b2c2 | ||
|
f1455ffac7 | ||
|
891995e55b | ||
|
9c752b5b38 | ||
|
3800573fb5 | ||
|
615da3795a | ||
|
ac738ada7a | ||
|
963a1e35e7 | ||
|
f5275f7eb3 | ||
|
988341a73c | ||
|
bc568ee992 | ||
|
8fe74ec45c | ||
|
a2b822185e | ||
|
e43fc871be | ||
|
25ab43ee8c | ||
|
b4ef2302a9 | ||
|
97360ffc6c | ||
|
cff717c649 | ||
|
64045eebfb | ||
|
9f0bb5977b | ||
|
a7649b2869 | ||
|
130db30771 | ||
|
98126c021f | ||
|
0bcf85d79f | ||
|
ef0ab62486 | ||
|
fb428727e0 | ||
|
74556b076a | ||
|
ee9788973f | ||
|
c4e7ed9163 | ||
|
0db3d67a14 | ||
|
2387219101 | ||
|
1c24a191cd | ||
|
4eaf90effb | ||
|
44ef4484c8 | ||
|
4aef5c62cd | ||
|
9f908fcbde | ||
|
49d9e89d00 | ||
|
bd0aab9a58 | ||
|
b0875aa911 | ||
|
d52822541e | ||
|
e7d3a5df5a | ||
|
50f7bf70da | ||
|
6ff95bba8a | ||
|
5a6b2e6df0 | ||
|
a9c36daa83 | ||
|
60c4ac57f2 | ||
|
c11094ec9a | ||
|
ded736f16a | ||
|
4ae42c83ec | ||
|
e39e1f4d24 | ||
|
aac6f7c3bb | ||
|
6d09d0644b | ||
|
0deae66eb1 | ||
|
6a7ca4ef2c | ||
|
b4c02253c4 | ||
|
16c5b9f4ed | ||
|
30d82136bb | ||
|
9564dd37a0 | ||
|
8605ee60e0 | ||
|
6757e2f75c | ||
|
4b097d73e6 | ||
|
fbb119061e | ||
|
facf587dea | ||
|
5e5a783530 | ||
|
56ce219493 | ||
|
fd64598462 | ||
|
481122f4ac | ||
|
e65953146c | ||
|
1920ef9675 | ||
|
930598ad56 | ||
|
e40bdcef1f | ||
|
0f050aaa15 | ||
|
1f49a7d9fc | ||
|
220a01d525 | ||
|
26ba0ad54d | ||
|
e379cd9a0e | ||
|
4c2a182a36 | ||
|
21004f23bf | ||
|
5aee803b97 | ||
|
0c4a2dab7e | ||
|
ace093031d | ||
|
7af67e085f | ||
|
f15be18c92 | ||
|
e39d0b635c | ||
|
82548a3aca | ||
|
56ce896d73 | ||
|
3ed9cea84d | ||
|
0f31c580bf | ||
|
4fc7510a7c | ||
|
8208f01a35 | ||
|
7d50734240 | ||
|
fcea3e2d23 | ||
|
65f3d00cd6 | ||
|
86a53d2880 | ||
|
6aba52381a | ||
|
3c2743dcd1 | ||
|
4ced8650d4 | ||
|
d4c249364d | ||
|
117d74b4e2 | ||
|
8fb6405718 | ||
|
80ad578c4e | ||
|
50e86b5777 | ||
|
f884b500d0 | ||
|
e99773badd | ||
|
b1fcc30ff0 | ||
|
3460e6cb2f | ||
|
867f6cb90c | ||
|
c9dc1f4098 | ||
|
2c2233e328 | ||
|
f70d079854 | ||
|
194b77d426 | ||
|
169251bff0 | ||
|
fc3838376b | ||
|
b2cfd85060 | ||
|
b599735be4 | ||
|
513ee7fa48 | ||
|
9fa0989ff2 | ||
|
5520221118 | ||
|
73a8f9543a | ||
|
55781f8d02 | ||
|
756d8064c1 | ||
|
927f54de68 | ||
|
9c0db9d349 | ||
|
6037b5d610 | ||
|
7ccc8dd24a | ||
|
d22d5f25fc | ||
|
da4d9f6c7c | ||
|
d862099198 | ||
|
498ae009d3 | ||
|
6f140e8af1 | ||
|
badbf0c94a | ||
|
61a4bfe253 | ||
|
e1c78ebe53 | ||
|
f4748bff59 | ||
|
4c8e1e5888 | ||
|
f5ad06eb78 | ||
|
188f2328de | ||
|
c6270e8044 | ||
|
365d80a91e | ||
|
7529e7ce86 | ||
|
8213be790e | ||
|
43241a24bc | ||
|
94e473c993 | ||
|
e375f722a6 | ||
|
9aabe69028 | ||
|
5f46c4608f | ||
|
0eeba6b80c | ||
|
2b5a4dc5f3 | ||
|
1f658bed70 | ||
|
ca7243b54e | ||
|
553b4434ca | ||
|
e5db209d54 | ||
|
c7fcfebd5b | ||
|
2a9136feb4 | ||
|
2c4dc92f40 | ||
|
d7f44852be | ||
|
1fd3bc818a | ||
|
2e2f48f840 | ||
|
02db21ae11 | ||
|
a463eacb8f | ||
|
98957b18d2 | ||
|
a35811d086 | ||
|
55723e97f1 | ||
|
ccb2e5cd62 | ||
|
30445f8f7a | ||
|
d2c0870ff3 | ||
|
8478350992 | ||
|
68768c40be | ||
|
66cbb7f76d | ||
|
6d0ed38db5 | ||
|
1ca611cbad | ||
|
6eec0b186c | ||
|
4b2c5a98f0 | ||
|
08f7731f67 | ||
|
0c8456ef1e | ||
|
b29c929e8e | ||
|
5e1737c42f | ||
|
d80fea1af6 | ||
|
9250e1e9e5 | ||
|
f925ea31e7 | ||
|
ec5e2f4992 | ||
|
a684198935 | ||
|
6e5ab5cf1b | ||
|
114015321e | ||
|
cb57bff36c | ||
|
8ae8e14ba7 | ||
|
dd67c134ad | ||
|
e18377f435 | ||
|
e93b6d8eb1 | ||
|
584cb7a16f | ||
|
68c7ef502d | ||
|
549070b18c | ||
|
ebb191f145 | ||
|
435ccf4056 | ||
|
ffb51fd112 | ||
|
45f8723f44 | ||
|
180c07ee50 | ||
|
4b05a8cd31 | ||
|
f1cf55fae6 | ||
|
3112098776 | ||
|
c633ab5822 | ||
|
8f3b2187e1 | ||
|
77dcfe3c70 | ||
|
601d0891a6 | ||
|
829810fa27 | ||
|
17c8232ecf | ||
|
a158ff55f0 | ||
|
1c4238a8e5 | ||
|
f43a304dc6 | ||
|
df2a013881 | ||
|
c7f512721c | ||
|
8cda3e9b1b | ||
|
4422bd4cf6 | ||
|
7552e026da | ||
|
8b342b39a3 | ||
|
b94b8dfad5 | ||
|
18340883e3 | ||
|
9e64a2a8e4 | ||
|
19f0a9b582 | ||
|
6eb221c884 | ||
|
fb4e2195ec | ||
|
a52e208203 | ||
|
b1de1d4f6e | ||
|
8739e8fbe2 | ||
|
92556c77f4 | ||
|
098209eedf | ||
|
73f9187e33 | ||
|
7d24fab4ef | ||
|
5c49730164 | ||
|
c95f9b61f2 | ||
|
335e88c8ee | ||
|
34871cf7f3 | ||
|
8c2c37fae7 | ||
|
1f907011a3 | ||
|
977a469bce | ||
|
65e0b304b6 | ||
|
f6d51f3fd3 | ||
|
5b75dffd04 | ||
|
fa915b661d | ||
|
c34d314db3 | ||
|
cff06bbe7d | ||
|
3318a86d12 | ||
|
b8fedc19f5 | ||
|
e4292ac039 | ||
|
997831868f | ||
|
a841e2c747 | ||
|
8640dc12dc | ||
|
5a4ebf6bc1 | ||
|
4fcb32a17d | ||
|
367b9ba78f | ||
|
d29ec8fa36 | ||
|
c8577b5f52 | ||
|
ccb27a002c | ||
|
8985dd15a1 | ||
|
e02dfa309a | ||
|
e9034ed875 | ||
|
aae45ab583 | ||
|
b4ef7f354b | ||
|
522ab835d6 | ||
|
7598329774 | ||
|
52940e8fcf | ||
|
e19d6be2a9 | ||
|
c84f2d3b8c | ||
|
b20cc72603 | ||
|
8e05bbeee9 | ||
|
cc29a5f4be | ||
|
719fa8ac74 | ||
|
fc6dcc6227 | ||
|
12119282e6 | ||
|
3c65a1ac14 | ||
|
bb6567f5d1 | ||
|
e7acdda184 | ||
|
db24afee2f | ||
|
ef8980e256 | ||
|
d9c2caea6a | ||
|
d5349b1b18 | ||
|
6aa1b89457 | ||
|
0ff06540ae | ||
|
435b062b26 | ||
|
518ca9e254 | ||
|
672590710b | ||
|
80046a7d54 | ||
|
3e4b00d283 | ||
|
a35fef1ab2 | ||
|
d2ca7e24b4 | ||
|
abbb776bbe | ||
|
e7ddfe03ab | ||
|
f89e2e6304 | ||
|
55ab1737d3 | ||
|
11901a9100 | ||
|
dff32238c7 | ||
|
85c0d69be9 | ||
|
0ecb789b71 | ||
|
f78d684772 | ||
|
18ee32ef9d | ||
|
4af79ab076 | ||
|
788a8352b9 | ||
|
7fbed521bb | ||
|
d6b840beff | ||
|
84a5bc25e3 | ||
|
f2899b1af2 | ||
|
962d6932fa | ||
|
1fb859e4b2 | ||
|
245583075c | ||
|
0a42332904 | ||
|
a1eea996d4 | ||
|
c325bb24b5 | ||
|
23075bccb3 | ||
|
69e11adecc | ||
|
b844f542e0 | ||
|
5b04db71ff | ||
|
1f1b26bceb | ||
|
63c1190e47 | ||
|
d84f3155b1 | ||
|
65f9ccb4e7 | ||
|
68fa750f2e | ||
|
d5b5bd67f6 | ||
|
d843418c2e | ||
|
2b37fc28d1 | ||
|
a75967b1bb | ||
|
2b404e5d00 | ||
|
c57ca3f16f | ||
|
2de388c49c | ||
|
1b0c47bba6 | ||
|
c7cef662d0 | ||
|
8c5e48f307 | ||
|
d9176f2ec7 | ||
|
e95bf93e5a | ||
|
1b7b580756 | ||
|
2fb524b369 | ||
|
c5ffcc9958 | ||
|
c5ab5925df | ||
|
ea5fbe1957 | ||
|
9a798fa946 | ||
|
78a0d23d4e | ||
|
11cf214578 | ||
|
0dc7d4ac8a | ||
|
19aabb5730 | ||
|
f9dbc34a18 | ||
|
f3ea3b6e58 | ||
|
15047514c9 | ||
|
73351c6a18 | ||
|
70d2336e7e | ||
|
aca5fc6af1 | ||
|
66375e2852 | ||
|
23c179be75 | ||
|
f9bb95ad4a | ||
|
d5dccc1e7a | ||
|
4a42f45514 | ||
|
630b19a1c8 | ||
|
2f9180b1b2 | ||
|
1f1465f077 | ||
|
8a6c8177e0 | ||
|
beb0e25327 | ||
|
fa663c27f5 | ||
|
e3d60d479b | ||
|
7a749aa4ba | ||
|
682eb9489d | ||
|
bba767a9af | ||
|
6720b47717 | ||
|
709fa463ec | ||
|
5b3a1ceb83 | ||
|
c6e76aed9d | ||
|
127cb3f6c5 | ||
|
fdcd71f71d | ||
|
ca6cef3302 | ||
|
9c46ba9ca2 | ||
|
667529fbaa | ||
|
74e3eb304f | ||
|
55752fe94a | ||
|
6ee082718f | ||
|
37d6e04ba1 | ||
|
67a7659d69 | ||
|
5d7103ee15 | ||
|
0349e8d607 | ||
|
068b8a41e2 | ||
|
7ea707a42a | ||
|
b91a76de98 | ||
|
ebe1e768b8 | ||
|
45b804a049 | ||
|
528071f004 | ||
|
4c8146313f | ||
|
4b8b451a1d | ||
|
af0ade0d6c | ||
|
ae29fd1b55 | ||
|
d5e41a3a99 | ||
|
c4c1d96a01 | ||
|
4f5ef945e0 | ||
|
588acdb431 | ||
|
333b8ddd6b | ||
|
7e1792b1b7 | ||
|
b72936fdad | ||
|
ee0a8f23e4 | ||
|
fa352969a2 | ||
|
99031aa0f3 | ||
|
7ea121687c | ||
|
cb30acaced | ||
|
1132080d5d | ||
|
5f2d469e37 | ||
|
f7fb7575ef | ||
|
7cec6c5dfd | ||
|
d178e15567 | ||
|
845002e163 | ||
|
2ecac045a4 | ||
|
e369a0eb41 | ||
|
d0bd2bc604 | ||
|
ba0d9d33d4 | ||
|
1bc0a1ad98 | ||
|
88d02a1b27 | ||
|
24dff4f8fa | ||
|
a62edcce4e | ||
|
dee4a94e69 | ||
|
fe1269cf28 | ||
|
9a3dda101e | ||
|
e9c21d0ca0 | ||
|
9b9f973ca6 | ||
|
9e59003fb1 | ||
|
b20794cfa8 | ||
|
aba75d0546 | ||
|
841aab6f50 | ||
|
d0fc04aacf | ||
|
22854a60ef | ||
|
0e86ab7c0a | ||
|
de4c31a085 | ||
|
aedd3c9579 | ||
|
bf5a615659 | ||
|
fa8a07748d | ||
|
c103c4990c | ||
|
2fdd17d259 | ||
|
00494c6cb7 | ||
|
fbc9fe3c92 | ||
|
765175f5d1 | ||
|
7637b02aaa | ||
|
405697eb3d | ||
|
e7edde60ba | ||
|
f7fe06cf0a | ||
|
9aae480cc4 | ||
|
923e923bbc | ||
|
1dd63fcbed | ||
|
b581e924b6 | ||
|
d76ea7644a | ||
|
a5b49d2799 | ||
|
ea7ef46cf9 | ||
|
a566b1e08a | ||
|
2a3c29698c | ||
|
c8b62d109b | ||
|
7153b56abc | ||
|
29d2bbb2b5 | ||
|
047ed02723 | ||
|
9cae3d18ac | ||
|
d5ad24e39b | ||
|
e17ed04b03 | ||
|
1ee2d1c3fc | ||
|
2d2e148952 | ||
|
ffb1ee5d20 | ||
|
f1db3b3869 | ||
|
11e941900a | ||
|
5d4b6a01af | ||
|
634a6150b9 | ||
|
919e7b7551 | ||
|
0599d39dd9 | ||
|
d57c4cf999 | ||
|
822cb16abe | ||
|
081f617b5a | ||
|
e6bd568f36 | ||
|
5b777e2bcf | ||
|
d842a6965f | ||
|
9f292219bf | ||
|
66b00d5e5a | ||
|
38f5eef59d | ||
|
999b56c507 | ||
|
3a38b0db5f | ||
|
9d6f55dedf | ||
|
e6162c2fef | ||
|
58afc24e57 | ||
|
b6363c3f12 | ||
|
531549d9fc | ||
|
66a4dab89a | ||
|
920fb771d4 | ||
|
52637c0996 | ||
|
9eab70e54f | ||
|
ce00233c13 | ||
|
e69588b764 | ||
|
c2eeab305b | ||
|
ed2ca020f8 | ||
|
aa523d3c62 | ||
|
87d98e1935 | ||
|
b981379bcf | ||
|
8d930da35d | ||
|
7f90e56e42 | ||
|
9cd42b3dea | ||
|
251aea80b0 | ||
|
47bd462b0c | ||
|
a37d122e88 | ||
|
1286bd3160 | ||
|
2f6aa424e9 | ||
|
5744d1763c | ||
|
c8f078537e | ||
|
e702197e3f | ||
|
fbafc946c6 | ||
|
f98c89ef31 | ||
|
08748e3a0c | ||
|
d4cbf6a728 | ||
|
510b5c3bed | ||
|
aded32bf04 | ||
|
5caa408579 | ||
|
76bb658518 | ||
|
dc56e4f7b8 | ||
|
e497ac2c62 | ||
|
2251305e1a | ||
|
33cccbbb73 | ||
|
b2b9fc9fad | ||
|
03ffa9ca31 | ||
|
4ffbab5ae0 | ||
|
c4bd5f87a0 | ||
|
4aecec0bd6 | ||
|
fad418ff47 | ||
|
9ffc1bed15 | ||
|
468c89a351 | ||
|
2dc0f7fe5b | ||
|
8cf932fd25 | ||
|
730ca0efb1 | ||
|
de221a672d | ||
|
6eefeb1f84 | ||
|
5a317ef4cb | ||
|
1435bf4bc4 | ||
|
f559fe9134 | ||
|
ca385dcf2a | ||
|
466f61e9f6 | ||
|
fab9011c44 | ||
|
c0739043b3 | ||
|
4514e63893 | ||
|
fd8b5e0df2 | ||
|
df4b02f4ed | ||
|
b23885857f | ||
|
da8f148203 | ||
|
59def43fc8 | ||
|
1c63575de8 | ||
|
403266be05 | ||
|
5ef81f0a05 | ||
|
6f3e3c715a | ||
|
59328bac10 | ||
|
a1d30f867d | ||
|
2514ac5547 | ||
|
1cd8437b9d | ||
|
610e6291da | ||
|
b29f44218d | ||
|
5e637c5d5a | ||
|
998837764f | ||
|
0dbed616af | ||
|
cbe7ed416e | ||
|
37743f90bc | ||
|
7c0d0021eb | ||
|
0997a7b2e3 | ||
|
c03314bdd3 | ||
|
ae8c93e023 | ||
|
912944e59d | ||
|
1b211feb6c | ||
|
903bd4b056 | ||
|
57153da2d5 | ||
|
0f0b5aecb8 | ||
|
0a54751910 | ||
|
519fe765e2 | ||
|
ccf2bf9b99 | ||
|
f3d70e4165 | ||
|
cb56372eeb | ||
|
0e441cde71 | ||
|
f17e835c26 | ||
|
b13c0f469b | ||
|
f294154e42 | ||
|
f9e66ea621 | ||
|
a29df71dd2 | ||
|
f886647b75 | ||
|
63da974529 | ||
|
387a1bb58f | ||
|
a1bd426393 | ||
|
01504057f5 | ||
|
a61f307996 | ||
|
14929046ba | ||
|
47c1cf5ce6 | ||
|
bea66ac5ad | ||
|
9557b85e3d | ||
|
13719e9225 | ||
|
d7044a19b1 | ||
|
edff076188 | ||
|
e37a89136f | ||
|
4bcf58a192 | ||
|
1573913194 | ||
|
e4c11f50b5 | ||
|
851495d344 | ||
|
4668bbb161 | ||
|
7c9f209427 | ||
|
923691c70d | ||
|
d24f8245db | ||
|
997596e4c4 | ||
|
241b59cba0 | ||
|
ae9ac47c74 | ||
|
82ddab4b18 | ||
|
1d40e6ade8 | ||
|
f330bad545 | ||
|
b6c7d8c911 | ||
|
4063b7deb8 | ||
|
b6ab076d6b | ||
|
682d11a6e8 | ||
|
28804fb9e4 | ||
|
8440b13f55 | ||
|
5286ef7849 | ||
|
69fd473321 | ||
|
cd7ab6ba4e | ||
|
c25ce55fd3 | ||
|
08bd554cda | ||
|
fb27d80781 | ||
|
c15f3834e3 | ||
|
f7b0f922be | ||
|
ca7e62d421 | ||
|
eb92745b2e | ||
|
05754549e8 | ||
|
6afb26452b | ||
|
e26a7ffbd9 | ||
|
b7fac7a7d1 | ||
|
783e6217fc | ||
|
b4b3bd1c51 | ||
|
a9f2115486 | ||
|
60ebcbed54 | ||
|
454345da1e | ||
|
333bcc2072 | ||
|
b9eb56a404 | ||
|
75cb85c56a | ||
|
a924ea0c75 | ||
|
a63952510d | ||
|
4e44dcc312 | ||
|
d6f52dfb3e | ||
|
a53e795524 | ||
|
0fa9211d7f | ||
|
036a4b1855 | ||
|
56f533b3a0 | ||
|
64bc58a88e | ||
|
3a2db9207d | ||
|
a28f8ad9f1 | ||
|
7b9c29e440 | ||
|
b0d1854efc | ||
|
1da9876486 | ||
|
98d78856f6 | ||
|
ff828749ea | ||
|
d2a7972557 | ||
|
683c99908a | ||
|
c5650148a9 | ||
|
ebc152e4c9 | ||
|
f23afc549b | ||
|
ae6d32c635 | ||
|
88f6fbc897 | ||
|
06acd174f3 | ||
|
5045efa4aa | ||
|
01f3aa9c51 | ||
|
6ff0830d64 | ||
|
5acd472271 | ||
|
7182597e50 | ||
|
eccd798cc2 | ||
|
a6cb9d9222 | ||
|
8ee23dab04 | ||
|
707b706d18 | ||
|
b2db85d8e4 | ||
|
3f83579664 | ||
|
e9d3b1e694 | ||
|
fe550f0738 | ||
|
053778c493 | ||
|
7b63b3de93 | ||
|
2b570a49a9 | ||
|
f9a31ba044 | ||
|
4763a13b07 | ||
|
cae8db6b7e | ||
|
98452cd8ae | ||
|
573ca4a4a7 | ||
|
057bef8a84 | ||
|
22e61c9da4 | ||
|
120394ac92 | ||
|
4223de769e | ||
|
eb1952592e | ||
|
3b9f32e893 | ||
|
9540130c41 | ||
|
0cfc493775 | ||
|
af45f4a558 | ||
|
bf096c9ec3 | ||
|
1f6c220b45 | ||
|
b806e80e66 | ||
|
0a775e1eab | ||
|
f5b0f1351f | ||
|
41db8db0f2 | ||
|
79ace6def6 | ||
|
018a0c1741 | ||
|
8c92701a69 | ||
|
4fb8bddc58 | ||
|
bd5b76d6d0 | ||
|
94b8c0b810 | ||
|
d3d4776202 | ||
|
a1309c5255 | ||
|
07943656a7 | ||
|
cd197181f2 | ||
|
1f7dcf9d75 | ||
|
43126388cd | ||
|
50806e8dec | ||
|
83c7e1f1db | ||
|
4f9eaf77a5 | ||
|
5c9d77600b | ||
|
18acfa7301 | ||
|
a1ec789b0b | ||
|
3f52c016fa | ||
|
a77229c979 | ||
|
a3fd136509 | ||
|
828817b88f | ||
|
2b7a060178 | ||
|
cb986ef597 | ||
|
9905481552 | ||
|
ffe9f60358 | ||
|
d3b374ce59 | ||
|
7727720585 | ||
|
4336a1bc00 | ||
|
d77c34d1d2 | ||
|
b734e0bcc5 | ||
|
ad132bbe48 | ||
|
6a895c6681 | ||
|
55b9b703ea | ||
|
099faa1a2b | ||
|
4f25f5d86c | ||
|
20ad071190 | ||
|
769785c497 |
@@ -42,7 +42,6 @@ LOCAL_CFLAGS += \
|
||||
-DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
|
||||
|
||||
LOCAL_CFLAGS += \
|
||||
-D__STDC_LIMIT_MACROS \
|
||||
-DHAVE___BUILTIN_EXPECT \
|
||||
-DHAVE___BUILTIN_FFS \
|
||||
-DHAVE___BUILTIN_FFSLL \
|
||||
@@ -71,7 +70,7 @@ endif
|
||||
|
||||
ifeq ($(MESA_ENABLE_LLVM),true)
|
||||
LOCAL_CFLAGS += \
|
||||
-DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 \
|
||||
-DHAVE_LLVM=0x0305 -DLLVM_VERSION_PATCH=2 \
|
||||
-D__STDC_CONSTANT_MACROS \
|
||||
-D__STDC_FORMAT_MACROS \
|
||||
-D__STDC_LIMIT_MACROS
|
||||
|
77
configure.ac
77
configure.ac
@@ -74,7 +74,7 @@ LIBDRM_AMDGPU_REQUIRED=2.4.63
|
||||
LIBDRM_INTEL_REQUIRED=2.4.61
|
||||
LIBDRM_NVVIEUX_REQUIRED=2.4.33
|
||||
LIBDRM_NOUVEAU_REQUIRED=2.4.62
|
||||
LIBDRM_FREEDRENO_REQUIRED=2.4.65
|
||||
LIBDRM_FREEDRENO_REQUIRED=2.4.64
|
||||
DRI2PROTO_REQUIRED=2.6
|
||||
DRI3PROTO_REQUIRED=1.0
|
||||
PRESENTPROTO_REQUIRED=1.0
|
||||
@@ -99,6 +99,7 @@ AM_PROG_CC_C_O
|
||||
AM_PROG_AS
|
||||
AX_CHECK_GNU_MAKE
|
||||
AC_CHECK_PROGS([PYTHON2], [python2 python])
|
||||
AC_CHECK_PROGS([PYTHON3], [python3])
|
||||
AC_PROG_SED
|
||||
AC_PROG_MKDIR_P
|
||||
|
||||
@@ -533,32 +534,15 @@ AM_CONDITIONAL(HAVE_COMPAT_SYMLINKS, test "x$HAVE_COMPAT_SYMLINKS" = xyes)
|
||||
dnl
|
||||
dnl library names
|
||||
dnl
|
||||
dnl Unfortunately we need to do a few things that libtool can't help us with,
|
||||
dnl so we need some knowledge of shared library filenames:
|
||||
dnl
|
||||
dnl LIB_EXT is the extension used when creating symlinks for alternate
|
||||
dnl filenames for a shared library which will be dynamically loaded
|
||||
dnl
|
||||
dnl IMP_LIB_EXT is the extension used when checking for the presence of a
|
||||
dnl the file for a shared library we wish to link with
|
||||
dnl
|
||||
case "$host_os" in
|
||||
darwin* )
|
||||
LIB_EXT='dylib'
|
||||
IMP_LIB_EXT=$LIB_EXT
|
||||
;;
|
||||
LIB_EXT='dylib' ;;
|
||||
cygwin* )
|
||||
LIB_EXT='dll'
|
||||
IMP_LIB_EXT='dll.a'
|
||||
;;
|
||||
LIB_EXT='dll' ;;
|
||||
aix* )
|
||||
LIB_EXT='a'
|
||||
IMP_LIB_EXT=$LIB_EXT
|
||||
;;
|
||||
LIB_EXT='a' ;;
|
||||
* )
|
||||
LIB_EXT='so'
|
||||
IMP_LIB_EXT=$LIB_EXT
|
||||
;;
|
||||
LIB_EXT='so' ;;
|
||||
esac
|
||||
|
||||
AC_SUBST([LIB_EXT])
|
||||
@@ -1127,11 +1111,6 @@ AC_MSG_RESULT([$with_sha1])
|
||||
AC_SUBST(SHA1_LIBS)
|
||||
AC_SUBST(SHA1_CFLAGS)
|
||||
|
||||
# Enable a define for SHA1
|
||||
if test "x$with_sha1" != "x"; then
|
||||
DEFINES="$DEFINES -DHAVE_SHA1"
|
||||
fi
|
||||
|
||||
# Allow user to configure out the shader-cache feature
|
||||
AC_ARG_ENABLE([shader-cache],
|
||||
AS_HELP_STRING([--disable-shader-cache], [Disable binary shader cache]),
|
||||
@@ -1311,16 +1290,6 @@ AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
|
||||
AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
|
||||
[DEFINES="${DEFINES} -DGLX_USE_TLS"])
|
||||
|
||||
dnl Read-only text section on x86 hardened platforms
|
||||
AC_ARG_ENABLE([glx-read-only-text],
|
||||
[AS_HELP_STRING([--enable-glx-read-only-text],
|
||||
[Disable writable .text section on x86 (decreases performance) @<:@default=disabled@:>@])],
|
||||
[enable_glx_read_only_text="$enableval"],
|
||||
[enable_glx_read_only_text=no])
|
||||
if test "x$enable_glx_read_only_text" = xyes; then
|
||||
DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl More DRI setup
|
||||
dnl
|
||||
@@ -1549,6 +1518,12 @@ GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
|
||||
AC_SUBST([GBM_PC_REQ_PRIV])
|
||||
AC_SUBST([GBM_PC_LIB_PRIV])
|
||||
|
||||
AM_CONDITIONAL(HAVE_VULKAN, true)
|
||||
|
||||
AC_ARG_VAR([GLSLC], [Path to the glslc executable])
|
||||
AC_CHECK_PROGS([GLSLC], [glslc])
|
||||
AC_SUBST([GLSLC])
|
||||
|
||||
dnl
|
||||
dnl EGL configuration
|
||||
dnl
|
||||
@@ -2083,7 +2058,7 @@ radeon_llvm_check() {
|
||||
if test "x$enable_gallium_llvm" != "xyes"; then
|
||||
AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
|
||||
fi
|
||||
llvm_check_version_for "3" "5" "0" $1
|
||||
llvm_check_version_for "3" "4" "2" $1
|
||||
if test true && $LLVM_CONFIG --targets-built | grep -iqvw $amdgpu_llvm_target_name ; then
|
||||
AC_MSG_ERROR([LLVM $amdgpu_llvm_target_name not enabled in your LLVM build.])
|
||||
fi
|
||||
@@ -2171,8 +2146,11 @@ if test -n "$with_gallium_drivers"; then
|
||||
gallium_require_drm "vc4"
|
||||
gallium_require_drm_loader
|
||||
|
||||
PKG_CHECK_MODULES([SIMPENROSE], [simpenrose],
|
||||
[USE_VC4_SIMULATOR=yes], [USE_VC4_SIMULATOR=no])
|
||||
case "$host_cpu" in
|
||||
i?86 | x86_64 | amd64)
|
||||
USE_VC4_SIMULATOR=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown Gallium driver: $driver])
|
||||
@@ -2192,14 +2170,10 @@ if test "x$MESA_LLVM" != x0; then
|
||||
|
||||
LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`"
|
||||
|
||||
dnl llvm-config may not give the right answer when llvm is a built as a
|
||||
dnl single shared library, so we must work the library name out for
|
||||
dnl ourselves.
|
||||
dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
|
||||
if test "x$enable_llvm_shared_libs" = xyes; then
|
||||
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
|
||||
LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
|
||||
AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
|
||||
AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.so"], [llvm_have_one_so=yes])
|
||||
|
||||
if test "x$llvm_have_one_so" = xyes; then
|
||||
dnl LLVM was built using auto*, so there is only one shared object.
|
||||
@@ -2207,7 +2181,7 @@ if test "x$MESA_LLVM" != x0; then
|
||||
else
|
||||
dnl If LLVM was built with CMake, there will be one shared object per
|
||||
dnl component.
|
||||
AS_IF([test ! -f "$LLVM_LIBDIR/libLLVMTarget.$IMP_LIB_EXT"],
|
||||
AS_IF([test ! -f "$LLVM_LIBDIR/libLLVMTarget.so"],
|
||||
[AC_MSG_ERROR([Could not find llvm shared libraries:
|
||||
Please make sure you have built llvm with the --enable-shared option
|
||||
and that your llvm libraries are installed in $LLVM_LIBDIR
|
||||
@@ -2324,6 +2298,13 @@ AC_SUBST([XA_MINOR], $XA_MINOR)
|
||||
AC_SUBST([XA_TINY], $XA_TINY)
|
||||
AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY")
|
||||
|
||||
PKG_CHECK_MODULES(VALGRIND, [valgrind],
|
||||
[have_valgrind=yes], [have_valgrind=no])
|
||||
if test "x$have_valgrind" = "xyes"; then
|
||||
AC_DEFINE([HAVE_VALGRIND], 1,
|
||||
[Use valgrind intrinsics to suppress false warnings])
|
||||
fi
|
||||
|
||||
dnl Restore LDFLAGS and CPPFLAGS
|
||||
LDFLAGS="$_SAVE_LDFLAGS"
|
||||
CPPFLAGS="$_SAVE_CPPFLAGS"
|
||||
@@ -2433,6 +2414,9 @@ AC_CONFIG_FILES([Makefile
|
||||
src/mesa/drivers/osmesa/osmesa.pc
|
||||
src/mesa/drivers/x11/Makefile
|
||||
src/mesa/main/tests/Makefile
|
||||
src/vulkan/Makefile
|
||||
src/vulkan/anv_icd.json
|
||||
src/vulkan/tests/Makefile
|
||||
src/util/Makefile
|
||||
src/util/tests/hash_table/Makefile])
|
||||
|
||||
@@ -2551,6 +2535,7 @@ if test "x$MESA_LLVM" = x1; then
|
||||
echo ""
|
||||
fi
|
||||
echo " PYTHON2: $PYTHON2"
|
||||
echo " PYTHON3: $PYTHON3"
|
||||
|
||||
echo ""
|
||||
echo " Run '${MAKE-make}' to build Mesa"
|
||||
|
55
docs/GL3.txt
55
docs/GL3.txt
@@ -109,14 +109,14 @@ GL 4.0, GLSL 4.00 --- all DONE: nvc0, radeonsi
|
||||
- Enhanced per-sample shading DONE (r600)
|
||||
- Interpolation functions DONE (r600)
|
||||
- New overload resolution rules DONE
|
||||
GL_ARB_gpu_shader_fp64 DONE (r600, llvmpipe, softpipe)
|
||||
GL_ARB_gpu_shader_fp64 DONE (llvmpipe, softpipe)
|
||||
GL_ARB_sample_shading DONE (i965, nv50, r600)
|
||||
GL_ARB_shader_subroutine DONE (i965, nv50, r600, llvmpipe, softpipe)
|
||||
GL_ARB_tessellation_shader DONE ()
|
||||
GL_ARB_texture_buffer_object_rgb32 DONE (i965, r600, llvmpipe, softpipe)
|
||||
GL_ARB_texture_cube_map_array DONE (i965, nv50, r600, llvmpipe, softpipe)
|
||||
GL_ARB_texture_gather DONE (i965, nv50, r600, llvmpipe, softpipe)
|
||||
GL_ARB_texture_query_lod DONE (i965, nv50, r600, softpipe)
|
||||
GL_ARB_texture_query_lod DONE (i965, nv50, r600)
|
||||
GL_ARB_transform_feedback2 DONE (i965, nv50, r600, llvmpipe, softpipe)
|
||||
GL_ARB_transform_feedback3 DONE (i965, nv50, r600, llvmpipe, softpipe)
|
||||
|
||||
@@ -127,7 +127,7 @@ GL 4.1, GLSL 4.10 --- all DONE: nvc0, radeonsi
|
||||
GL_ARB_get_program_binary DONE (0 binary formats)
|
||||
GL_ARB_separate_shader_objects DONE (all drivers)
|
||||
GL_ARB_shader_precision DONE (all drivers that support GLSL 4.10)
|
||||
GL_ARB_vertex_attrib_64bit DONE (r600, llvmpipe, softpipe)
|
||||
GL_ARB_vertex_attrib_64bit DONE (llvmpipe, softpipe)
|
||||
GL_ARB_viewport_array DONE (i965, nv50, r600, llvmpipe)
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ GL 4.3, GLSL 4.30:
|
||||
GL_ARB_program_interface_query DONE (all drivers)
|
||||
GL_ARB_robust_buffer_access_behavior not started
|
||||
GL_ARB_shader_image_size DONE (i965)
|
||||
GL_ARB_shader_storage_buffer_object DONE (i965)
|
||||
GL_ARB_shader_storage_buffer_object in progress (Iago Toral, Samuel Iglesias)
|
||||
GL_ARB_stencil_texturing DONE (i965/gen8+, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
|
||||
GL_ARB_texture_buffer_range DONE (nv50, nvc0, i965, r600, radeonsi, llvmpipe)
|
||||
GL_ARB_texture_query_levels DONE (all drivers that support GLSL 1.30)
|
||||
@@ -178,13 +178,7 @@ GL 4.4, GLSL 4.40:
|
||||
GL_MAX_VERTEX_ATTRIB_STRIDE DONE (all drivers)
|
||||
GL_ARB_buffer_storage DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_clear_texture DONE (i965) (gallium - in progress, VMware)
|
||||
GL_ARB_enhanced_layouts in progress (Timothy)
|
||||
- compile-time constant expressions in progress
|
||||
- explicit byte offsets for blocks in progress
|
||||
- forced alignment within blocks in progress
|
||||
- specified vec4-slot component numbers in progress
|
||||
- specified transform/feedback layout in progress
|
||||
- input/output block locations in progress
|
||||
GL_ARB_enhanced_layouts not started
|
||||
GL_ARB_multi_bind DONE (all drivers)
|
||||
GL_ARB_query_buffer_object not started
|
||||
GL_ARB_texture_mirror_clamp_to_edge DONE (i965, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
|
||||
@@ -200,8 +194,8 @@ GL 4.5, GLSL 4.50:
|
||||
GL_ARB_derivative_control DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_direct_state_access DONE (all drivers)
|
||||
GL_ARB_get_texture_sub_image DONE (all drivers)
|
||||
GL_ARB_shader_texture_image_samples DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_texture_barrier DONE (i965, nv50, nvc0, r600, radeonsi)
|
||||
GL_ARB_shader_texture_image_samples not started
|
||||
GL_ARB_texture_barrier DONE (nv50, nvc0, r600, radeonsi)
|
||||
GL_KHR_context_flush_control DONE (all - but needs GLX/EGL extension to be useful)
|
||||
GL_KHR_robust_buffer_access_behavior not started
|
||||
GL_KHR_robustness 90% done (the ARB variant)
|
||||
@@ -218,7 +212,7 @@ GLES3.1, GLSL ES 3.1
|
||||
GL_ARB_shader_atomic_counters DONE (i965)
|
||||
GL_ARB_shader_image_load_store DONE (i965)
|
||||
GL_ARB_shader_image_size DONE (i965)
|
||||
GL_ARB_shader_storage_buffer_object DONE (i965)
|
||||
GL_ARB_shader_storage_buffer_object in progress (Iago Toral, Samuel Iglesias)
|
||||
GL_ARB_shading_language_packing DONE (all drivers)
|
||||
GL_ARB_separate_shader_objects DONE (all drivers)
|
||||
GL_ARB_stencil_texturing DONE (i965/gen8+, nv50, nvc0, r600, radeonsi, llvmpipe, softpipe)
|
||||
@@ -229,35 +223,10 @@ GLES3.1, GLSL ES 3.1
|
||||
GS5 Packing/bitfield/conversion functions DONE (i965, nvc0, r600, radeonsi)
|
||||
GL_EXT_shader_integer_mix DONE (all drivers that support GLSL)
|
||||
|
||||
Additional functionality not covered above:
|
||||
glMemoryBarrierByRegion DONE
|
||||
glGetTexLevelParameter[fi]v - needs updates DONE
|
||||
glGetBooleani_v - restrict to GLES enums
|
||||
gl_HelperInvocation support
|
||||
|
||||
GLES3.2, GLSL ES 3.2
|
||||
GL_EXT_color_buffer_float DONE (all drivers)
|
||||
GL_KHR_blend_equation_advanced not started
|
||||
GL_KHR_debug DONE (all drivers)
|
||||
GL_KHR_robustness 90% done (the ARB variant)
|
||||
GL_KHR_texture_compression_astc_ldr DONE (i965/gen9+)
|
||||
GL_OES_copy_image not started (based on GL_ARB_copy_image, which is done for some drivers)
|
||||
GL_OES_draw_buffers_indexed not started
|
||||
GL_OES_draw_elements_base_vertex not started (based on GL_ARB_draw_elements_base_vertex, which is done for all drivers)
|
||||
GL_OES_geometry_shader not started (based on GL_ARB_geometry_shader4, which is done for all drivers)
|
||||
GL_OES_gpu_shader5 not started (based on parts of GL_ARB_gpu_shader5, which is done for some drivers)
|
||||
GL_OES_primitive_bounding box not started
|
||||
GL_OES_sample_shading not started (based on parts of GL_ARB_sample_shading, which is done for some drivers)
|
||||
GL_OES_sample_variables not started (based on parts of GL_ARB_sample_shading, which is done for some drivers)
|
||||
GL_OES_shader_image_atomic not started (based on parts of GL_ARB_shader_image_load_store, which is done for some drivers)
|
||||
GL_OES_shader_io_blocks not started (based on parts of GLSL 1.50, which is done)
|
||||
GL_OES_shader_multisample_interpolation not started (based on parts of GL_ARB_gpu_shader5, which is done)
|
||||
GL_OES_tessellation_shader not started (based on GL_ARB_tessellation_shader, which is done for some drivers)
|
||||
GL_OES_texture_border_clamp not started (based on GL_ARB_texture_border_clamp, which is done)
|
||||
GL_OES_texture_buffer not started (based on GL_ARB_texture_buffer_object, GL_ARB_texture_buffer_range, and GL_ARB_texture_buffer_object_rgb32 that are all done)
|
||||
GL_OES_texture_cube_map_array not started (based on GL_ARB_texture_cube_map_array, which is done for all drivers)
|
||||
GL_OES_texture_stencil8 not started (based on GL_ARB_texture_stencil8, which is done for some drivers)
|
||||
GL_OES_texture_storage_multisample_2d_array DONE (all drivers that support GL_ARB_texture_multisample)
|
||||
Additional functions not covered above:
|
||||
glMemoryBarrierByRegion
|
||||
glGetTexLevelParameter[fi]v - needs updates to restrict to GLES enums
|
||||
glGetBooleani_v - needs updates to restrict to GLES enums
|
||||
|
||||
More info about these features and the work involved can be found at
|
||||
http://dri.freedesktop.org/wiki/MissingFunctionality
|
||||
|
@@ -87,13 +87,6 @@ created in a <code>lib64</code> directory at the top of the Mesa source
|
||||
tree.</p>
|
||||
</dd>
|
||||
|
||||
<dt><code>--sysconfdir=DIR</code></dt>
|
||||
<dd><p>This option specifies the directory where the configuration
|
||||
files will be installed. The default is <code>${prefix}/etc</code>.
|
||||
Currently there's only one config file provided when dri drivers are
|
||||
enabled - it's <code>drirc</code>.</p>
|
||||
</dd>
|
||||
|
||||
<dt><code>--enable-static, --disable-shared</code></dt>
|
||||
<dd><p>By default, Mesa
|
||||
will build shared libraries. Either of these options will force static
|
||||
@@ -224,7 +217,7 @@ GLX.
|
||||
<dt><code>--with-expat=DIR</code>
|
||||
<dd><p><strong>DEPRECATED</strong>, use <code>PKG_CONFIG_PATH</code> instead.</p>
|
||||
<p>The DRI-enabled libGL uses expat to
|
||||
parse the DRI configuration files in <code>${sysconfdir}/drirc</code> and
|
||||
parse the DRI configuration files in <code>/etc/drirc</code> and
|
||||
<code>~/.drirc</code>. This option allows a specific expat installation
|
||||
to be used. For example, <code>--with-expat=/usr/local</code> will
|
||||
search for expat headers and libraries in <code>/usr/local/include</code>
|
||||
|
@@ -153,7 +153,6 @@ See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
|
||||
<li>no16 - suppress generation of 16-wide fragment shaders. useful for debugging broken shaders</li>
|
||||
<li>blorp - emit messages about the blorp operations (blits & clears)</li>
|
||||
<li>nodualobj - suppress generation of dual-object geometry shader code</li>
|
||||
<li>optimizer - dump shader assembly to files at each optimization pass and iteration that make progress</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
@@ -16,72 +16,25 @@
|
||||
|
||||
<h1>News</h1>
|
||||
|
||||
<h2>October 3, 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.6.9.html">Mesa 10.6.9</a> is released.
|
||||
This is a bug-fix release.
|
||||
<br>
|
||||
NOTE: It is anticipated that 10.6.9 will be the final release in the 10.6
|
||||
series. Users of 10.5 are encouraged to migrate to the 11.0 series in order
|
||||
to obtain future fixes.
|
||||
</p>
|
||||
|
||||
<h2>September 28, 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/11.0.2.html">Mesa 11.0.2</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>September 26, 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/11.0.1.html">Mesa 11.0.1</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>September 20, 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.6.8.html">Mesa 10.6.8</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>September 12, 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/11.0.0.html">Mesa 11.0.0</a> is released. This is a new
|
||||
development release. See the release notes for more information about
|
||||
the release.
|
||||
</p>
|
||||
|
||||
<h2>September 10, 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.6.7.html">Mesa 10.6.7</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>September 4, 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.6.6.html">Mesa 10.6.6</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>August 22, 2015</h2>
|
||||
<h2>August 22 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.6.5.html">Mesa 10.6.5</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>August 11, 2015</h2>
|
||||
<h2>August 11 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.6.4.html">Mesa 10.6.4</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>July 26, 2015</h2>
|
||||
<h2>July 26 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.6.3.html">Mesa 10.6.3</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
<h2>July 11, 2015</h2>
|
||||
<h2>July 11 2015</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.6.2.html">Mesa 10.6.2</a> is released.
|
||||
This is a bug-fix release.
|
||||
|
@@ -21,13 +21,6 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="relnotes/10.6.9.html">10.6.9 release notes</a>
|
||||
<li><a href="relnotes/11.0.2.html">11.0.2 release notes</a>
|
||||
<li><a href="relnotes/11.0.1.html">11.0.1 release notes</a>
|
||||
<li><a href="relnotes/10.6.8.html">10.6.8 release notes</a>
|
||||
<li><a href="relnotes/11.0.0.html">11.0.0 release notes</a>
|
||||
<li><a href="relnotes/10.6.7.html">10.6.7 release notes</a>
|
||||
<li><a href="relnotes/10.6.6.html">10.6.6 release notes</a>
|
||||
<li><a href="relnotes/10.6.5.html">10.6.5 release notes</a>
|
||||
<li><a href="relnotes/10.6.4.html">10.6.4 release notes</a>
|
||||
<li><a href="relnotes/10.6.3.html">10.6.3 release notes</a>
|
||||
|
@@ -1,164 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.6.6 Release Notes / September 04, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.6.6 is a bug fix release which fixes bugs found since the 10.6.5 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.6.6 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
416517aa9df4791f97d34451a9e4da33c966afcd18c115c5769b92b15b018ef5 mesa-10.6.6.tar.gz
|
||||
570f2154b7340ff5db61ff103bc6e85165b8958798b78a50fa2df488e98e5778 mesa-10.6.6.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84677">Bug 84677</a> - Triangle disappears with glPolygonMode GL_LINE</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90734">Bug 90734</a> - glBufferSubData is corrupting data when buffer is > 32k</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90748">Bug 90748</a> - [BDW Bisected]dEQP-GLES3.functional.fbo.completeness.renderable.texture.depth.rg_half_float_oes fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90902">Bug 90902</a> - [bsw][regression] dEQP: "Found invalid pixel values"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90925">Bug 90925</a> - "high fidelity": Segfault in _mesa_program_resource_find_name</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91254">Bug 91254</a> - (regresion) video using VA-API on Intel slow and freeze system with mesa 10.6 or 10.6.1</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91292">Bug 91292</a> - [BDW+] glVertexAttribDivisor not working in combination with glPolygonMode</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91673">Bug 91673</a> - Segfault when calling glTexSubImage2D on storage texture to bound FBO</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91726">Bug 91726</a> - R600 asserts in tgsi_cmp/make_src_for_op3</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Chris Wilson (2):</p>
|
||||
<ul>
|
||||
<li>i965: Prevent coordinate overflow in intel_emit_linear_blit</li>
|
||||
<li>i965: Always re-emit the pipeline select during invariant state emission</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Scharrer (1):</p>
|
||||
<ul>
|
||||
<li>mesa: add missing queries for ARB_direct_state_access</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (8):</p>
|
||||
<ul>
|
||||
<li>mesa/arb_gpu_shader_fp64: add support for glGetUniformdv</li>
|
||||
<li>mesa/texgetimage: fix missing stencil check</li>
|
||||
<li>st/readpixels: fix accel path for skipimages.</li>
|
||||
<li>texcompress_s3tc/fxt1: fix stride checks (v1.1)</li>
|
||||
<li>mesa/readpixels: check strides are equal before skipping conversion</li>
|
||||
<li>mesa: enable texture stencil8 for multisample</li>
|
||||
<li>r600/sb: update last_cf for finalize if.</li>
|
||||
<li>r600g: fix calculation for gpr allocation</li>
|
||||
</ul>
|
||||
|
||||
<p>David Heidelberg (1):</p>
|
||||
<ul>
|
||||
<li>st/nine: Require gcc >= 4.6</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 10.6.5</li>
|
||||
<li>get-pick-list.sh: Require explicit "10.6" for nominating stable patches</li>
|
||||
</ul>
|
||||
|
||||
<p>Glenn Kennard (4):</p>
|
||||
<ul>
|
||||
<li>r600g: Fix assert in tgsi_cmp</li>
|
||||
<li>r600g/sb: Handle undef in read port tracker</li>
|
||||
<li>r600g/sb: Don't read junk after EOP</li>
|
||||
<li>r600g/sb: Don't crash on empty if jump target</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (5):</p>
|
||||
<ul>
|
||||
<li>st/mesa: fix assignments with 4-operand arguments (i.e. BFI)</li>
|
||||
<li>st/mesa: pass through 4th opcode argument in bitmap/pixel visitors</li>
|
||||
<li>nv50,nvc0: disable depth bounds test on blit</li>
|
||||
<li>nv50: fix 2d engine blits for 64- and 128-bit formats</li>
|
||||
<li>mesa: only copy the requested teximage faces</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (1):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Split VGRFs after lowering pull constants</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (3):</p>
|
||||
<ul>
|
||||
<li>i965: Fix copy propagation type changes.</li>
|
||||
<li>Revert "i965: Advertise a line width of 40.0 on Cherryview and Skylake."</li>
|
||||
<li>i965: Momentarily pretend to support ARB_texture_stencil8 for blits.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (3):</p>
|
||||
<ul>
|
||||
<li>gallium/radeon: fix the ADDRESS_HI mask for EVENT_WRITE CIK packets</li>
|
||||
<li>mesa: create multisample fallback textures like normal textures</li>
|
||||
<li>radeonsi: fix a Unigine Heaven hang when drirc is missing</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (1):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Handle MRF destinations in lower_integer_multiplication().</li>
|
||||
</ul>
|
||||
|
||||
<p>Neil Roberts (2):</p>
|
||||
<ul>
|
||||
<li>i965: Swap the order of the vertex ID and edge flag attributes</li>
|
||||
<li>i965/bdw: Fix 3DSTATE_VF_INSTANCING when the edge flag is used</li>
|
||||
</ul>
|
||||
|
||||
<p>Tapani Pälli (5):</p>
|
||||
<ul>
|
||||
<li>mesa: update fbo state in glTexStorage</li>
|
||||
<li>glsl: build stageref mask using IR, not symbol table</li>
|
||||
<li>glsl: expose build_program_resource_list function</li>
|
||||
<li>glsl: create program resource list after LinkShader</li>
|
||||
<li>mesa: add GL_RED, GL_RG support for floating point textures</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,75 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.6.7 Release Notes / September 10, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.6.7 is a bug fix release which fixes bugs found since the 10.6.6 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.6.7 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
4ba10c59abee30d72476543a57afd2f33803dabf4620dc333b335d47966ff842 mesa-10.6.7.tar.gz
|
||||
feb1f640b915dada88a7c793dfaff0ae23580f8903f87a6b76469253de0d28d8 mesa-10.6.7.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90751">Bug 90751</a> - [BDW Bisected]dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.stencil_index8 fails</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Dave Airlie (1):</p>
|
||||
<ul>
|
||||
<li>mesa/teximage: use correct extension for accept stencil texture.</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (3):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 10.6.6</li>
|
||||
<li>Revert "i965: Momentarily pretend to support ARB_texture_stencil8 for blits."</li>
|
||||
<li>Update version to 10.6.7</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Handle attribute aliasing in attribute storage limit check.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,136 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.6.8 Release Notes / September 20, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.6.8 is a bug fix release which fixes bugs found since the 10.6.7 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.6.8 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
1f34dba2a8059782e3e4e0f18b9628004e253b2c69085f735b846d2e63c9e250 mesa-10.6.8.tar.gz
|
||||
e36ee5ceeadb3966fb5ce5b4cf18322dbb76a4f075558ae49c3bba94f57d58fd mesa-10.6.8.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90621">Bug 90621</a> - Mesa fail to build from git</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91526">Bug 91526</a> - World of Warcraft (on Wine) has UI corruption with nouveau</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91719">Bug 91719</a> - [SNB,HSW,BYT] dEQP regressions associated with using NIR for vertex shaders</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Alejandro Piñeiro (1):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: fill src_reg type using the constructor type parameter</li>
|
||||
</ul>
|
||||
|
||||
<p>Antia Puentes (1):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: Fix saturation errors when coalescing registers</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 10.6.7</li>
|
||||
<li>cherry-ignore: add commit non applicable for 10.6</li>
|
||||
</ul>
|
||||
|
||||
<p>Hans de Goede (4):</p>
|
||||
<ul>
|
||||
<li>nv30: Fix creation of scanout buffers</li>
|
||||
<li>nv30: Implement color resolve for msaa</li>
|
||||
<li>nv30: Fix max width / height checks in nv30 sifm code</li>
|
||||
<li>nv30: Disable msaa unless requested from the env by NV30_MAX_MSAA</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (2):</p>
|
||||
<ul>
|
||||
<li>mesa: Pass the type to _mesa_uniform_matrix as a glsl_base_type</li>
|
||||
<li>mesa: Don't allow wrong type setters for matrix uniforms</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (5):</p>
|
||||
<ul>
|
||||
<li>st/mesa: don't fall back to 16F when 32F is requested</li>
|
||||
<li>nvc0: always emit a full shader colormask</li>
|
||||
<li>nvc0: remove BGRA4 format support</li>
|
||||
<li>st/mesa: avoid integer overflows with buffers >= 512MB</li>
|
||||
<li>nv50, nvc0: fix max texture buffer size to 128M elements</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (1):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: Don't reswizzle hardware registers</li>
|
||||
</ul>
|
||||
|
||||
<p>Jose Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>gallivm: Workaround LLVM PR23628.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (1):</p>
|
||||
<ul>
|
||||
<li>i965: Momentarily pretend to support ARB_texture_stencil8 for blits.</li>
|
||||
</ul>
|
||||
|
||||
<p>Oded Gabbay (1):</p>
|
||||
<ul>
|
||||
<li>llvmpipe: convert double to long long instead of unsigned long long</li>
|
||||
</ul>
|
||||
|
||||
<p>Ray Strode (1):</p>
|
||||
<ul>
|
||||
<li>gbm: convert gbm bo format to fourcc format on dma-buf import</li>
|
||||
</ul>
|
||||
|
||||
<p>Ulrich Weigand (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix texture compression on big-endian systems</li>
|
||||
</ul>
|
||||
|
||||
<p>Vinson Lee (1):</p>
|
||||
<ul>
|
||||
<li>gallivm: Do not use NoFramePointerElim with LLVM 3.7.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,130 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.6.9 Release Notes / Octover 03, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.6.9 is a bug fix release which fixes bugs found since the 10.6.8 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.6.9 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
3406876aac67546d0c3e2cb97da330b62644c313e7992b95618662e13c54296a mesa-10.6.9.tar.gz
|
||||
b04c4de6280b863babc2929573da17218d92e9e4ba6272d548d135415723e8c3 mesa-10.6.9.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=38109">Bug 38109</a> - i915 driver crashes if too few vertices are submitted (Mesa 7.10.2)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=55552">Bug 55552</a> - Compile errors with --enable-mangling</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86281">Bug 86281</a> - brw_meta_fast_clear (brw=brw@entry=0x7fffd4097a08, fb=fb@entry=0x7fffd40fa900, buffers=buffers@entry=2, partial_clear=partial_clear@entry=false)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91970">Bug 91970</a> - [BSW regression] dEQP-GLES3.functional.shaders.precision.int.highp_mul_vertex</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92072">Bug 92072</a> - Wine breakage since d082c5324 (st/mesa: don't call st_validate_state in BlitFramebuffer)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>st/mesa: try PIPE_BIND_RENDER_TARGET when choosing float texture formats</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Wilson (1):</p>
|
||||
<ul>
|
||||
<li>i965: Remove early release of DRI2 miptree</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (4):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 10.6.8</li>
|
||||
<li>cherry-ignore: add commit non applicable for 10.6</li>
|
||||
<li>cherry-ignore: add commit non applicable for 10.6</li>
|
||||
<li>Update version to 10.6.9</li>
|
||||
</ul>
|
||||
|
||||
<p>Iago Toral Quiroga (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE for default framebuffer.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (5):</p>
|
||||
<ul>
|
||||
<li>t_dd_dmatmp: Make "count" actually be the count</li>
|
||||
<li>t_dd_dmatmp: Clean up improper code formatting from previous patch</li>
|
||||
<li>t_dd_dmatmp: Use '& 3' instead of '% 4' everywhere</li>
|
||||
<li>t_dd_dmatmp: Pull out common 'count -= count & 3' code</li>
|
||||
<li>t_dd_dmatmp: Use addition instead of subtraction in loop bounds</li>
|
||||
</ul>
|
||||
|
||||
<p>Jeremy Huddleston (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: Add support to enable read-only text segment on x86.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg Kristensen (1):</p>
|
||||
<ul>
|
||||
<li>i965: Respect stride and subreg_offset for ATTR registers</li>
|
||||
</ul>
|
||||
|
||||
<p>Kyle Brenneman (3):</p>
|
||||
<ul>
|
||||
<li>glx: Fix build errors with --enable-mangling (v2)</li>
|
||||
<li>mapi: Make _glapi_get_stub work with "gl" or "mgl" prefix.</li>
|
||||
<li>glx: Don't hard-code the name "libGL.so.1" in driOpenDriver (v3)</li>
|
||||
</ul>
|
||||
|
||||
<p>Leo Liu (1):</p>
|
||||
<ul>
|
||||
<li>radeon/vce: fix vui time_scale zero error</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (1):</p>
|
||||
<ul>
|
||||
<li>st/mesa: fix front buffer regression after dropping st_validate_state in Blit</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix mipmap generation for immutable, compressed textures</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -14,7 +14,7 @@
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 11.0.0 Release Notes / September 12, 2015</h1>
|
||||
<h1>Mesa 11.0.0 Release Notes / TBD</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.0.0 is a new development release.
|
||||
@@ -33,8 +33,7 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
7d7e4ddffa3b162506efa01e2cc41e329caa4995336b92e5cc21f2e1fb36c1b3 mesa-11.0.0.tar.gz
|
||||
e095a3eb2eca9dfde7efca8946527c8ae20a0cc938a8c78debc7f158ad44af32 mesa-11.0.0.tar.xz
|
||||
TBD.
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -84,175 +83,13 @@ Note: some of the new features are only available with certain drivers.
|
||||
<li>EGL 1.5 on r600, radeonsi, nv50, nvc0</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=51658">Bug 51658</a> - r200 (& possibly radeon) DRI fixes for gnome shell on Mesa 8.0.3</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65525">Bug 65525</a> - [llvmpipe] lp_scene.h:210:lp_scene_alloc: Assertion `size <= (64 * 1024)' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66346">Bug 66346</a> - shader_query.cpp:49: error: invalid conversion from 'void*' to 'GLuint'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73512">Bug 73512</a> - [clover] mesa.icd. should contain full path</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=73528">Bug 73528</a> - Deferred lighting in Second Life causes system hiccups and screen flickering</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74329">Bug 74329</a> - Please expose OES_texture_float and OES_texture_half_float on the ES3 context</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80500">Bug 80500</a> - Flickering shadows in unreleased title trace</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=82186">Bug 82186</a> - [r600g] BARTS GPU lockup with minecraft shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84225">Bug 84225</a> - Allow constant-index-expression sampler array indexing with GLSL-ES < 300</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84677">Bug 84677</a> - Triangle disappears with glPolygonMode GL_LINE</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85252">Bug 85252</a> - Segfault in compiler while processing ternary operator with void arguments</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89131">Bug 89131</a> - [Bisected] Graphical corruption in Weston, shows old framebuffer pieces</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90000">Bug 90000</a> - [i965 Bisected NIR] Piglit/gglean_fragprog1-z-write_test fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90073">Bug 90073</a> - Leaks in xcb_dri3_open_reply_fds() and get_render_node_from_id_path_tag</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90249">Bug 90249</a> - Fails to build egl_dri2 on osx</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90310">Bug 90310</a> - Fails to build gallium_dri.so at linking stage with clang because of multiple redefinitions</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90347">Bug 90347</a> - [NVE0+] Failure to insert texbar under some circumstances (causing bad colors in Terasology)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90466">Bug 90466</a> - arm: linker error ndefined reference to `nir_metadata_preserve'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90520">Bug 90520</a> - Register spilling clobbers registers used elsewhere in the shader</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90537">Bug 90537</a> - radeonsi bo/va conflict on RADEON_GEM_VA (rscreen->ws->buffer_from_handle returns NULL)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90547">Bug 90547</a> - [BDW/BSW/SKL Bisected]Piglit/glean@vertprog1-rsq_test_2_(reciprocal_square_root_of_negative_value) fais</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90580">Bug 90580</a> - [HSW bisected] integer multiplication bug</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90600">Bug 90600</a> - IOError: [Errno 2] No such file or directory: 'gl_API.xml'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90621">Bug 90621</a> - Mesa fail to build from git</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90629">Bug 90629</a> - [i965] SIMD16 dual_source_blend assertion `src[i].file != GRF || src[i].width == dst.width' failed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90691">Bug 90691</a> - [BSW]Piglit/spec/nv_conditional_render/dlist fails intermittently</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90728">Bug 90728</a> - dvd playback with vlc and vdpau causes segmentation fault</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90734">Bug 90734</a> - glBufferSubData is corrupting data when buffer is > 32k</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90748">Bug 90748</a> - [BDW Bisected]dEQP-GLES3.functional.fbo.completeness.renderable.texture.depth.rg_half_float_oes fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90749">Bug 90749</a> - [BDW Bisected]dEQP-GLES3.functional.rasterization.fbo.rbo_multisample_max.primitives.lines_wide fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90751">Bug 90751</a> - [BDW Bisected]dEQP-GLES3.functional.fbo.completeness.renderable.texture.stencil.stencil_index8 fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90797">Bug 90797</a> - [ALL bisected] Mesa change cause performance case manhattan fail.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90817">Bug 90817</a> - swrast fails to load with certain remote X servers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90830">Bug 90830</a> - [bsw bisected regression] GPU hang for spec.arb_gpu_shader5.execution.sampler_array_indexing.vs-nonzero-base</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90839">Bug 90839</a> - [10.5.5/10.6 regression, bisected] PBO glDrawPixels no longer using blit fastpath</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90873">Bug 90873</a> - Kernel hang, TearFree On, Mate desktop environment</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90887">Bug 90887</a> - PhiMovesPass in register allocator broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90895">Bug 90895</a> - [IVB/HSW/BDW/BSW Bisected] GLB2.7 Egypt, GfxBench3.0 T-Rex & ALU and many SynMark cases performance reduced by 10-23%</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90902">Bug 90902</a> - [bsw][regression] dEQP: "Found invalid pixel values"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90903">Bug 90903</a> - egl_dri2.c:dri2_load fails to load libglapi on osx</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90904">Bug 90904</a> - OSX: EXC_BAD_ACCESS when using translate_sse + gallium + softpipe/llvmpipe</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90905">Bug 90905</a> - mesa: Finish subdir-objects transition</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90925">Bug 90925</a> - "high fidelity": Segfault in _mesa_program_resource_find_name</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91022">Bug 91022</a> - [g45 g965 bisected] assertions generated from textureGrad cube samplers fix</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91047">Bug 91047</a> - [SNB Bisected] Messed up Fog in Super Smash Bros. Melee in Dolphin</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91056">Bug 91056</a> - The Bard's Tale (2005, native) has rendering issues</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91077">Bug 91077</a> - dri2_glx.c:1186: undefined reference to `loader_open_device'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91099">Bug 91099</a> - [llvmpipe] piglit glsl-max-varyings >max_varying_components regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91101">Bug 91101</a> - [softpipe] piglit glsl-1.50@execution@geometry@max-input-components regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91117">Bug 91117</a> - Nimbus (running in wine) has rendering issues, objects are semi-transparent</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91124">Bug 91124</a> - Civilization V (in Wine) has rendering issues: text missing, menu bar corrupted</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91173">Bug 91173</a> - Oddworld: Stranger's Wrath HD: disfigured models in wrong colors</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91193">Bug 91193</a> - [290x] Dota2 reborn ingame rendering breaks with git-af4b9c7</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91222">Bug 91222</a> - lp_test_format regression on CentOS 7</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91226">Bug 91226</a> - Crash in glLinkProgram (NEW)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91231">Bug 91231</a> - [NV92] Psychonauts (native) segfaults on start when DRI3 enabled</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91254">Bug 91254</a> - (regresion) video using VA-API on Intel slow and freeze system with mesa 10.6 or 10.6.1</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91290">Bug 91290</a> - SIGSEGV glcpp/glcpp-parse.y:1077</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91292">Bug 91292</a> - [BDW+] glVertexAttribDivisor not working in combination with glPolygonMode</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91337">Bug 91337</a> - OSMesaGetProcAdress("OSMesaPixelStore") returns nil</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91418">Bug 91418</a> - Visual Studio 2015 vsnprintf build error</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91425">Bug 91425</a> - [regression, bisected] Piglit spec/ext_packed_float/ getteximage-invalid-format-for-packed-type fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91441">Bug 91441</a> - make check DispatchSanity_test.GL30 regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91444">Bug 91444</a> - regression bisected radeonsi: don't change pipe_resource in resource_copy_region</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91461">Bug 91461</a> - gl_TessLevel* writes have no effect for all but the last TCS invocation</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91513">Bug 91513</a> - [IVB/HSW/BDW/SKL Bisected] Lightsmark performance reduced by 7%-10%</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91526">Bug 91526</a> - World of Warcraft (on Wine) has UI corruption with nouveau</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91544">Bug 91544</a> - [i965, regression, bisected] regression of several tests in 93977d3a151675946c03e</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91551">Bug 91551</a> - DXTn compressed normal maps produce severe artifacts on all NV5x and NVDx chipsets</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91570">Bug 91570</a> - Upgrading mesa to 10.6 causes segfault in OpenGL applications with GeForce4 MX 440 / AGP 8X</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91591">Bug 91591</a> - rounding.h:102:2: error: #error "Unsupported or undefined LONG_BIT"</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91610">Bug 91610</a> - [BSW] GPU hang for spec.shaders.point-vertex-id gl_instanceid divisor</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91673">Bug 91673</a> - Segfault when calling glTexSubImage2D on storage texture to bound FBO</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91726">Bug 91726</a> - R600 asserts in tgsi_cmp/make_src_for_op3</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91847">Bug 91847</a> - glGenerateTextureMipmap not working (no errors) unless glActiveTexture(GL_TEXTURE1) is called before</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91857">Bug 91857</a> - Mesa 10.6.3 linker is slow</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91881">Bug 91881</a> - regression: GPU lockups since mesa-11.0.0_rc1 on RV620 (r600) driver</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91890">Bug 91890</a> - [nve7] witcher2: blurry image & DATA_ERRORs (class 0xa097 mthd 0x2380/0x238c)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
TBD.
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<li>Removed the EGL loader from the Linux SCons build.</li>
|
||||
TBD.
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
@@ -1,134 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 11.0.1 Release Notes / September 26, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.0.1 is a bug fix release which fixes bugs found since the 11.0.0 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 11.0.1 implements the OpenGL 4.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 4.1. OpenGL
|
||||
4.1 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
6dab262877e12c0546a0e2970c6835a0f217e6d4026ccecb3cd5dd733d1ce867 mesa-11.0.1.tar.gz
|
||||
43d0dfcd1f1e36f07f8228cd76d90175d3fc74c1ed25d7071794a100a98ef2a6 mesa-11.0.1.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=38109">Bug 38109</a> - i915 driver crashes if too few vertices are submitted (Mesa 7.10.2)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91114">Bug 91114</a> - ES3-CTS.gtf.GL3Tests.shadow.shadow_execution_vert fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91716">Bug 91716</a> - [bisected] piglit.shaders.glsl-vs-int-attrib regresses on 32 bit BYT, HSW, IVB, SNB</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91719">Bug 91719</a> - [SNB,HSW,BYT] dEQP regressions associated with using NIR for vertex shaders</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92009">Bug 92009</a> - ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels fails</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Antia Puentes (2):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: Fix saturation errors when coalescing registers</li>
|
||||
<li>i965/vec4_nir: Load constants as integers</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (1):</p>
|
||||
<ul>
|
||||
<li>meta: Abort meta pbo path if TexSubImage need signed unsigned conversion</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 11.0.0</li>
|
||||
<li>Update version to 11.0.1</li>
|
||||
</ul>
|
||||
|
||||
<p>Iago Toral Quiroga (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE for default framebuffer.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (5):</p>
|
||||
<ul>
|
||||
<li>t_dd_dmatmp: Make "count" actually be the count</li>
|
||||
<li>t_dd_dmatmp: Clean up improper code formatting from previous patch</li>
|
||||
<li>t_dd_dmatmp: Use '& 3' instead of '% 4' everywhere</li>
|
||||
<li>t_dd_dmatmp: Pull out common 'count -= count & 3' code</li>
|
||||
<li>t_dd_dmatmp: Use addition instead of subtraction in loop bounds</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (6):</p>
|
||||
<ul>
|
||||
<li>st/mesa: avoid integer overflows with buffers >= 512MB</li>
|
||||
<li>nv50, nvc0: fix max texture buffer size to 128M elements</li>
|
||||
<li>freedreno/a3xx: fix blending of L8 format</li>
|
||||
<li>nv50,nvc0: detect underlying resource changes and update tic</li>
|
||||
<li>nv50,nvc0: flush texture cache in presence of coherent bufs</li>
|
||||
<li>radeonsi: load fmask ptr relative to the resources array</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (2):</p>
|
||||
<ul>
|
||||
<li>nir: Fix a bunch of ralloc parenting errors</li>
|
||||
<li>i965/vec4: Don't reswizzle hardware registers</li>
|
||||
</ul>
|
||||
|
||||
<p>Jeremy Huddleston (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: Add support to enable read-only text segment on x86.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ray Strode (1):</p>
|
||||
<ul>
|
||||
<li>gbm: convert gbm bo format to fourcc format on dma-buf import</li>
|
||||
</ul>
|
||||
|
||||
<p>Tapani Pälli (2):</p>
|
||||
<ul>
|
||||
<li>mesa: fix errors when reading depth with glReadPixels</li>
|
||||
<li>i965: fix textureGrad for cubemaps</li>
|
||||
</ul>
|
||||
|
||||
<p>Ulrich Weigand (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix texture compression on big-endian systems</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,85 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 11.0.2 Release Notes / September 28, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.0.2 is a bug fix release which fixes bugs found since the 11.0.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 11.0.2 implements the OpenGL 4.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 4.1. OpenGL
|
||||
4.1 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
45170773500d6ae2f9eb93fc85efee69f7c97084411ada4eddf92f78bca56d20 mesa-11.0.2.tar.gz
|
||||
fce11fb27eb87adf1e620a76455d635c6136dfa49ae58c53b34ef8d0c7b7eae4 mesa-11.0.2.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91582">Bug 91582</a> - [bisected] Regression in DEQP gles2.functional.negative_api.texture.texsubimage2d_neg_offset</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91970">Bug 91970</a> - [BSW regression] dEQP-GLES3.functional.shaders.precision.int.highp_mul_vertex</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92095">Bug 92095</a> - [Regression, bisected] arb_shader_atomic_counters.compiler.builtins.frag</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Eduardo Lima Mitev (3):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix order of format+type and internal format checks for glTexImageXD ops</li>
|
||||
<li>mesa: Move _mesa_base_tex_format() from teximage to glformats files</li>
|
||||
<li>mesa: Use the effective internal format instead for validation</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (2):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 11.0.1</li>
|
||||
<li>Update version to 11.0.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg Kristensen (1):</p>
|
||||
<ul>
|
||||
<li>i965: Respect stride and subreg_offset for ATTR registers</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Expose gl_MaxTess{Control,Evaluation}AtomicCounters.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -44,14 +44,7 @@ Note: some of the new features are only available with certain drivers.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>GL_ARB_blend_func_extended on freedreno (a3xx)</li>
|
||||
<li>GL_ARB_gpu_shader_fp64 on r600 for Cypress/Cayman/Aruba chips</li>
|
||||
<li>GL_ARB_shader_storage_buffer_object on i965</li>
|
||||
<li>GL_ARB_shader_texture_image_samples on i965, nv50, nvc0, r600, radeonsi</li>
|
||||
<li>GL_ARB_texture_barrier / GL_NV_texture_barrier on i965</li>
|
||||
<li>GL_ARB_texture_query_lod on softpipe</li>
|
||||
<li>EGL_KHR_create_context on softpipe, llvmpipe</li>
|
||||
<li>EGL_KHR_gl_colorspace on softpipe, llvmpipe</li>
|
||||
TBD.
|
||||
</ul>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
@@ -63,20 +63,6 @@ execution. These are generally used for debugging.
|
||||
Example: export MESA_GLSL=dump,nopt
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Shaders can be dumped and replaced on runtime for debugging purposes. Mesa
|
||||
needs to be configured with '--with-sha1' to enable this functionality. This
|
||||
feature is not currently supported by SCons build.
|
||||
|
||||
This is controlled via following environment variables:
|
||||
<ul>
|
||||
<li><b>MESA_SHADER_DUMP_PATH</b> - path where shader sources are dumped
|
||||
<li><b>MESA_SHADER_READ_PATH</b> - path where replacement shaders are read
|
||||
</ul>
|
||||
Note, path set must exist before running for dumping or replacing to work.
|
||||
When both are set, these paths should be different so the dumped shaders do
|
||||
not clobber the replacement shaders.
|
||||
</p>
|
||||
|
||||
<h2 id="support">GLSL Version</h2>
|
||||
|
||||
|
@@ -26,31 +26,6 @@ VMware Workstation running on Linux or Windows and VMware Fusion running on
|
||||
MacOS are all supported.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
With the August 2015 Workstation 12 / Fusion 8 releases, OpenGL 3.3
|
||||
is supported in the guest.
|
||||
This requires:
|
||||
<ul>
|
||||
<li>The VM is configured for virtual hardware version 12.
|
||||
<li>The host OS, GPU and graphics driver supports DX11 (Windows) or
|
||||
OpenGL 4.0 (Linux, Mac)
|
||||
<li>On Linux, the vmwgfx kernel module must be version 2.9.0 or later.
|
||||
<li>A recent version of Mesa with the updated svga gallium driver.
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Otherwise, OpenGL 2.1 is supported.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
OpenGL 3.3 support can be disabled by setting the environment variable
|
||||
SVGA_VGPU10=0.
|
||||
You will then have OpenGL 2.1 support.
|
||||
This may be useful to work around application bugs (such as incorrect use
|
||||
of the OpenGL 3.x core profile).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Most modern Linux distros include the SVGA3D driver so end users shouldn't
|
||||
be concerned with this information.
|
||||
@@ -252,16 +227,6 @@ If you don't see this, try setting this environment variable:
|
||||
then rerun glxinfo and examine the output for error messages.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If OpenGL 3.3 is not working (you only get OpenGL 2.1):
|
||||
</p>
|
||||
<ul>
|
||||
<li>Make sure the VM uses hardware version 12.
|
||||
<li>Make sure the vmwgfx kernel module is version 2.9.0 or later.
|
||||
<li>Check the vmware.log file for errors.
|
||||
<li>Run 'dmesg | grep vmwgfx' and look for "DX: yes".
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -102,8 +102,9 @@ call_once(once_flag *flag, void (*func)(void))
|
||||
static inline int
|
||||
cnd_broadcast(cnd_t *cond)
|
||||
{
|
||||
assert(cond != NULL);
|
||||
return (pthread_cond_broadcast(cond) == 0) ? thrd_success : thrd_error;
|
||||
if (!cond) return thrd_error;
|
||||
pthread_cond_broadcast(cond);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.3.2
|
||||
@@ -118,16 +119,18 @@ cnd_destroy(cnd_t *cond)
|
||||
static inline int
|
||||
cnd_init(cnd_t *cond)
|
||||
{
|
||||
assert(cond != NULL);
|
||||
return (pthread_cond_init(cond, NULL) == 0) ? thrd_success : thrd_error;
|
||||
if (!cond) return thrd_error;
|
||||
pthread_cond_init(cond, NULL);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.3.4
|
||||
static inline int
|
||||
cnd_signal(cnd_t *cond)
|
||||
{
|
||||
assert(cond != NULL);
|
||||
return (pthread_cond_signal(cond) == 0) ? thrd_success : thrd_error;
|
||||
if (!cond) return thrd_error;
|
||||
pthread_cond_signal(cond);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
// 7.25.3.5
|
||||
@@ -136,14 +139,7 @@ cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt)
|
||||
{
|
||||
struct timespec abs_time;
|
||||
int rt;
|
||||
|
||||
assert(mtx != NULL);
|
||||
assert(cond != NULL);
|
||||
assert(xt != NULL);
|
||||
|
||||
abs_time.tv_sec = xt->sec;
|
||||
abs_time.tv_nsec = xt->nsec;
|
||||
|
||||
if (!cond || !mtx || !xt) return thrd_error;
|
||||
rt = pthread_cond_timedwait(cond, mtx, &abs_time);
|
||||
if (rt == ETIMEDOUT)
|
||||
return thrd_busy;
|
||||
@@ -154,9 +150,9 @@ cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt)
|
||||
static inline int
|
||||
cnd_wait(cnd_t *cond, mtx_t *mtx)
|
||||
{
|
||||
assert(mtx != NULL);
|
||||
assert(cond != NULL);
|
||||
return (pthread_cond_wait(cond, mtx) == 0) ? thrd_success : thrd_error;
|
||||
if (!cond || !mtx) return thrd_error;
|
||||
pthread_cond_wait(cond, mtx);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +161,7 @@ cnd_wait(cnd_t *cond, mtx_t *mtx)
|
||||
static inline void
|
||||
mtx_destroy(mtx_t *mtx)
|
||||
{
|
||||
assert(mtx != NULL);
|
||||
assert(mtx);
|
||||
pthread_mutex_destroy(mtx);
|
||||
}
|
||||
|
||||
@@ -174,7 +170,7 @@ static inline int
|
||||
mtx_init(mtx_t *mtx, int type)
|
||||
{
|
||||
pthread_mutexattr_t attr;
|
||||
assert(mtx != NULL);
|
||||
if (!mtx) return thrd_error;
|
||||
if (type != mtx_plain && type != mtx_timed && type != mtx_try
|
||||
&& type != (mtx_plain|mtx_recursive)
|
||||
&& type != (mtx_timed|mtx_recursive)
|
||||
@@ -192,8 +188,9 @@ mtx_init(mtx_t *mtx, int type)
|
||||
static inline int
|
||||
mtx_lock(mtx_t *mtx)
|
||||
{
|
||||
assert(mtx != NULL);
|
||||
return (pthread_mutex_lock(mtx) == 0) ? thrd_success : thrd_error;
|
||||
if (!mtx) return thrd_error;
|
||||
pthread_mutex_lock(mtx);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
static inline int
|
||||
@@ -206,9 +203,7 @@ thrd_yield(void);
|
||||
static inline int
|
||||
mtx_timedlock(mtx_t *mtx, const xtime *xt)
|
||||
{
|
||||
assert(mtx != NULL);
|
||||
assert(xt != NULL);
|
||||
|
||||
if (!mtx || !xt) return thrd_error;
|
||||
{
|
||||
#ifdef EMULATED_THREADS_USE_NATIVE_TIMEDLOCK
|
||||
struct timespec ts;
|
||||
@@ -238,7 +233,7 @@ mtx_timedlock(mtx_t *mtx, const xtime *xt)
|
||||
static inline int
|
||||
mtx_trylock(mtx_t *mtx)
|
||||
{
|
||||
assert(mtx != NULL);
|
||||
if (!mtx) return thrd_error;
|
||||
return (pthread_mutex_trylock(mtx) == 0) ? thrd_success : thrd_busy;
|
||||
}
|
||||
|
||||
@@ -246,8 +241,9 @@ mtx_trylock(mtx_t *mtx)
|
||||
static inline int
|
||||
mtx_unlock(mtx_t *mtx)
|
||||
{
|
||||
assert(mtx != NULL);
|
||||
return (pthread_mutex_unlock(mtx) == 0) ? thrd_success : thrd_error;
|
||||
if (!mtx) return thrd_error;
|
||||
pthread_mutex_unlock(mtx);
|
||||
return thrd_success;
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +253,7 @@ static inline int
|
||||
thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
|
||||
{
|
||||
struct impl_thrd_param *pack;
|
||||
assert(thr != NULL);
|
||||
if (!thr) return thrd_error;
|
||||
pack = (struct impl_thrd_param *)malloc(sizeof(struct impl_thrd_param));
|
||||
if (!pack) return thrd_nomem;
|
||||
pack->func = func;
|
||||
@@ -333,7 +329,7 @@ thrd_yield(void)
|
||||
static inline int
|
||||
tss_create(tss_t *key, tss_dtor_t dtor)
|
||||
{
|
||||
assert(key != NULL);
|
||||
if (!key) return thrd_error;
|
||||
return (pthread_key_create(key, dtor) == 0) ? thrd_success : thrd_error;
|
||||
}
|
||||
|
||||
|
90
include/vulkan/vk_platform.h
Normal file
90
include/vulkan/vk_platform.h
Normal file
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// File: vk_platform.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2014-2015 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE 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
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __VK_PLATFORM_H__
|
||||
#define __VK_PLATFORM_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
/*
|
||||
***************************************************************************************************
|
||||
* Platform-specific directives and type declarations
|
||||
***************************************************************************************************
|
||||
*/
|
||||
|
||||
#if defined(_WIN32)
|
||||
// On Windows, VKAPI should equate to the __stdcall convention
|
||||
#define VKAPI __stdcall
|
||||
#elif defined(__GNUC__)
|
||||
// On other platforms using GCC, VKAPI stays undefined
|
||||
#define VKAPI
|
||||
#else
|
||||
// Unsupported Platform!
|
||||
#error "Unsupported OS Platform detected!"
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#if !defined(VK_NO_STDINT_H)
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#endif // !defined(VK_NO_STDINT_H)
|
||||
|
||||
typedef uint64_t VkDeviceSize;
|
||||
typedef uint32_t VkBool32;
|
||||
|
||||
typedef uint32_t VkSampleMask;
|
||||
typedef uint32_t VkFlags;
|
||||
|
||||
#if (UINTPTR_MAX >= UINT64_MAX)
|
||||
#define VK_UINTPTRLEAST64_MAX UINTPTR_MAX
|
||||
|
||||
typedef uintptr_t VkUintPtrLeast64;
|
||||
#else
|
||||
#define VK_UINTPTRLEAST64_MAX UINT64_MAX
|
||||
|
||||
typedef uint64_t VkUintPtrLeast64;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __VK_PLATFORM_H__
|
249
include/vulkan/vk_wsi_device_swapchain.h
Normal file
249
include/vulkan/vk_wsi_device_swapchain.h
Normal file
@@ -0,0 +1,249 @@
|
||||
//
|
||||
// File: vk_wsi_device_swapchain.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2014 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE 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
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#ifndef __VK_WSI_DEVICE_SWAPCHAIN_H__
|
||||
#define __VK_WSI_DEVICE_SWAPCHAIN_H__
|
||||
|
||||
#include "vulkan.h"
|
||||
|
||||
#define VK_WSI_DEVICE_SWAPCHAIN_REVISION 40
|
||||
#define VK_WSI_DEVICE_SWAPCHAIN_EXTENSION_NUMBER 2
|
||||
#define VK_WSI_DEVICE_SWAPCHAIN_EXTENSION_NAME "VK_WSI_device_swapchain"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Objects
|
||||
|
||||
VK_DEFINE_NONDISP_HANDLE(VkSwapChainWSI);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Enumeration constants
|
||||
|
||||
#define VK_WSI_DEVICE_SWAPCHAIN_ENUM(type,id) ((type)((int)0xc0000000 - VK_WSI_DEVICE_SWAPCHAIN_EXTENSION_NUMBER * -1024 + (id)))
|
||||
#define VK_WSI_DEVICE_SWAPCHAIN_ENUM_POSITIVE(type,id) ((type)((int)0x40000000 + (VK_WSI_DEVICE_SWAPCHAIN_EXTENSION_NUMBER - 1) * 1024 + (id)))
|
||||
|
||||
// Extend VkStructureType enum with extension specific constants
|
||||
#define VK_STRUCTURE_TYPE_SWAP_CHAIN_CREATE_INFO_WSI VK_WSI_DEVICE_SWAPCHAIN_ENUM(VkStructureType, 0)
|
||||
#define VK_STRUCTURE_TYPE_QUEUE_PRESENT_INFO_WSI VK_WSI_DEVICE_SWAPCHAIN_ENUM(VkStructureType, 1)
|
||||
|
||||
// Extend VkImageLayout enum with extension specific constants
|
||||
#define VK_IMAGE_LAYOUT_PRESENT_SOURCE_WSI VK_WSI_DEVICE_SWAPCHAIN_ENUM(VkImageLayout, 2)
|
||||
|
||||
// Extend VkResult enum with extension specific constants
|
||||
// Return codes for successful operation execution
|
||||
#define VK_SUBOPTIMAL_WSI VK_WSI_DEVICE_SWAPCHAIN_ENUM_POSITIVE(VkResult, 3)
|
||||
// Error codes
|
||||
#define VK_ERROR_OUT_OF_DATE_WSI VK_WSI_DEVICE_SWAPCHAIN_ENUM(VkResult, 4)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Enumerations
|
||||
|
||||
typedef enum VkSurfaceTransformWSI_
|
||||
{
|
||||
VK_SURFACE_TRANSFORM_NONE_WSI = 0,
|
||||
VK_SURFACE_TRANSFORM_ROT90_WSI = 1,
|
||||
VK_SURFACE_TRANSFORM_ROT180_WSI = 2,
|
||||
VK_SURFACE_TRANSFORM_ROT270_WSI = 3,
|
||||
VK_SURFACE_TRANSFORM_HMIRROR_WSI = 4,
|
||||
VK_SURFACE_TRANSFORM_HMIRROR_ROT90_WSI = 5,
|
||||
VK_SURFACE_TRANSFORM_HMIRROR_ROT180_WSI = 6,
|
||||
VK_SURFACE_TRANSFORM_HMIRROR_ROT270_WSI = 7,
|
||||
VK_SURFACE_TRANSFORM_INHERIT_WSI = 8,
|
||||
} VkSurfaceTransformWSI;
|
||||
|
||||
typedef enum VkSurfaceTransformFlagBitsWSI_
|
||||
{
|
||||
VK_SURFACE_TRANSFORM_NONE_BIT_WSI = 0x00000001,
|
||||
VK_SURFACE_TRANSFORM_ROT90_BIT_WSI = 0x00000002,
|
||||
VK_SURFACE_TRANSFORM_ROT180_BIT_WSI = 0x00000004,
|
||||
VK_SURFACE_TRANSFORM_ROT270_BIT_WSI = 0x00000008,
|
||||
VK_SURFACE_TRANSFORM_HMIRROR_BIT_WSI = 0x00000010,
|
||||
VK_SURFACE_TRANSFORM_HMIRROR_ROT90_BIT_WSI = 0x00000020,
|
||||
VK_SURFACE_TRANSFORM_HMIRROR_ROT180_BIT_WSI = 0x00000040,
|
||||
VK_SURFACE_TRANSFORM_HMIRROR_ROT270_BIT_WSI = 0x00000080,
|
||||
VK_SURFACE_TRANSFORM_INHERIT_BIT_WSI = 0x00000100,
|
||||
} VkSurfaceTransformFlagBitsWSI;
|
||||
typedef VkFlags VkSurfaceTransformFlagsWSI;
|
||||
|
||||
typedef enum VkSurfaceInfoTypeWSI_
|
||||
{
|
||||
VK_SURFACE_INFO_TYPE_PROPERTIES_WSI = 0,
|
||||
VK_SURFACE_INFO_TYPE_FORMATS_WSI = 1,
|
||||
VK_SURFACE_INFO_TYPE_PRESENT_MODES_WSI = 2,
|
||||
VK_SURFACE_INFO_TYPE_BEGIN_RANGE_WSI = VK_SURFACE_INFO_TYPE_PROPERTIES_WSI,
|
||||
VK_SURFACE_INFO_TYPE_END_RANGE_WSI = VK_SURFACE_INFO_TYPE_PRESENT_MODES_WSI,
|
||||
VK_SURFACE_INFO_TYPE_NUM_WSI = (VK_SURFACE_INFO_TYPE_PRESENT_MODES_WSI - VK_SURFACE_INFO_TYPE_PROPERTIES_WSI + 1),
|
||||
VK_SURFACE_INFO_TYPE_MAX_ENUM_WSI = 0x7FFFFFFF
|
||||
} VkSurfaceInfoTypeWSI;
|
||||
|
||||
typedef enum VkSwapChainInfoTypeWSI_
|
||||
{
|
||||
VK_SWAP_CHAIN_INFO_TYPE_IMAGES_WSI = 0,
|
||||
VK_SWAP_CHAIN_INFO_TYPE_BEGIN_RANGE_WSI = VK_SWAP_CHAIN_INFO_TYPE_IMAGES_WSI,
|
||||
VK_SWAP_CHAIN_INFO_TYPE_END_RANGE_WSI = VK_SWAP_CHAIN_INFO_TYPE_IMAGES_WSI,
|
||||
VK_SWAP_CHAIN_INFO_TYPE_NUM_WSI = (VK_SWAP_CHAIN_INFO_TYPE_IMAGES_WSI - VK_SWAP_CHAIN_INFO_TYPE_IMAGES_WSI + 1),
|
||||
VK_SWAP_CHAIN_INFO_TYPE_MAX_ENUM_WSI = 0x7FFFFFFF
|
||||
} VkSwapChainInfoTypeWSI;
|
||||
|
||||
typedef enum VkPresentModeWSI_
|
||||
{
|
||||
VK_PRESENT_MODE_IMMEDIATE_WSI = 0,
|
||||
VK_PRESENT_MODE_MAILBOX_WSI = 1,
|
||||
VK_PRESENT_MODE_FIFO_WSI = 2,
|
||||
VK_PRESENT_MODE_BEGIN_RANGE_WSI = VK_PRESENT_MODE_IMMEDIATE_WSI,
|
||||
VK_PRESENT_MODE_END_RANGE_WSI = VK_PRESENT_MODE_FIFO_WSI,
|
||||
VK_PRESENT_MODE_NUM = (VK_PRESENT_MODE_FIFO_WSI - VK_PRESENT_MODE_IMMEDIATE_WSI + 1),
|
||||
VK_PRESENT_MODE_MAX_ENUM_WSI = 0x7FFFFFFF
|
||||
} VkPresentModeWSI;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Flags
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Structures
|
||||
|
||||
typedef struct VkSurfacePropertiesWSI_
|
||||
{
|
||||
uint32_t minImageCount; // Supported minimum number of images for the surface
|
||||
uint32_t maxImageCount; // Supported maximum number of images for the surface, 0 for unlimited
|
||||
|
||||
VkExtent2D currentExtent; // Current image width and height for the surface, (-1, -1) if undefined.
|
||||
VkExtent2D minImageExtent; // Supported minimum image width and height for the surface
|
||||
VkExtent2D maxImageExtent; // Supported maximum image width and height for the surface
|
||||
|
||||
VkSurfaceTransformFlagsWSI supportedTransforms;// 1 or more bits representing the transforms supported
|
||||
VkSurfaceTransformWSI currentTransform; // The surface's current transform relative to the device's natural orientation.
|
||||
|
||||
uint32_t maxImageArraySize; // Supported maximum number of image layers for the surface
|
||||
|
||||
VkImageUsageFlags supportedUsageFlags;// Supported image usage flags for the surface
|
||||
} VkSurfacePropertiesWSI;
|
||||
|
||||
typedef struct VkSurfaceFormatPropertiesWSI_
|
||||
{
|
||||
VkFormat format; // Supported rendering format for the surface
|
||||
} VkSurfaceFormatPropertiesWSI;
|
||||
|
||||
typedef struct VkSurfacePresentModePropertiesWSI_
|
||||
{
|
||||
VkPresentModeWSI presentMode; // Supported presention mode for the surface
|
||||
} VkSurfacePresentModePropertiesWSI;
|
||||
|
||||
typedef struct VkSwapChainCreateInfoWSI_
|
||||
{
|
||||
VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SWAP_CHAIN_CREATE_INFO_WSI
|
||||
const void* pNext; // Pointer to next structure
|
||||
|
||||
const VkSurfaceDescriptionWSI* pSurfaceDescription;// describes the swap chain's target surface
|
||||
|
||||
uint32_t minImageCount; // Minimum number of presentation images the application needs
|
||||
VkFormat imageFormat; // Format of the presentation images
|
||||
VkExtent2D imageExtent; // Dimensions of the presentation images
|
||||
VkImageUsageFlags imageUsageFlags; // Bits indicating how the presentation images will be used
|
||||
VkSurfaceTransformWSI preTransform; // The transform, relative to the device's natural orientation, applied to the image content prior to presentation
|
||||
uint32_t imageArraySize; // Determines the number of views for multiview/stereo presentation
|
||||
|
||||
VkPresentModeWSI presentMode; // Which presentation mode to use for presents on this swap chain.
|
||||
|
||||
VkSwapChainWSI oldSwapChain; // Existing swap chain to replace, if any.
|
||||
|
||||
VkBool32 clipped; // Specifies whether presentable images may be affected by window clip regions.
|
||||
} VkSwapChainCreateInfoWSI;
|
||||
|
||||
typedef struct VkSwapChainImagePropertiesWSI_
|
||||
{
|
||||
VkImage image; // Persistent swap chain image handle
|
||||
} VkSwapChainImagePropertiesWSI;
|
||||
|
||||
typedef struct VkPresentInfoWSI_
|
||||
{
|
||||
VkStructureType sType; // Must be VK_STRUCTURE_TYPE_QUEUE_PRESENT_INFO_WSI
|
||||
const void* pNext; // Pointer to next structure
|
||||
uint32_t swapChainCount; // Number of swap chains to present in this call
|
||||
const VkSwapChainWSI* swapChains; // Swap chains to present an image from.
|
||||
const uint32_t* imageIndices; // Indices of which swapChain images to present
|
||||
} VkPresentInfoWSI;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Function types
|
||||
|
||||
typedef VkResult (VKAPI *PFN_vkGetSurfaceInfoWSI)(VkDevice device, const VkSurfaceDescriptionWSI* pSurfaceDescription, VkSurfaceInfoTypeWSI infoType, size_t* pDataSize, void* pData);
|
||||
typedef VkResult (VKAPI *PFN_vkCreateSwapChainWSI)(VkDevice device, const VkSwapChainCreateInfoWSI* pCreateInfo, VkSwapChainWSI* pSwapChain);
|
||||
typedef VkResult (VKAPI *PFN_vkDestroySwapChainWSI)(VkDevice device, VkSwapChainWSI swapChain);
|
||||
typedef VkResult (VKAPI *PFN_vkGetSwapChainInfoWSI)(VkDevice device, VkSwapChainWSI swapChain, VkSwapChainInfoTypeWSI infoType, size_t* pDataSize, void* pData);
|
||||
typedef VkResult (VKAPI *PFN_vkAcquireNextImageWSI)(VkDevice device, VkSwapChainWSI swapChain, uint64_t timeout, VkSemaphore semaphore, uint32_t* pImageIndex);
|
||||
typedef VkResult (VKAPI *PFN_vkQueuePresentWSI)(VkQueue queue, VkPresentInfoWSI* pPresentInfo);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Function prototypes
|
||||
|
||||
#ifdef VK_PROTOTYPES
|
||||
|
||||
VkResult VKAPI vkGetSurfaceInfoWSI(
|
||||
VkDevice device,
|
||||
const VkSurfaceDescriptionWSI* pSurfaceDescription,
|
||||
VkSurfaceInfoTypeWSI infoType,
|
||||
size_t* pDataSize,
|
||||
void* pData);
|
||||
|
||||
VkResult VKAPI vkCreateSwapChainWSI(
|
||||
VkDevice device,
|
||||
const VkSwapChainCreateInfoWSI* pCreateInfo,
|
||||
VkSwapChainWSI* pSwapChain);
|
||||
|
||||
VkResult VKAPI vkDestroySwapChainWSI(
|
||||
VkDevice device,
|
||||
VkSwapChainWSI swapChain);
|
||||
|
||||
VkResult VKAPI vkGetSwapChainInfoWSI(
|
||||
VkDevice device,
|
||||
VkSwapChainWSI swapChain,
|
||||
VkSwapChainInfoTypeWSI infoType,
|
||||
size_t* pDataSize,
|
||||
void* pData);
|
||||
|
||||
VkResult VKAPI vkAcquireNextImageWSI(
|
||||
VkDevice device,
|
||||
VkSwapChainWSI swapChain,
|
||||
uint64_t timeout,
|
||||
VkSemaphore semaphore,
|
||||
uint32_t* pImageIndex);
|
||||
|
||||
VkResult VKAPI vkQueuePresentWSI(
|
||||
VkQueue queue,
|
||||
VkPresentInfoWSI* pPresentInfo);
|
||||
|
||||
#endif // VK_PROTOTYPES
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __VK_WSI_SWAPCHAIN_H__
|
133
include/vulkan/vk_wsi_swapchain.h
Normal file
133
include/vulkan/vk_wsi_swapchain.h
Normal file
@@ -0,0 +1,133 @@
|
||||
//
|
||||
// File: vk_wsi_swapchain.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2014 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE 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
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#ifndef __VK_WSI_SWAPCHAIN_H__
|
||||
#define __VK_WSI_SWAPCHAIN_H__
|
||||
|
||||
#include "vulkan.h"
|
||||
|
||||
#define VK_WSI_SWAPCHAIN_REVISION 12
|
||||
#define VK_WSI_SWAPCHAIN_EXTENSION_NUMBER 1
|
||||
#define VK_WSI_SWAPCHAIN_EXTENSION_NAME "VK_WSI_swapchain"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Objects
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Enumeration constants
|
||||
|
||||
#define VK_WSI_SWAPCHAIN_ENUM(type,id) ((type)((int)0xc0000000 - VK_WSI_SWAPCHAIN_EXTENSION_NUMBER * -1024 + (id)))
|
||||
#define VK_WSI_SWAPCHAIN_ENUM_POSITIVE(type,id) ((type)((int)0x40000000 + (VK_WSI_SWAPCHAIN_EXTENSION_NUMBER - 1) * 1024 + (id)))
|
||||
|
||||
// Extend VkStructureType enum with extension specific constants
|
||||
#define VK_STRUCTURE_TYPE_SURFACE_DESCRIPTION_WINDOW_WSI VK_WSI_SWAPCHAIN_ENUM(VkStructureType, 0)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Enumerations
|
||||
|
||||
typedef enum VkPlatformWSI_
|
||||
{
|
||||
VK_PLATFORM_WIN32_WSI = 0,
|
||||
VK_PLATFORM_X11_WSI = 1,
|
||||
VK_PLATFORM_XCB_WSI = 2,
|
||||
VK_PLATFORM_ANDROID_WSI = 3,
|
||||
VK_PLATFORM_WAYLAND_WSI = 4,
|
||||
VK_PLATFORM_MIR_WSI = 5,
|
||||
VK_PLATFORM_BEGIN_RANGE_WSI = VK_PLATFORM_WIN32_WSI,
|
||||
VK_PLATFORM_END_RANGE_WSI = VK_PLATFORM_MIR_WSI,
|
||||
VK_PLATFORM_NUM_WSI = (VK_PLATFORM_MIR_WSI - VK_PLATFORM_WIN32_WSI + 1),
|
||||
VK_PLATFORM_MAX_ENUM_WSI = 0x7FFFFFFF
|
||||
} VkPlatformWSI;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Flags
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Structures
|
||||
|
||||
// pPlatformHandle points to this struct when platform is VK_PLATFORM_X11_WSI
|
||||
#ifdef _X11_XLIB_H_
|
||||
typedef struct VkPlatformHandleX11WSI_
|
||||
{
|
||||
Display* dpy; // Display connection to an X server
|
||||
Window root; // To identify the X screen
|
||||
} VkPlatformHandleX11WSI;
|
||||
#endif /* _X11_XLIB_H_ */
|
||||
|
||||
// pPlatformHandle points to this struct when platform is VK_PLATFORM_XCB_WSI
|
||||
#ifdef __XCB_H__
|
||||
typedef struct VkPlatformHandleXcbWSI_
|
||||
{
|
||||
xcb_connection_t* connection; // XCB connection to an X server
|
||||
xcb_window_t root; // To identify the X screen
|
||||
} VkPlatformHandleXcbWSI;
|
||||
#endif /* __XCB_H__ */
|
||||
|
||||
// Placeholder structure header for the different types of surface description structures
|
||||
typedef struct VkSurfaceDescriptionWSI_
|
||||
{
|
||||
VkStructureType sType; // Can be any of the VK_STRUCTURE_TYPE_SURFACE_DESCRIPTION_XXX_WSI constants
|
||||
const void* pNext; // Pointer to next structure
|
||||
} VkSurfaceDescriptionWSI;
|
||||
|
||||
// Surface description structure for a native platform window surface
|
||||
typedef struct VkSurfaceDescriptionWindowWSI_
|
||||
{
|
||||
VkStructureType sType; // Must be VK_STRUCTURE_TYPE_SURFACE_DESCRIPTION_WINDOW_WSI
|
||||
const void* pNext; // Pointer to next structure
|
||||
VkPlatformWSI platform; // e.g. VK_PLATFORM_*_WSI
|
||||
void* pPlatformHandle;
|
||||
void* pPlatformWindow;
|
||||
} VkSurfaceDescriptionWindowWSI;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Function types
|
||||
|
||||
typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceSurfaceSupportWSI)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, const VkSurfaceDescriptionWSI* pSurfaceDescription, VkBool32* pSupported);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Function prototypes
|
||||
|
||||
#ifdef VK_PROTOTYPES
|
||||
|
||||
VkResult VKAPI vkGetPhysicalDeviceSurfaceSupportWSI(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
const VkSurfaceDescriptionWSI* pSurfaceDescription,
|
||||
VkBool32* pSupported);
|
||||
|
||||
#endif // VK_PROTOTYPES
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __VK_WSI_SWAPCHAIN_H__
|
3054
include/vulkan/vulkan.h
Normal file
3054
include/vulkan/vulkan.h
Normal file
File diff suppressed because it is too large
Load Diff
61
include/vulkan/vulkan_intel.h
Normal file
61
include/vulkan/vulkan_intel.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright © 2015 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.
|
||||
*/
|
||||
|
||||
#ifndef __VULKAN_INTEL_H__
|
||||
#define __VULKAN_INTEL_H__
|
||||
|
||||
#include "vulkan.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
#define VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL 1024
|
||||
typedef struct VkDmaBufImageCreateInfo_
|
||||
{
|
||||
VkStructureType sType; // Must be VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL
|
||||
const void* pNext; // Pointer to next structure.
|
||||
int fd;
|
||||
VkFormat format;
|
||||
VkExtent3D extent; // Depth must be 1
|
||||
uint32_t strideInBytes;
|
||||
} VkDmaBufImageCreateInfo;
|
||||
|
||||
typedef VkResult (VKAPI *PFN_vkCreateDmaBufImageINTEL)(VkDevice device, const VkDmaBufImageCreateInfo* pCreateInfo, VkDeviceMemory* pMem, VkImage* pImage);
|
||||
|
||||
#ifdef VK_PROTOTYPES
|
||||
|
||||
VkResult VKAPI vkCreateDmaBufImageINTEL(
|
||||
VkDevice _device,
|
||||
const VkDmaBufImageCreateInfo* pCreateInfo,
|
||||
VkDeviceMemory* pMem,
|
||||
VkImage* pImage);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __VULKAN_INTEL_H__
|
@@ -53,6 +53,10 @@ EXTRA_DIST = \
|
||||
AM_CFLAGS = $(VISIBILITY_CFLAGS)
|
||||
AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
|
||||
|
||||
if HAVE_VULKAN
|
||||
SUBDIRS += vulkan
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/include/ \
|
||||
-I$(top_srcdir)/src/mapi/ \
|
||||
|
@@ -8,7 +8,6 @@ env = env.Clone()
|
||||
|
||||
env.Append(CPPPATH = [
|
||||
'#/include',
|
||||
'#/include/HaikuGL',
|
||||
'#/src/egl/main',
|
||||
'#/src',
|
||||
])
|
||||
|
@@ -27,7 +27,6 @@
|
||||
|
||||
#define WL_HIDE_DEPRECATED
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
@@ -131,10 +130,12 @@ const __DRIconfig *
|
||||
dri2_get_dri_config(struct dri2_egl_config *conf, EGLint surface_type,
|
||||
EGLenum colorspace)
|
||||
{
|
||||
const bool srgb = colorspace == EGL_GL_COLORSPACE_SRGB_KHR;
|
||||
|
||||
return surface_type == EGL_WINDOW_BIT ? conf->dri_double_config[srgb] :
|
||||
conf->dri_single_config[srgb];
|
||||
if (colorspace == EGL_GL_COLORSPACE_SRGB_KHR)
|
||||
return surface_type == EGL_WINDOW_BIT ? conf->dri_srgb_double_config :
|
||||
conf->dri_srgb_single_config;
|
||||
else
|
||||
return surface_type == EGL_WINDOW_BIT ? conf->dri_double_config :
|
||||
conf->dri_single_config;
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
@@ -282,10 +283,14 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
if (num_configs == 1) {
|
||||
conf = (struct dri2_egl_config *) matching_config;
|
||||
|
||||
if (double_buffer && !conf->dri_double_config[srgb])
|
||||
conf->dri_double_config[srgb] = dri_config;
|
||||
else if (!double_buffer && !conf->dri_single_config[srgb])
|
||||
conf->dri_single_config[srgb] = dri_config;
|
||||
if (double_buffer && srgb && !conf->dri_srgb_double_config)
|
||||
conf->dri_srgb_double_config = dri_config;
|
||||
else if (double_buffer && !srgb && !conf->dri_double_config)
|
||||
conf->dri_double_config = dri_config;
|
||||
else if (!double_buffer && srgb && !conf->dri_srgb_single_config)
|
||||
conf->dri_srgb_single_config = dri_config;
|
||||
else if (!double_buffer && !srgb && !conf->dri_single_config)
|
||||
conf->dri_single_config = dri_config;
|
||||
else
|
||||
/* a similar config type is already added (unlikely) => discard */
|
||||
return NULL;
|
||||
@@ -295,13 +300,18 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
|
||||
if (conf == NULL)
|
||||
return NULL;
|
||||
|
||||
if (double_buffer)
|
||||
conf->dri_double_config[srgb] = dri_config;
|
||||
else
|
||||
conf->dri_single_config[srgb] = dri_config;
|
||||
|
||||
memcpy(&conf->base, &base, sizeof base);
|
||||
conf->base.SurfaceType = 0;
|
||||
if (double_buffer) {
|
||||
if (srgb)
|
||||
conf->dri_srgb_double_config = dri_config;
|
||||
else
|
||||
conf->dri_double_config = dri_config;
|
||||
} else {
|
||||
if (srgb)
|
||||
conf->dri_srgb_single_config = dri_config;
|
||||
else
|
||||
conf->dri_single_config = dri_config;
|
||||
}
|
||||
conf->base.ConfigID = config_id;
|
||||
|
||||
_eglLinkConfig(&conf->base);
|
||||
@@ -578,8 +588,7 @@ dri2_setup_screen(_EGLDisplay *disp)
|
||||
__DRI2_RENDERER_HAS_FRAMEBUFFER_SRGB))
|
||||
disp->Extensions.KHR_gl_colorspace = EGL_TRUE;
|
||||
|
||||
if ((dri2_dpy->dri2 && dri2_dpy->dri2->base.version >= 3) ||
|
||||
(dri2_dpy->swrast && dri2_dpy->swrast->base.version >= 3)) {
|
||||
if (dri2_dpy->dri2 && dri2_dpy->dri2->base.version >= 3) {
|
||||
disp->Extensions.KHR_create_context = EGL_TRUE;
|
||||
|
||||
if (dri2_dpy->robustness)
|
||||
@@ -775,7 +784,7 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
if (dri2_dpy->own_dri_screen)
|
||||
dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen);
|
||||
if (dri2_dpy->fd >= 0)
|
||||
if (dri2_dpy->fd)
|
||||
close(dri2_dpy->fd);
|
||||
if (dri2_dpy->driver)
|
||||
dlclose(dri2_dpy->driver);
|
||||
@@ -893,55 +902,6 @@ dri2_create_context_attribs_error(int dri_error)
|
||||
_eglError(egl_error, "dri2_create_context");
|
||||
}
|
||||
|
||||
static bool
|
||||
dri2_fill_context_attribs(struct dri2_egl_context *dri2_ctx,
|
||||
struct dri2_egl_display *dri2_dpy,
|
||||
uint32_t *ctx_attribs,
|
||||
unsigned *num_attribs)
|
||||
{
|
||||
int pos = 0;
|
||||
|
||||
assert(*num_attribs >= 8);
|
||||
|
||||
ctx_attribs[pos++] = __DRI_CTX_ATTRIB_MAJOR_VERSION;
|
||||
ctx_attribs[pos++] = dri2_ctx->base.ClientMajorVersion;
|
||||
ctx_attribs[pos++] = __DRI_CTX_ATTRIB_MINOR_VERSION;
|
||||
ctx_attribs[pos++] = dri2_ctx->base.ClientMinorVersion;
|
||||
|
||||
if (dri2_ctx->base.Flags != 0) {
|
||||
/* If the implementation doesn't support the __DRI2_ROBUSTNESS
|
||||
* extension, don't even try to send it the robust-access flag.
|
||||
* It may explode. Instead, generate the required EGL error here.
|
||||
*/
|
||||
if ((dri2_ctx->base.Flags & EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR) != 0
|
||||
&& !dri2_dpy->robustness) {
|
||||
_eglError(EGL_BAD_MATCH, "eglCreateContext");
|
||||
return false;
|
||||
}
|
||||
|
||||
ctx_attribs[pos++] = __DRI_CTX_ATTRIB_FLAGS;
|
||||
ctx_attribs[pos++] = dri2_ctx->base.Flags;
|
||||
}
|
||||
|
||||
if (dri2_ctx->base.ResetNotificationStrategy != EGL_NO_RESET_NOTIFICATION_KHR) {
|
||||
/* If the implementation doesn't support the __DRI2_ROBUSTNESS
|
||||
* extension, don't even try to send it a reset strategy. It may
|
||||
* explode. Instead, generate the required EGL error here.
|
||||
*/
|
||||
if (!dri2_dpy->robustness) {
|
||||
_eglError(EGL_BAD_CONFIG, "eglCreateContext");
|
||||
return false;
|
||||
}
|
||||
|
||||
ctx_attribs[pos++] = __DRI_CTX_ATTRIB_RESET_STRATEGY;
|
||||
ctx_attribs[pos++] = __DRI_CTX_RESET_LOSE_CONTEXT;
|
||||
}
|
||||
|
||||
*num_attribs = pos;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called via eglCreateContext(), drv->API.CreateContext().
|
||||
*/
|
||||
@@ -1010,10 +970,10 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
* doubleBufferMode check in
|
||||
* src/mesa/main/context.c:check_compatible()
|
||||
*/
|
||||
if (dri2_config->dri_double_config[0])
|
||||
dri_config = dri2_config->dri_double_config[0];
|
||||
if (dri2_config->dri_double_config)
|
||||
dri_config = dri2_config->dri_double_config;
|
||||
else
|
||||
dri_config = dri2_config->dri_single_config[0];
|
||||
dri_config = dri2_config->dri_single_config;
|
||||
|
||||
/* EGL_WINDOW_BIT is set only when there is a dri_double_config. This
|
||||
* makes sure the back buffer will always be used.
|
||||
@@ -1027,12 +987,44 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
if (dri2_dpy->dri2) {
|
||||
if (dri2_dpy->dri2->base.version >= 3) {
|
||||
unsigned error;
|
||||
unsigned num_attribs = 8;
|
||||
unsigned num_attribs = 0;
|
||||
uint32_t ctx_attribs[8];
|
||||
|
||||
if (!dri2_fill_context_attribs(dri2_ctx, dri2_dpy, ctx_attribs,
|
||||
&num_attribs))
|
||||
goto cleanup;
|
||||
ctx_attribs[num_attribs++] = __DRI_CTX_ATTRIB_MAJOR_VERSION;
|
||||
ctx_attribs[num_attribs++] = dri2_ctx->base.ClientMajorVersion;
|
||||
ctx_attribs[num_attribs++] = __DRI_CTX_ATTRIB_MINOR_VERSION;
|
||||
ctx_attribs[num_attribs++] = dri2_ctx->base.ClientMinorVersion;
|
||||
|
||||
if (dri2_ctx->base.Flags != 0) {
|
||||
/* If the implementation doesn't support the __DRI2_ROBUSTNESS
|
||||
* extension, don't even try to send it the robust-access flag.
|
||||
* It may explode. Instead, generate the required EGL error here.
|
||||
*/
|
||||
if ((dri2_ctx->base.Flags & EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR) != 0
|
||||
&& !dri2_dpy->robustness) {
|
||||
_eglError(EGL_BAD_MATCH, "eglCreateContext");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ctx_attribs[num_attribs++] = __DRI_CTX_ATTRIB_FLAGS;
|
||||
ctx_attribs[num_attribs++] = dri2_ctx->base.Flags;
|
||||
}
|
||||
|
||||
if (dri2_ctx->base.ResetNotificationStrategy != EGL_NO_RESET_NOTIFICATION_KHR) {
|
||||
/* If the implementation doesn't support the __DRI2_ROBUSTNESS
|
||||
* extension, don't even try to send it a reset strategy. It may
|
||||
* explode. Instead, generate the required EGL error here.
|
||||
*/
|
||||
if (!dri2_dpy->robustness) {
|
||||
_eglError(EGL_BAD_CONFIG, "eglCreateContext");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ctx_attribs[num_attribs++] = __DRI_CTX_ATTRIB_RESET_STRATEGY;
|
||||
ctx_attribs[num_attribs++] = __DRI_CTX_RESET_LOSE_CONTEXT;
|
||||
}
|
||||
|
||||
assert(num_attribs <= ARRAY_SIZE(ctx_attribs));
|
||||
|
||||
dri2_ctx->dri_context =
|
||||
dri2_dpy->dri2->createContextAttribs(dri2_dpy->dri_screen,
|
||||
@@ -1054,33 +1046,12 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
}
|
||||
} else {
|
||||
assert(dri2_dpy->swrast);
|
||||
if (dri2_dpy->swrast->base.version >= 3) {
|
||||
unsigned error;
|
||||
unsigned num_attribs = 8;
|
||||
uint32_t ctx_attribs[8];
|
||||
|
||||
if (!dri2_fill_context_attribs(dri2_ctx, dri2_dpy, ctx_attribs,
|
||||
&num_attribs))
|
||||
goto cleanup;
|
||||
|
||||
dri2_ctx->dri_context =
|
||||
dri2_dpy->swrast->createContextAttribs(dri2_dpy->dri_screen,
|
||||
api,
|
||||
dri_config,
|
||||
shared,
|
||||
num_attribs / 2,
|
||||
ctx_attribs,
|
||||
& error,
|
||||
dri2_ctx);
|
||||
dri2_create_context_attribs_error(error);
|
||||
} else {
|
||||
dri2_ctx->dri_context =
|
||||
dri2_dpy->swrast->createNewContextForAPI(dri2_dpy->dri_screen,
|
||||
api,
|
||||
dri_config,
|
||||
shared,
|
||||
dri2_ctx);
|
||||
}
|
||||
dri2_ctx->dri_context =
|
||||
dri2_dpy->swrast->createNewContextForAPI(dri2_dpy->dri_screen,
|
||||
api,
|
||||
dri_config,
|
||||
shared,
|
||||
dri2_ctx);
|
||||
}
|
||||
|
||||
if (!dri2_ctx->dri_context)
|
||||
@@ -2413,18 +2384,13 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
|
||||
unsigned wait_flags = 0;
|
||||
EGLint ret = EGL_CONDITION_SATISFIED_KHR;
|
||||
|
||||
/* The EGL_KHR_fence_sync spec states:
|
||||
*
|
||||
* "If no context is current for the bound API,
|
||||
* the EGL_SYNC_FLUSH_COMMANDS_BIT_KHR bit is ignored.
|
||||
*/
|
||||
if (dri2_ctx && flags & EGL_SYNC_FLUSH_COMMANDS_BIT_KHR)
|
||||
if (flags & EGL_SYNC_FLUSH_COMMANDS_BIT_KHR)
|
||||
wait_flags |= __DRI2_FENCE_FLAG_FLUSH_COMMANDS;
|
||||
|
||||
/* the sync object should take a reference while waiting */
|
||||
dri2_egl_ref_sync(dri2_sync);
|
||||
|
||||
if (dri2_dpy->fence->client_wait_sync(dri2_ctx ? dri2_ctx->dri_context : NULL,
|
||||
if (dri2_dpy->fence->client_wait_sync(dri2_ctx->dri_context,
|
||||
dri2_sync->fence, wait_flags,
|
||||
timeout))
|
||||
dri2_sync->base.SyncStatus = EGL_SIGNALED_KHR;
|
||||
|
@@ -284,8 +284,10 @@ struct dri2_egl_surface
|
||||
struct dri2_egl_config
|
||||
{
|
||||
_EGLConfig base;
|
||||
const __DRIconfig *dri_single_config[2];
|
||||
const __DRIconfig *dri_double_config[2];
|
||||
const __DRIconfig *dri_single_config;
|
||||
const __DRIconfig *dri_double_config;
|
||||
const __DRIconfig *dri_srgb_single_config;
|
||||
const __DRIconfig *dri_srgb_double_config;
|
||||
};
|
||||
|
||||
struct dri2_egl_image
|
||||
|
@@ -101,7 +101,6 @@ dri2_drm_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
struct dri2_egl_surface *dri2_surf;
|
||||
struct gbm_surface *window = native_window;
|
||||
struct gbm_dri_surface *surf;
|
||||
const __DRIconfig *config;
|
||||
|
||||
(void) drv;
|
||||
|
||||
@@ -131,20 +130,21 @@ dri2_drm_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
goto cleanup_surf;
|
||||
}
|
||||
|
||||
config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
|
||||
dri2_surf->base.GLColorspace);
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
const __DRIconfig *config =
|
||||
dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
|
||||
dri2_surf->base.GLColorspace);
|
||||
|
||||
dri2_surf->dri_drawable =
|
||||
(*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen, config,
|
||||
dri2_surf->gbm_surf);
|
||||
|
||||
} else {
|
||||
assert(dri2_dpy->swrast != NULL);
|
||||
|
||||
dri2_surf->dri_drawable =
|
||||
(*dri2_dpy->swrast->createNewDrawable)(dri2_dpy->dri_screen, config,
|
||||
dri2_surf->gbm_surf);
|
||||
(*dri2_dpy->swrast->createNewDrawable) (dri2_dpy->dri_screen,
|
||||
dri2_conf->dri_double_config,
|
||||
dri2_surf->gbm_surf);
|
||||
|
||||
}
|
||||
if (dri2_surf->dri_drawable == NULL) {
|
||||
@@ -623,19 +623,27 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
dri2_dpy->own_device = 1;
|
||||
gbm = gbm_create_device(fd);
|
||||
if (gbm == NULL)
|
||||
goto cleanup;
|
||||
} else {
|
||||
fd = fcntl(gbm_device_get_fd(gbm), F_DUPFD_CLOEXEC, 3);
|
||||
if (fd < 0)
|
||||
goto cleanup;
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
if (strcmp(gbm_device_get_backend_name(gbm), "drm") != 0)
|
||||
goto cleanup;
|
||||
if (strcmp(gbm_device_get_backend_name(gbm), "drm") != 0) {
|
||||
free(dri2_dpy);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
dri2_dpy->gbm_dri = gbm_dri_device(gbm);
|
||||
if (dri2_dpy->gbm_dri->base.type != GBM_DRM_DRIVER_TYPE_DRI)
|
||||
goto cleanup;
|
||||
if (dri2_dpy->gbm_dri->base.type != GBM_DRM_DRIVER_TYPE_DRI) {
|
||||
free(dri2_dpy);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
if (fd < 0) {
|
||||
fd = fcntl(gbm_device_get_fd(gbm), F_DUPFD_CLOEXEC, 3);
|
||||
if (fd < 0) {
|
||||
free(dri2_dpy);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
dri2_dpy->fd = fd;
|
||||
dri2_dpy->device_name = loader_get_device_name_for_fd(dri2_dpy->fd);
|
||||
@@ -719,11 +727,4 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
dri2_dpy->vtbl = &dri2_drm_display_vtbl;
|
||||
|
||||
return EGL_TRUE;
|
||||
|
||||
cleanup:
|
||||
if (fd >= 0)
|
||||
close(fd);
|
||||
|
||||
free(dri2_dpy);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
@@ -1645,7 +1645,6 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
|
||||
struct wl_egl_window *window = native_window;
|
||||
struct dri2_egl_surface *dri2_surf;
|
||||
const __DRIconfig *config;
|
||||
|
||||
(void) drv;
|
||||
|
||||
@@ -1670,12 +1669,10 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
dri2_surf->base.Width = -1;
|
||||
dri2_surf->base.Height = -1;
|
||||
|
||||
config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
|
||||
dri2_surf->base.GLColorspace);
|
||||
|
||||
dri2_surf->dri_drawable =
|
||||
(*dri2_dpy->swrast->createNewDrawable)(dri2_dpy->dri_screen,
|
||||
config, dri2_surf);
|
||||
(*dri2_dpy->swrast->createNewDrawable) (dri2_dpy->dri_screen,
|
||||
dri2_conf->dri_double_config,
|
||||
dri2_surf);
|
||||
if (dri2_surf->dri_drawable == NULL) {
|
||||
_eglError(EGL_BAD_ALLOC, "swrast->createNewDrawable");
|
||||
goto cleanup_dri_drawable;
|
||||
@@ -1807,7 +1804,6 @@ dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
if (roundtrip(dri2_dpy) < 0 || dri2_dpy->formats == 0)
|
||||
goto cleanup_shm;
|
||||
|
||||
dri2_dpy->fd = -1;
|
||||
dri2_dpy->driver_name = strdup("swrast");
|
||||
if (!dri2_load_driver_swrast(disp))
|
||||
goto cleanup_shm;
|
||||
|
@@ -206,7 +206,6 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
xcb_generic_error_t *error;
|
||||
xcb_drawable_t drawable;
|
||||
xcb_screen_t *screen;
|
||||
const __DRIconfig *config;
|
||||
|
||||
STATIC_ASSERT(sizeof(uintptr_t) == sizeof(native_surface));
|
||||
drawable = (uintptr_t) native_surface;
|
||||
@@ -246,18 +245,19 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
|
||||
dri2_surf->drawable = drawable;
|
||||
}
|
||||
|
||||
config = dri2_get_dri_config(dri2_conf, type,
|
||||
dri2_surf->base.GLColorspace);
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
const __DRIconfig *config =
|
||||
dri2_get_dri_config(dri2_conf, type, dri2_surf->base.GLColorspace);
|
||||
|
||||
dri2_surf->dri_drawable =
|
||||
(*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen, config,
|
||||
dri2_surf);
|
||||
} else {
|
||||
assert(dri2_dpy->swrast);
|
||||
dri2_surf->dri_drawable =
|
||||
(*dri2_dpy->swrast->createNewDrawable)(dri2_dpy->dri_screen, config,
|
||||
dri2_surf);
|
||||
(*dri2_dpy->swrast->createNewDrawable) (dri2_dpy->dri_screen,
|
||||
dri2_conf->dri_double_config,
|
||||
dri2_surf);
|
||||
}
|
||||
|
||||
if (dri2_surf->dri_drawable == NULL) {
|
||||
@@ -1161,7 +1161,6 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
* Every hardware driver_name is set using strdup. Doing the same in
|
||||
* here will allow is to simply free the memory at dri2_terminate().
|
||||
*/
|
||||
dri2_dpy->fd = -1;
|
||||
dri2_dpy->driver_name = strdup("swrast");
|
||||
if (!dri2_load_driver_swrast(disp))
|
||||
goto cleanup_conn;
|
||||
|
@@ -152,51 +152,12 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
|
||||
|
||||
/* The EGL_KHR_create_context spec says:
|
||||
*
|
||||
* "If the EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR flag bit is set in
|
||||
* EGL_CONTEXT_FLAGS_KHR, then a <debug context> will be created.
|
||||
* [...]
|
||||
* In some cases a debug context may be identical to a non-debug
|
||||
* context. This bit is supported for OpenGL and OpenGL ES
|
||||
* contexts."
|
||||
* "Flags are only defined for OpenGL context creation, and
|
||||
* specifying a flags value other than zero for other types of
|
||||
* contexts, including OpenGL ES contexts, will generate an
|
||||
* error."
|
||||
*/
|
||||
if ((val & EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR) &&
|
||||
(api != EGL_OPENGL_API && api != EGL_OPENGL_ES_API)) {
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* The EGL_KHR_create_context spec says:
|
||||
*
|
||||
* "If the EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR flag bit
|
||||
* is set in EGL_CONTEXT_FLAGS_KHR, then a <forward-compatible>
|
||||
* context will be created. Forward-compatible contexts are
|
||||
* defined only for OpenGL versions 3.0 and later. They must not
|
||||
* support functionality marked as <deprecated> by that version of
|
||||
* the API, while a non-forward-compatible context must support
|
||||
* all functionality in that version, deprecated or not. This bit
|
||||
* is supported for OpenGL contexts, and requesting a
|
||||
* forward-compatible context for OpenGL versions less than 3.0
|
||||
* will generate an error."
|
||||
*/
|
||||
if ((val & EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR) &&
|
||||
(api != EGL_OPENGL_API || ctx->ClientMajorVersion < 3)) {
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* The EGL_KHR_create_context_spec says:
|
||||
*
|
||||
* "If the EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR bit is set in
|
||||
* EGL_CONTEXT_FLAGS_KHR, then a context supporting <robust buffer
|
||||
* access> will be created. Robust buffer access is defined in the
|
||||
* GL_ARB_robustness extension specification, and the resulting
|
||||
* context must also support either the GL_ARB_robustness
|
||||
* extension, or a version of OpenGL incorporating equivalent
|
||||
* functionality. This bit is supported for OpenGL contexts.
|
||||
*/
|
||||
if ((val & EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR) &&
|
||||
(api != EGL_OPENGL_API ||
|
||||
!dpy->Extensions.EXT_create_context_robustness)) {
|
||||
if (api != EGL_OPENGL_API && val != 0) {
|
||||
err = EGL_BAD_ATTRIBUTE;
|
||||
break;
|
||||
}
|
||||
|
@@ -197,7 +197,7 @@ drm_authenticate(struct wl_client *client,
|
||||
wl_resource_post_event(resource, WL_DRM_AUTHENTICATED);
|
||||
}
|
||||
|
||||
static const struct wl_drm_interface drm_interface = {
|
||||
const static struct wl_drm_interface drm_interface = {
|
||||
drm_authenticate,
|
||||
drm_create_buffer,
|
||||
drm_create_planar_buffer,
|
||||
|
@@ -1,32 +1,3 @@
|
||||
/*
|
||||
* Copyright © 2011 Kristian Høgsberg
|
||||
* Copyright © 2011 Benjamin Franzke
|
||||
*
|
||||
* 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:
|
||||
* Kristian Høgsberg <krh@bitplanet.net>
|
||||
* Benjamin Franzke <benjaminfranzke@googlemail.com>
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <wayland-client.h>
|
||||
|
@@ -38,23 +38,18 @@ libgallium_la_SOURCES += \
|
||||
|
||||
endif
|
||||
|
||||
MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
|
||||
PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
|
||||
indices/u_indices_gen.c: $(srcdir)/indices/u_indices_gen.py
|
||||
$(AM_V_at)$(MKDIR_P) indices
|
||||
$(AM_V_GEN) $(PYTHON2) $< > $@
|
||||
|
||||
indices/u_indices_gen.c: indices/u_indices_gen.py
|
||||
$(MKDIR_GEN)
|
||||
$(PYTHON_GEN) $(srcdir)/indices/u_indices_gen.py > $@
|
||||
indices/u_unfilled_gen.c: $(srcdir)/indices/u_unfilled_gen.py
|
||||
$(AM_V_at)$(MKDIR_P) indices
|
||||
$(AM_V_GEN) $(PYTHON2) $< > $@
|
||||
|
||||
indices/u_unfilled_gen.c: indices/u_unfilled_gen.py
|
||||
$(MKDIR_GEN)
|
||||
$(PYTHON_GEN) $(srcdir)/indices/u_unfilled_gen.py > $@
|
||||
util/u_format_table.c: $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format_pack.py $(srcdir)/util/u_format_parse.py $(srcdir)/util/u_format.csv
|
||||
$(AM_V_at)$(MKDIR_P) util
|
||||
$(AM_V_GEN) $(PYTHON2) $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format.csv > $@
|
||||
|
||||
util/u_format_table.c: util/u_format_table.py \
|
||||
util/u_format_pack.py \
|
||||
util/u_format_parse.py \
|
||||
util/u_format.csv
|
||||
$(MKDIR_GEN)
|
||||
$(PYTHON_GEN) $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format.csv > $@
|
||||
|
||||
noinst_LTLIBRARIES += libgalliumvl_stub.la
|
||||
libgalliumvl_stub_la_SOURCES = \
|
||||
|
@@ -129,16 +129,12 @@ C_SOURCES := \
|
||||
rtasm/rtasm_execmem.h \
|
||||
rtasm/rtasm_x86sse.c \
|
||||
rtasm/rtasm_x86sse.h \
|
||||
tgsi/tgsi_aa_point.c \
|
||||
tgsi/tgsi_aa_point.h \
|
||||
tgsi/tgsi_build.c \
|
||||
tgsi/tgsi_build.h \
|
||||
tgsi/tgsi_dump.c \
|
||||
tgsi/tgsi_dump.h \
|
||||
tgsi/tgsi_exec.c \
|
||||
tgsi/tgsi_exec.h \
|
||||
tgsi/tgsi_emulate.c \
|
||||
tgsi/tgsi_emulate.h \
|
||||
tgsi/tgsi_info.c \
|
||||
tgsi/tgsi_info.h \
|
||||
tgsi/tgsi_iterate.c \
|
||||
@@ -148,8 +144,6 @@ C_SOURCES := \
|
||||
tgsi/tgsi_opcode_tmp.h \
|
||||
tgsi/tgsi_parse.c \
|
||||
tgsi/tgsi_parse.h \
|
||||
tgsi/tgsi_point_sprite.c \
|
||||
tgsi/tgsi_point_sprite.h \
|
||||
tgsi/tgsi_sanity.c \
|
||||
tgsi/tgsi_sanity.h \
|
||||
tgsi/tgsi_scan.c \
|
||||
@@ -160,8 +154,6 @@ C_SOURCES := \
|
||||
tgsi/tgsi_text.h \
|
||||
tgsi/tgsi_transform.c \
|
||||
tgsi/tgsi_transform.h \
|
||||
tgsi/tgsi_two_side.c \
|
||||
tgsi/tgsi_two_side.h \
|
||||
tgsi/tgsi_ureg.c \
|
||||
tgsi/tgsi_ureg.h \
|
||||
tgsi/tgsi_util.c \
|
||||
@@ -268,8 +260,6 @@ C_SOURCES := \
|
||||
util/u_pack_color.h \
|
||||
util/u_pointer.h \
|
||||
util/u_prim.h \
|
||||
util/u_prim_restart.c \
|
||||
util/u_prim_restart.h \
|
||||
util/u_pstipple.c \
|
||||
util/u_pstipple.h \
|
||||
util/u_range.h \
|
||||
|
@@ -240,8 +240,7 @@ aa_transform_prolog(struct tgsi_transform_context *ctx)
|
||||
TGSI_FILE_INPUT, texInput, TGSI_SWIZZLE_W);
|
||||
|
||||
/* KILL_IF -tmp0.yyyy; # if -tmp0.y < 0, KILL */
|
||||
tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, tmp0,
|
||||
TGSI_SWIZZLE_Y, TRUE);
|
||||
tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_Y);
|
||||
|
||||
/* compute coverage factor = (1-d)/(1-k) */
|
||||
|
||||
|
@@ -280,8 +280,7 @@ pstip_transform_prolog(struct tgsi_transform_context *ctx)
|
||||
|
||||
/* KILL_IF -texTemp.wwww; # if -texTemp < 0, KILL fragment */
|
||||
tgsi_transform_kill_inst(ctx,
|
||||
TGSI_FILE_TEMPORARY, pctx->texTemp,
|
||||
TGSI_SWIZZLE_W, TRUE);
|
||||
TGSI_FILE_TEMPORARY, pctx->texTemp, TGSI_SWIZZLE_W);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -311,7 +311,7 @@ lp_build_const_elem(struct gallivm_state *gallivm,
|
||||
else {
|
||||
double dscale = lp_const_scale(type);
|
||||
|
||||
elem = LLVMConstInt(elem_type, (long long) round(val*dscale), 0);
|
||||
elem = LLVMConstInt(elem_type, round(val*dscale), 0);
|
||||
}
|
||||
|
||||
return elem;
|
||||
|
@@ -81,8 +81,6 @@
|
||||
# pragma pop_macro("DEBUG")
|
||||
#endif
|
||||
|
||||
#include "c11/threads.h"
|
||||
#include "os/os_thread.h"
|
||||
#include "pipe/p_config.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_cpu_detect.h"
|
||||
@@ -105,33 +103,6 @@ static LLVMEnsureMultithreaded lLVMEnsureMultithreaded;
|
||||
|
||||
}
|
||||
|
||||
static once_flag init_native_targets_once_flag;
|
||||
|
||||
static void init_native_targets()
|
||||
{
|
||||
// If we have a native target, initialize it to ensure it is linked in and
|
||||
// usable by the JIT.
|
||||
llvm::InitializeNativeTarget();
|
||||
|
||||
llvm::InitializeNativeTargetAsmPrinter();
|
||||
|
||||
llvm::InitializeNativeTargetDisassembler();
|
||||
}
|
||||
|
||||
/**
|
||||
* The llvm target registry is not thread-safe, so drivers and state-trackers
|
||||
* that want to initialize targets should use the gallivm_init_llvm_targets()
|
||||
* function to safely initialize targets.
|
||||
*
|
||||
* LLVM targets should be initialized before the driver or state-tracker tries
|
||||
* to access the registry.
|
||||
*/
|
||||
extern "C" void
|
||||
gallivm_init_llvm_targets(void)
|
||||
{
|
||||
call_once(&init_native_targets_once_flag, init_native_targets);
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
lp_set_target_options(void)
|
||||
{
|
||||
@@ -144,7 +115,13 @@ lp_set_target_options(void)
|
||||
llvm::DisablePrettyStackTrace = true;
|
||||
#endif
|
||||
|
||||
gallivm_init_llvm_targets();
|
||||
// If we have a native target, initialize it to ensure it is linked in and
|
||||
// usable by the JIT.
|
||||
llvm::InitializeNativeTarget();
|
||||
|
||||
llvm::InitializeNativeTargetAsmPrinter();
|
||||
|
||||
llvm::InitializeNativeTargetDisassembler();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -41,8 +41,6 @@ extern "C" {
|
||||
|
||||
struct lp_generated_code;
|
||||
|
||||
extern void
|
||||
gallivm_init_llvm_targets(void);
|
||||
|
||||
extern void
|
||||
lp_set_target_options(void);
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include "glsl/nir/nir_control_flow.h"
|
||||
#include "glsl/nir/nir_builder.h"
|
||||
#include "glsl/list.h"
|
||||
#include "glsl/nir/shader_enums.h"
|
||||
#include "glsl/shader_enums.h"
|
||||
|
||||
#include "nir/tgsi_to_nir.h"
|
||||
#include "tgsi/tgsi_parse.h"
|
||||
@@ -94,128 +94,6 @@ struct ttn_compile {
|
||||
#define ttn_channel(b, src, swiz) \
|
||||
nir_swizzle(b, src, SWIZ(swiz, swiz, swiz, swiz), 1, false)
|
||||
|
||||
static gl_varying_slot
|
||||
tgsi_varying_semantic_to_slot(unsigned semantic, unsigned index)
|
||||
{
|
||||
switch (semantic) {
|
||||
case TGSI_SEMANTIC_POSITION:
|
||||
return VARYING_SLOT_POS;
|
||||
case TGSI_SEMANTIC_COLOR:
|
||||
if (index == 0)
|
||||
return VARYING_SLOT_COL0;
|
||||
else
|
||||
return VARYING_SLOT_COL1;
|
||||
case TGSI_SEMANTIC_BCOLOR:
|
||||
if (index == 0)
|
||||
return VARYING_SLOT_BFC0;
|
||||
else
|
||||
return VARYING_SLOT_BFC1;
|
||||
case TGSI_SEMANTIC_FOG:
|
||||
return VARYING_SLOT_FOGC;
|
||||
case TGSI_SEMANTIC_PSIZE:
|
||||
return VARYING_SLOT_PSIZ;
|
||||
case TGSI_SEMANTIC_GENERIC:
|
||||
return VARYING_SLOT_VAR0 + index;
|
||||
case TGSI_SEMANTIC_FACE:
|
||||
return VARYING_SLOT_FACE;
|
||||
case TGSI_SEMANTIC_EDGEFLAG:
|
||||
return VARYING_SLOT_EDGE;
|
||||
case TGSI_SEMANTIC_PRIMID:
|
||||
return VARYING_SLOT_PRIMITIVE_ID;
|
||||
case TGSI_SEMANTIC_CLIPDIST:
|
||||
if (index == 0)
|
||||
return VARYING_SLOT_CLIP_DIST0;
|
||||
else
|
||||
return VARYING_SLOT_CLIP_DIST1;
|
||||
case TGSI_SEMANTIC_CLIPVERTEX:
|
||||
return VARYING_SLOT_CLIP_VERTEX;
|
||||
case TGSI_SEMANTIC_TEXCOORD:
|
||||
return VARYING_SLOT_TEX0 + index;
|
||||
case TGSI_SEMANTIC_PCOORD:
|
||||
return VARYING_SLOT_PNTC;
|
||||
case TGSI_SEMANTIC_VIEWPORT_INDEX:
|
||||
return VARYING_SLOT_VIEWPORT;
|
||||
case TGSI_SEMANTIC_LAYER:
|
||||
return VARYING_SLOT_LAYER;
|
||||
default:
|
||||
fprintf(stderr, "Bad TGSI semantic: %d/%d\n", semantic, index);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
/* Temporary helper to remap back to TGSI style semantic name/index
|
||||
* values, for use in drivers that haven't been converted to using
|
||||
* VARYING_SLOT_
|
||||
*/
|
||||
void
|
||||
varying_slot_to_tgsi_semantic(gl_varying_slot slot,
|
||||
unsigned *semantic_name, unsigned *semantic_index)
|
||||
{
|
||||
static const unsigned map[][2] = {
|
||||
[VARYING_SLOT_POS] = { TGSI_SEMANTIC_POSITION, 0 },
|
||||
[VARYING_SLOT_COL0] = { TGSI_SEMANTIC_COLOR, 0 },
|
||||
[VARYING_SLOT_COL1] = { TGSI_SEMANTIC_COLOR, 1 },
|
||||
[VARYING_SLOT_BFC0] = { TGSI_SEMANTIC_BCOLOR, 0 },
|
||||
[VARYING_SLOT_BFC1] = { TGSI_SEMANTIC_BCOLOR, 1 },
|
||||
[VARYING_SLOT_FOGC] = { TGSI_SEMANTIC_FOG, 0 },
|
||||
[VARYING_SLOT_PSIZ] = { TGSI_SEMANTIC_PSIZE, 0 },
|
||||
[VARYING_SLOT_FACE] = { TGSI_SEMANTIC_FACE, 0 },
|
||||
[VARYING_SLOT_EDGE] = { TGSI_SEMANTIC_EDGEFLAG, 0 },
|
||||
[VARYING_SLOT_PRIMITIVE_ID] = { TGSI_SEMANTIC_PRIMID, 0 },
|
||||
[VARYING_SLOT_CLIP_DIST0] = { TGSI_SEMANTIC_CLIPDIST, 0 },
|
||||
[VARYING_SLOT_CLIP_DIST1] = { TGSI_SEMANTIC_CLIPDIST, 1 },
|
||||
[VARYING_SLOT_CLIP_VERTEX] = { TGSI_SEMANTIC_CLIPVERTEX, 0 },
|
||||
[VARYING_SLOT_PNTC] = { TGSI_SEMANTIC_PCOORD, 0 },
|
||||
[VARYING_SLOT_VIEWPORT] = { TGSI_SEMANTIC_VIEWPORT_INDEX, 0 },
|
||||
[VARYING_SLOT_LAYER] = { TGSI_SEMANTIC_LAYER, 0 },
|
||||
};
|
||||
|
||||
if (slot >= VARYING_SLOT_VAR0) {
|
||||
*semantic_name = TGSI_SEMANTIC_GENERIC;
|
||||
*semantic_index = slot - VARYING_SLOT_VAR0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (slot >= VARYING_SLOT_TEX0 && slot <= VARYING_SLOT_TEX7) {
|
||||
*semantic_name = TGSI_SEMANTIC_TEXCOORD;
|
||||
*semantic_index = slot - VARYING_SLOT_TEX0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (slot >= ARRAY_SIZE(map)) {
|
||||
fprintf(stderr, "Unknown varying slot %d\n", slot);
|
||||
abort();
|
||||
}
|
||||
|
||||
*semantic_name = map[slot][0];
|
||||
*semantic_index = map[slot][1];
|
||||
}
|
||||
|
||||
/* Temporary helper to remap back to TGSI style semantic name/index
|
||||
* values, for use in drivers that haven't been converted to using
|
||||
* FRAG_RESULT_
|
||||
*/
|
||||
void
|
||||
frag_result_to_tgsi_semantic(gl_frag_result slot,
|
||||
unsigned *semantic_name, unsigned *semantic_index)
|
||||
{
|
||||
static const unsigned map[][2] = {
|
||||
[FRAG_RESULT_DEPTH] = { TGSI_SEMANTIC_POSITION, 0 },
|
||||
[FRAG_RESULT_COLOR] = { TGSI_SEMANTIC_COLOR, -1 },
|
||||
[FRAG_RESULT_DATA0 + 0] = { TGSI_SEMANTIC_COLOR, 0 },
|
||||
[FRAG_RESULT_DATA0 + 1] = { TGSI_SEMANTIC_COLOR, 1 },
|
||||
[FRAG_RESULT_DATA0 + 2] = { TGSI_SEMANTIC_COLOR, 2 },
|
||||
[FRAG_RESULT_DATA0 + 3] = { TGSI_SEMANTIC_COLOR, 3 },
|
||||
[FRAG_RESULT_DATA0 + 4] = { TGSI_SEMANTIC_COLOR, 4 },
|
||||
[FRAG_RESULT_DATA0 + 5] = { TGSI_SEMANTIC_COLOR, 5 },
|
||||
[FRAG_RESULT_DATA0 + 6] = { TGSI_SEMANTIC_COLOR, 6 },
|
||||
[FRAG_RESULT_DATA0 + 7] = { TGSI_SEMANTIC_COLOR, 7 },
|
||||
};
|
||||
|
||||
*semantic_name = map[slot][0];
|
||||
*semantic_index = map[slot][1];
|
||||
}
|
||||
|
||||
static nir_ssa_def *
|
||||
ttn_src_for_dest(nir_builder *b, nir_alu_dest *dest)
|
||||
{
|
||||
@@ -338,15 +216,12 @@ ttn_emit_declaration(struct ttn_compile *c)
|
||||
var->data.mode = nir_var_shader_in;
|
||||
var->name = ralloc_asprintf(var, "in_%d", idx);
|
||||
|
||||
if (c->scan->processor == TGSI_PROCESSOR_FRAGMENT) {
|
||||
var->data.location =
|
||||
tgsi_varying_semantic_to_slot(decl->Semantic.Name,
|
||||
decl->Semantic.Index);
|
||||
} else {
|
||||
assert(!decl->Declaration.Semantic);
|
||||
var->data.location = VERT_ATTRIB_GENERIC0 + idx;
|
||||
}
|
||||
var->data.index = 0;
|
||||
/* We should probably translate to a VERT_ATTRIB_* or VARYING_SLOT_*
|
||||
* instead, but nothing in NIR core is looking at the value
|
||||
* currently, and this is less change to drivers.
|
||||
*/
|
||||
var->data.location = decl->Semantic.Name;
|
||||
var->data.index = decl->Semantic.Index;
|
||||
|
||||
/* We definitely need to translate the interpolation field, because
|
||||
* nir_print will decode it.
|
||||
@@ -366,8 +241,6 @@ ttn_emit_declaration(struct ttn_compile *c)
|
||||
exec_list_push_tail(&b->shader->inputs, &var->node);
|
||||
break;
|
||||
case TGSI_FILE_OUTPUT: {
|
||||
int semantic_name = decl->Semantic.Name;
|
||||
int semantic_index = decl->Semantic.Index;
|
||||
/* Since we can't load from outputs in the IR, we make temporaries
|
||||
* for the outputs and emit stores to the real outputs at the end of
|
||||
* the shader.
|
||||
@@ -379,40 +252,14 @@ ttn_emit_declaration(struct ttn_compile *c)
|
||||
|
||||
var->data.mode = nir_var_shader_out;
|
||||
var->name = ralloc_asprintf(var, "out_%d", idx);
|
||||
var->data.index = 0;
|
||||
|
||||
if (c->scan->processor == TGSI_PROCESSOR_FRAGMENT) {
|
||||
switch (semantic_name) {
|
||||
case TGSI_SEMANTIC_COLOR: {
|
||||
/* TODO tgsi loses some information, so we cannot
|
||||
* actually differentiate here between DSB and MRT
|
||||
* at this point. But so far no drivers using tgsi-
|
||||
* to-nir support dual source blend:
|
||||
*/
|
||||
bool dual_src_blend = false;
|
||||
if (dual_src_blend && (semantic_index == 1)) {
|
||||
var->data.location = FRAG_RESULT_DATA0;
|
||||
var->data.index = 1;
|
||||
} else {
|
||||
if (c->scan->properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS])
|
||||
var->data.location = FRAG_RESULT_COLOR;
|
||||
else
|
||||
var->data.location = FRAG_RESULT_DATA0 + semantic_index;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TGSI_SEMANTIC_POSITION:
|
||||
var->data.location = FRAG_RESULT_DEPTH;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Bad TGSI semantic: %d/%d\n",
|
||||
decl->Semantic.Name, decl->Semantic.Index);
|
||||
abort();
|
||||
}
|
||||
} else {
|
||||
var->data.location =
|
||||
tgsi_varying_semantic_to_slot(semantic_name, semantic_index);
|
||||
}
|
||||
var->data.location = decl->Semantic.Name;
|
||||
if (decl->Semantic.Name == TGSI_SEMANTIC_COLOR &&
|
||||
decl->Semantic.Index == 0 &&
|
||||
c->scan->properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS])
|
||||
var->data.index = -1;
|
||||
else
|
||||
var->data.index = decl->Semantic.Index;
|
||||
|
||||
if (is_array) {
|
||||
unsigned j;
|
||||
@@ -1074,6 +921,10 @@ ttn_if(struct ttn_compile *c, nir_ssa_def *src, bool is_uint)
|
||||
{
|
||||
nir_builder *b = &c->build;
|
||||
|
||||
/* Save the outside-of-the-if-statement node list. */
|
||||
c->if_stack[c->if_stack_pos] = b->cursor;
|
||||
c->if_stack_pos++;
|
||||
|
||||
src = ttn_channel(b, src, X);
|
||||
|
||||
nir_if *if_stmt = nir_if_create(b->shader);
|
||||
@@ -1084,9 +935,6 @@ ttn_if(struct ttn_compile *c, nir_ssa_def *src, bool is_uint)
|
||||
}
|
||||
nir_builder_cf_insert(b, &if_stmt->cf_node);
|
||||
|
||||
c->if_stack[c->if_stack_pos] = nir_after_cf_node(&if_stmt->cf_node);
|
||||
c->if_stack_pos++;
|
||||
|
||||
b->cursor = nir_after_cf_list(&if_stmt->then_list);
|
||||
|
||||
c->if_stack[c->if_stack_pos] = nir_after_cf_list(&if_stmt->else_list);
|
||||
@@ -1115,12 +963,13 @@ ttn_bgnloop(struct ttn_compile *c)
|
||||
{
|
||||
nir_builder *b = &c->build;
|
||||
|
||||
/* Save the outside-of-the-loop node list. */
|
||||
c->loop_stack[c->loop_stack_pos] = b->cursor;
|
||||
c->loop_stack_pos++;
|
||||
|
||||
nir_loop *loop = nir_loop_create(b->shader);
|
||||
nir_builder_cf_insert(b, &loop->cf_node);
|
||||
|
||||
c->loop_stack[c->loop_stack_pos] = nir_after_cf_node(&loop->cf_node);
|
||||
c->loop_stack_pos++;
|
||||
|
||||
b->cursor = nir_after_cf_list(&loop->body);
|
||||
}
|
||||
|
||||
|
@@ -28,9 +28,3 @@ struct nir_shader_compiler_options *options;
|
||||
struct nir_shader *
|
||||
tgsi_to_nir(const void *tgsi_tokens,
|
||||
const struct nir_shader_compiler_options *options);
|
||||
void
|
||||
varying_slot_to_tgsi_semantic(gl_varying_slot slot,
|
||||
unsigned *semantic_name, unsigned *semantic_index);
|
||||
void
|
||||
frag_result_to_tgsi_semantic(gl_frag_result slot,
|
||||
unsigned *semantic_name, unsigned *semantic_index);
|
||||
|
@@ -96,13 +96,11 @@ os_log_message(const char *message)
|
||||
}
|
||||
|
||||
|
||||
#if !defined(PIPE_SUBSYSTEM_EMBEDDED)
|
||||
const char *
|
||||
os_get_option(const char *name)
|
||||
{
|
||||
return getenv(name);
|
||||
}
|
||||
#endif /* !PIPE_SUBSYSTEM_EMBEDDED */
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -166,11 +166,6 @@ pb_cache_manager_create(struct pb_manager *provider,
|
||||
unsigned bypass_usage,
|
||||
uint64_t maximum_cache_size);
|
||||
|
||||
/**
|
||||
* Remove a buffer from the cache, but keep it alive.
|
||||
*/
|
||||
void
|
||||
pb_cache_manager_remove_buffer(struct pb_buffer *buf);
|
||||
|
||||
struct pb_fence_ops;
|
||||
|
||||
|
@@ -104,42 +104,18 @@ pb_cache_manager(struct pb_manager *mgr)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_pb_cache_manager_remove_buffer_locked(struct pb_cache_buffer *buf)
|
||||
{
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
if (buf->head.next) {
|
||||
LIST_DEL(&buf->head);
|
||||
assert(mgr->numDelayed);
|
||||
--mgr->numDelayed;
|
||||
mgr->cache_size -= buf->base.size;
|
||||
}
|
||||
buf->mgr = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
pb_cache_manager_remove_buffer(struct pb_buffer *pb_buf)
|
||||
{
|
||||
struct pb_cache_buffer *buf = (struct pb_cache_buffer*)pb_buf;
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
if (!mgr)
|
||||
return;
|
||||
|
||||
pipe_mutex_lock(mgr->mutex);
|
||||
_pb_cache_manager_remove_buffer_locked(buf);
|
||||
pipe_mutex_unlock(mgr->mutex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually destroy the buffer.
|
||||
*/
|
||||
static inline void
|
||||
_pb_cache_buffer_destroy(struct pb_cache_buffer *buf)
|
||||
{
|
||||
if (buf->mgr)
|
||||
_pb_cache_manager_remove_buffer_locked(buf);
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
LIST_DEL(&buf->head);
|
||||
assert(mgr->numDelayed);
|
||||
--mgr->numDelayed;
|
||||
mgr->cache_size -= buf->base.size;
|
||||
assert(!pipe_is_referenced(&buf->base.reference));
|
||||
pb_reference(&buf->buffer, NULL);
|
||||
FREE(buf);
|
||||
@@ -180,12 +156,6 @@ pb_cache_buffer_destroy(struct pb_buffer *_buf)
|
||||
struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
if (!mgr) {
|
||||
pb_reference(&buf->buffer, NULL);
|
||||
FREE(buf);
|
||||
return;
|
||||
}
|
||||
|
||||
pipe_mutex_lock(mgr->mutex);
|
||||
assert(!pipe_is_referenced(&buf->base.reference));
|
||||
|
||||
|
@@ -1,309 +0,0 @@
|
||||
/*
|
||||
* Copyright 2014 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* This utility transforms the fragment shader to support anti-aliasing points.
|
||||
*/
|
||||
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_math.h"
|
||||
#include "tgsi_info.h"
|
||||
#include "tgsi_aa_point.h"
|
||||
#include "tgsi_transform.h"
|
||||
|
||||
#define INVALID_INDEX 9999
|
||||
|
||||
struct aa_transform_context
|
||||
{
|
||||
struct tgsi_transform_context base;
|
||||
|
||||
unsigned tmp; // temp register
|
||||
unsigned color_out; // frag color out register
|
||||
unsigned color_tmp; // frag color temp register
|
||||
unsigned num_tmp; // number of temp registers
|
||||
unsigned num_imm; // number of immediates
|
||||
unsigned num_input; // number of inputs
|
||||
unsigned aa_point_coord_index;
|
||||
};
|
||||
|
||||
static inline struct aa_transform_context *
|
||||
aa_transform_context(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
return (struct aa_transform_context *) ctx;
|
||||
}
|
||||
|
||||
/**
|
||||
* TGSI declaration transform callback.
|
||||
*/
|
||||
static void
|
||||
aa_decl(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_declaration *decl)
|
||||
{
|
||||
struct aa_transform_context *ts = aa_transform_context(ctx);
|
||||
|
||||
if (decl->Declaration.File == TGSI_FILE_OUTPUT &&
|
||||
decl->Semantic.Name == TGSI_SEMANTIC_COLOR &&
|
||||
decl->Semantic.Index == 0) {
|
||||
ts->color_out = decl->Range.First;
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_INPUT) {
|
||||
ts->num_input++;
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
|
||||
ts->num_tmp = MAX2(ts->num_tmp, decl->Range.Last + 1);
|
||||
}
|
||||
|
||||
ctx->emit_declaration(ctx, decl);
|
||||
}
|
||||
|
||||
/**
|
||||
* TGSI immediate declaration transform callback.
|
||||
*/
|
||||
static void
|
||||
aa_immediate(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_immediate *imm)
|
||||
{
|
||||
struct aa_transform_context *ts = aa_transform_context(ctx);
|
||||
|
||||
ctx->emit_immediate(ctx, imm);
|
||||
ts->num_imm++;
|
||||
}
|
||||
|
||||
/**
|
||||
* TGSI transform prolog callback.
|
||||
*/
|
||||
static void
|
||||
aa_prolog(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
struct aa_transform_context *ts = aa_transform_context(ctx);
|
||||
unsigned tmp0;
|
||||
unsigned texIn;
|
||||
unsigned imm;
|
||||
|
||||
/* Declare two temporary registers, one for temporary and
|
||||
* one for color.
|
||||
*/
|
||||
ts->tmp = ts->num_tmp++;
|
||||
ts->color_tmp = ts->num_tmp++;
|
||||
|
||||
tgsi_transform_temps_decl(ctx, ts->tmp, ts->color_tmp);
|
||||
|
||||
/* Declare new generic input/texcoord */
|
||||
texIn = ts->num_input++;
|
||||
tgsi_transform_input_decl(ctx, texIn, TGSI_SEMANTIC_GENERIC,
|
||||
ts->aa_point_coord_index, TGSI_INTERPOLATE_LINEAR);
|
||||
|
||||
/* Declare extra immediates */
|
||||
imm = ts->num_imm++;
|
||||
tgsi_transform_immediate_decl(ctx, 0.5, 0.5, 0.45, 1.0);
|
||||
|
||||
/*
|
||||
* Emit code to compute fragment coverage.
|
||||
* The point always has radius 0.5. The threshold value will be a
|
||||
* value less than, but close to 0.5, such as 0.45.
|
||||
* We compute a coverage factor from the distance and threshold.
|
||||
* If the coverage is negative, the fragment is outside the circle and
|
||||
* it's discarded.
|
||||
* If the coverage is >= 1, the fragment is fully inside the threshold
|
||||
* distance. We limit/clamp the coverage to 1.
|
||||
* Otherwise, the fragment is between the threshold value and 0.5 and we
|
||||
* compute a coverage value in [0,1].
|
||||
*
|
||||
* Input reg (texIn) usage:
|
||||
* texIn.x = x point coord in [0,1]
|
||||
* texIn.y = y point coord in [0,1]
|
||||
* texIn.z = "k" the smoothing threshold distance
|
||||
* texIn.w = unused
|
||||
*
|
||||
* Temp reg (t0) usage:
|
||||
* t0.x = distance of fragment from center point
|
||||
* t0.y = boolean, is t0.x > 0.5, also misc temp usage
|
||||
* t0.z = temporary for computing 1/(0.5-k) value
|
||||
* t0.w = final coverage value
|
||||
*/
|
||||
|
||||
tmp0 = ts->tmp;
|
||||
|
||||
/* SUB t0.xy, texIn, (0.5, 0,5) */
|
||||
tgsi_transform_op2_inst(ctx, TGSI_OPCODE_SUB,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_XY,
|
||||
TGSI_FILE_INPUT, texIn,
|
||||
TGSI_FILE_IMMEDIATE, imm);
|
||||
|
||||
/* DP2 t0.x, t0.xy, t0.xy; # t0.x = x^2 + y^2 */
|
||||
tgsi_transform_op2_inst(ctx, TGSI_OPCODE_DP2,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_X,
|
||||
TGSI_FILE_TEMPORARY, tmp0,
|
||||
TGSI_FILE_TEMPORARY, tmp0);
|
||||
|
||||
/* SQRT t0.x, t0.x */
|
||||
tgsi_transform_op1_inst(ctx, TGSI_OPCODE_SQRT,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_X,
|
||||
TGSI_FILE_TEMPORARY, tmp0);
|
||||
|
||||
/* compute coverage factor = (0.5-d)/(0.5-k) */
|
||||
|
||||
/* SUB t0.w, 0.5, texIn.z; # t0.w = 0.5-k */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_SUB,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_W,
|
||||
TGSI_FILE_IMMEDIATE, imm, TGSI_SWIZZLE_X,
|
||||
TGSI_FILE_INPUT, texIn, TGSI_SWIZZLE_Z);
|
||||
|
||||
/* SUB t0.y, 0.5, t0.x; # t0.y = 0.5-d */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_SUB,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_Y,
|
||||
TGSI_FILE_IMMEDIATE, imm, TGSI_SWIZZLE_X,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_X);
|
||||
|
||||
/* DIV t0.w, t0.y, t0.w; # coverage = (0.5-d)/(0.5-k) */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_DIV,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_W,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_Y,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_W);
|
||||
|
||||
/* If the coverage value is negative, it means the fragment is outside
|
||||
* the point's circular boundary. Kill it.
|
||||
*/
|
||||
/* KILL_IF tmp0.w; # if tmp0.w < 0 KILL */
|
||||
tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, tmp0,
|
||||
TGSI_SWIZZLE_W, FALSE);
|
||||
|
||||
/* If the distance is less than the threshold, the coverage/alpha value
|
||||
* will be greater than one. Clamp to one here.
|
||||
*/
|
||||
/* MIN tmp0.w, tmp0.w, 1.0 */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_MIN,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_WRITEMASK_W,
|
||||
TGSI_FILE_TEMPORARY, tmp0, TGSI_SWIZZLE_W,
|
||||
TGSI_FILE_IMMEDIATE, imm, TGSI_SWIZZLE_W);
|
||||
}
|
||||
|
||||
/**
|
||||
* TGSI instruction transform callback.
|
||||
*/
|
||||
static void
|
||||
aa_inst(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
struct aa_transform_context *ts = aa_transform_context(ctx);
|
||||
unsigned i;
|
||||
|
||||
/* Look for writes to color output reg and replace it with
|
||||
* color temp reg.
|
||||
*/
|
||||
for (i = 0; i < inst->Instruction.NumDstRegs; i++) {
|
||||
struct tgsi_full_dst_register *dst = &inst->Dst[i];
|
||||
if (dst->Register.File == TGSI_FILE_OUTPUT &&
|
||||
dst->Register.Index == ts->color_out) {
|
||||
dst->Register.File = TGSI_FILE_TEMPORARY;
|
||||
dst->Register.Index = ts->color_tmp;
|
||||
}
|
||||
}
|
||||
|
||||
ctx->emit_instruction(ctx, inst);
|
||||
}
|
||||
|
||||
/**
|
||||
* TGSI transform epilog callback.
|
||||
*/
|
||||
static void
|
||||
aa_epilog(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
struct aa_transform_context *ts = aa_transform_context(ctx);
|
||||
|
||||
/* add alpha modulation code at tail of program */
|
||||
assert(ts->color_out != INVALID_INDEX);
|
||||
assert(ts->color_tmp != INVALID_INDEX);
|
||||
|
||||
/* MOV output.color.xyz colorTmp */
|
||||
tgsi_transform_op1_inst(ctx, TGSI_OPCODE_MOV,
|
||||
TGSI_FILE_OUTPUT, ts->color_out,
|
||||
TGSI_WRITEMASK_XYZ,
|
||||
TGSI_FILE_TEMPORARY, ts->color_tmp);
|
||||
|
||||
/* MUL output.color.w colorTmp.w tmp0.w */
|
||||
tgsi_transform_op2_inst(ctx, TGSI_OPCODE_MUL,
|
||||
TGSI_FILE_OUTPUT, ts->color_out,
|
||||
TGSI_WRITEMASK_W,
|
||||
TGSI_FILE_TEMPORARY, ts->color_tmp,
|
||||
TGSI_FILE_TEMPORARY, ts->tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* TGSI utility to transform a fragment shader to support antialiasing point.
|
||||
*
|
||||
* This utility accepts two inputs:
|
||||
*\param tokens_in -- the original token string of the shader
|
||||
*\param aa_point_coord_index -- the semantic index of the generic register
|
||||
* that contains the point sprite texture coord
|
||||
*
|
||||
* For each fragment in the point, we compute the distance of the fragment
|
||||
* from the point center using the point sprite texture coordinates.
|
||||
* If the distance is greater than 0.5, we'll discard the fragment.
|
||||
* Otherwise, we'll compute a coverage value which approximates how much
|
||||
* of the fragment is inside the bounding circle of the point. If the distance
|
||||
* is less than 'k', the coverage is 1. Else, the coverage is between 0 and 1.
|
||||
* The final fragment color's alpha channel is then modulated by the coverage
|
||||
* value.
|
||||
*/
|
||||
struct tgsi_token *
|
||||
tgsi_add_aa_point(const struct tgsi_token *tokens_in,
|
||||
const int aa_point_coord_index)
|
||||
{
|
||||
struct aa_transform_context transform;
|
||||
const uint num_new_tokens = 200; /* should be enough */
|
||||
const uint new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
|
||||
struct tgsi_token *new_tokens;
|
||||
|
||||
/* allocate new tokens buffer */
|
||||
new_tokens = tgsi_alloc_tokens(new_len);
|
||||
if (!new_tokens)
|
||||
return NULL;
|
||||
|
||||
/* setup transformation context */
|
||||
memset(&transform, 0, sizeof(transform));
|
||||
transform.base.transform_declaration = aa_decl;
|
||||
transform.base.transform_instruction = aa_inst;
|
||||
transform.base.transform_immediate = aa_immediate;
|
||||
transform.base.prolog = aa_prolog;
|
||||
transform.base.epilog = aa_epilog;
|
||||
|
||||
transform.tmp = INVALID_INDEX;
|
||||
transform.color_out = INVALID_INDEX;
|
||||
transform.color_tmp = INVALID_INDEX;
|
||||
|
||||
assert(aa_point_coord_index != -1);
|
||||
transform.aa_point_coord_index = (unsigned)aa_point_coord_index;
|
||||
|
||||
transform.num_tmp = 0;
|
||||
transform.num_imm = 0;
|
||||
transform.num_input = 0;
|
||||
|
||||
/* transform the shader */
|
||||
tgsi_transform_shader(tokens_in, new_tokens, new_len, &transform.base);
|
||||
|
||||
return new_tokens;
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright 2014 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
#ifndef TGSI_AA_POINT_H
|
||||
#define TGSI_AA_POINT_H
|
||||
|
||||
struct tgsi_token;
|
||||
|
||||
struct tgsi_token *
|
||||
tgsi_add_aa_point(const struct tgsi_token *tokens_in,
|
||||
const int aa_point_coord_index);
|
||||
|
||||
#endif /* TGSI_AA_POINT_H */
|
@@ -1,169 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Advanced Micro Devices, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "tgsi/tgsi_transform.h"
|
||||
#include "tgsi/tgsi_scan.h"
|
||||
#include "tgsi/tgsi_dump.h"
|
||||
#include "util/u_debug.h"
|
||||
|
||||
#include "tgsi_emulate.h"
|
||||
|
||||
struct tgsi_emulation_context {
|
||||
struct tgsi_transform_context base;
|
||||
struct tgsi_shader_info info;
|
||||
unsigned flags;
|
||||
bool first_instruction_emitted;
|
||||
};
|
||||
|
||||
static inline struct tgsi_emulation_context *
|
||||
tgsi_emulation_context(struct tgsi_transform_context *tctx)
|
||||
{
|
||||
return (struct tgsi_emulation_context *)tctx;
|
||||
}
|
||||
|
||||
static void
|
||||
transform_decl(struct tgsi_transform_context *tctx,
|
||||
struct tgsi_full_declaration *decl)
|
||||
{
|
||||
struct tgsi_emulation_context *ctx = tgsi_emulation_context(tctx);
|
||||
|
||||
if (ctx->flags & TGSI_EMU_FORCE_PERSAMPLE_INTERP &&
|
||||
decl->Declaration.File == TGSI_FILE_INPUT) {
|
||||
assert(decl->Declaration.Interpolate);
|
||||
decl->Interp.Location = TGSI_INTERPOLATE_LOC_SAMPLE;
|
||||
}
|
||||
|
||||
tctx->emit_declaration(tctx, decl);
|
||||
}
|
||||
|
||||
static void
|
||||
passthrough_edgeflag(struct tgsi_transform_context *tctx)
|
||||
{
|
||||
struct tgsi_emulation_context *ctx = tgsi_emulation_context(tctx);
|
||||
struct tgsi_full_declaration decl;
|
||||
struct tgsi_full_instruction new_inst;
|
||||
|
||||
/* Input */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_INPUT;
|
||||
decl.Range.First = decl.Range.Last = ctx->info.num_inputs;
|
||||
tctx->emit_declaration(tctx, &decl);
|
||||
|
||||
/* Output */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_OUTPUT;
|
||||
decl.Declaration.Semantic = true;
|
||||
decl.Range.First = decl.Range.Last = ctx->info.num_outputs;
|
||||
decl.Semantic.Name = TGSI_SEMANTIC_EDGEFLAG;
|
||||
decl.Semantic.Index = 0;
|
||||
tctx->emit_declaration(tctx, &decl);
|
||||
|
||||
/* MOV */
|
||||
new_inst = tgsi_default_full_instruction();
|
||||
new_inst.Instruction.Opcode = TGSI_OPCODE_MOV;
|
||||
|
||||
new_inst.Instruction.NumDstRegs = 1;
|
||||
new_inst.Dst[0].Register.File = TGSI_FILE_OUTPUT;
|
||||
new_inst.Dst[0].Register.Index = ctx->info.num_outputs;
|
||||
new_inst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_XYZW;
|
||||
|
||||
new_inst.Instruction.NumSrcRegs = 1;
|
||||
new_inst.Src[0].Register.File = TGSI_FILE_INPUT;
|
||||
new_inst.Src[0].Register.Index = ctx->info.num_inputs;
|
||||
new_inst.Src[0].Register.SwizzleX = TGSI_SWIZZLE_X;
|
||||
new_inst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_X;
|
||||
new_inst.Src[0].Register.SwizzleZ = TGSI_SWIZZLE_X;
|
||||
new_inst.Src[0].Register.SwizzleW = TGSI_SWIZZLE_X;
|
||||
|
||||
tctx->emit_instruction(tctx, &new_inst);
|
||||
}
|
||||
|
||||
static void
|
||||
transform_instr(struct tgsi_transform_context *tctx,
|
||||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
struct tgsi_emulation_context *ctx = tgsi_emulation_context(tctx);
|
||||
|
||||
/* Pass through edgeflags. */
|
||||
if (!ctx->first_instruction_emitted) {
|
||||
ctx->first_instruction_emitted = true;
|
||||
|
||||
if (ctx->flags & TGSI_EMU_PASSTHROUGH_EDGEFLAG)
|
||||
passthrough_edgeflag(tctx);
|
||||
}
|
||||
|
||||
/* Clamp color outputs. */
|
||||
if (ctx->flags & TGSI_EMU_CLAMP_COLOR_OUTPUTS) {
|
||||
int i;
|
||||
for (i = 0; i < inst->Instruction.NumDstRegs; i++) {
|
||||
unsigned semantic;
|
||||
|
||||
if (inst->Dst[i].Register.File != TGSI_FILE_OUTPUT ||
|
||||
inst->Dst[i].Register.Indirect)
|
||||
continue;
|
||||
|
||||
semantic =
|
||||
ctx->info.output_semantic_name[inst->Dst[i].Register.Index];
|
||||
|
||||
if (semantic == TGSI_SEMANTIC_COLOR ||
|
||||
semantic == TGSI_SEMANTIC_BCOLOR)
|
||||
inst->Instruction.Saturate = true;
|
||||
}
|
||||
}
|
||||
|
||||
tctx->emit_instruction(tctx, inst);
|
||||
}
|
||||
|
||||
const struct tgsi_token *
|
||||
tgsi_emulate(const struct tgsi_token *tokens, unsigned flags)
|
||||
{
|
||||
struct tgsi_emulation_context ctx;
|
||||
struct tgsi_token *newtoks;
|
||||
int newlen;
|
||||
|
||||
if (!(flags & (TGSI_EMU_CLAMP_COLOR_OUTPUTS |
|
||||
TGSI_EMU_PASSTHROUGH_EDGEFLAG |
|
||||
TGSI_EMU_FORCE_PERSAMPLE_INTERP)))
|
||||
return NULL;
|
||||
|
||||
memset(&ctx, 0, sizeof(ctx));
|
||||
ctx.flags = flags;
|
||||
tgsi_scan_shader(tokens, &ctx.info);
|
||||
|
||||
if (flags & TGSI_EMU_FORCE_PERSAMPLE_INTERP)
|
||||
ctx.base.transform_declaration = transform_decl;
|
||||
|
||||
if (flags & (TGSI_EMU_CLAMP_COLOR_OUTPUTS |
|
||||
TGSI_EMU_PASSTHROUGH_EDGEFLAG))
|
||||
ctx.base.transform_instruction = transform_instr;
|
||||
|
||||
newlen = tgsi_num_tokens(tokens) + 20;
|
||||
newtoks = tgsi_alloc_tokens(newlen);
|
||||
if (!newtoks)
|
||||
return NULL;
|
||||
|
||||
tgsi_transform_shader(tokens, newtoks, newlen, &ctx.base);
|
||||
return newtoks;
|
||||
}
|
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Advanced Micro Devices, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TGSI_GL_EMULATION_H_
|
||||
#define TGSI_GL_EMULATION_H_
|
||||
|
||||
#include "pipe/p_shader_tokens.h"
|
||||
|
||||
#define TGSI_EMU_CLAMP_COLOR_OUTPUTS (1 << 0)
|
||||
#define TGSI_EMU_PASSTHROUGH_EDGEFLAG (1 << 1)
|
||||
#define TGSI_EMU_FORCE_PERSAMPLE_INTERP (1 << 2)
|
||||
|
||||
const struct tgsi_token *
|
||||
tgsi_emulate(const struct tgsi_token *tokens, unsigned flags);
|
||||
|
||||
#endif /* TGSI_GL_EMULATION_H_ */
|
@@ -2021,7 +2021,7 @@ fetch_sampler_unit(struct tgsi_exec_machine *mach,
|
||||
/*
|
||||
* execute a texture instruction.
|
||||
*
|
||||
* modifier is used to control the channel routing for the
|
||||
* modifier is used to control the channel routing for the\
|
||||
* instruction variants like proj, lod, and texture with lod bias.
|
||||
* sampler indicates which src register the sampler is contained in.
|
||||
*/
|
||||
@@ -2032,7 +2032,7 @@ exec_tex(struct tgsi_exec_machine *mach,
|
||||
{
|
||||
const union tgsi_exec_channel *args[5], *proj = NULL;
|
||||
union tgsi_exec_channel r[5];
|
||||
enum tgsi_sampler_control control = TGSI_SAMPLER_LOD_NONE;
|
||||
enum tgsi_sampler_control control = tgsi_sampler_lod_none;
|
||||
uint chan;
|
||||
uint unit;
|
||||
int8_t offsets[3];
|
||||
@@ -2078,11 +2078,11 @@ exec_tex(struct tgsi_exec_machine *mach,
|
||||
args[i] = &ZeroVec;
|
||||
|
||||
if (modifier == TEX_MODIFIER_EXPLICIT_LOD)
|
||||
control = TGSI_SAMPLER_LOD_EXPLICIT;
|
||||
control = tgsi_sampler_lod_explicit;
|
||||
else if (modifier == TEX_MODIFIER_LOD_BIAS)
|
||||
control = TGSI_SAMPLER_LOD_BIAS;
|
||||
control = tgsi_sampler_lod_bias;
|
||||
else if (modifier == TEX_MODIFIER_GATHER)
|
||||
control = TGSI_SAMPLER_GATHER;
|
||||
control = tgsi_sampler_gather;
|
||||
}
|
||||
else {
|
||||
for (i = dim; i < Elements(args); i++)
|
||||
@@ -2132,46 +2132,6 @@ exec_tex(struct tgsi_exec_machine *mach,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
exec_lodq(struct tgsi_exec_machine *mach,
|
||||
const struct tgsi_full_instruction *inst)
|
||||
{
|
||||
uint unit;
|
||||
int dim;
|
||||
int i;
|
||||
union tgsi_exec_channel coords[4];
|
||||
const union tgsi_exec_channel *args[Elements(coords)];
|
||||
union tgsi_exec_channel r[2];
|
||||
|
||||
unit = fetch_sampler_unit(mach, inst, 1);
|
||||
dim = tgsi_util_get_texture_coord_dim(inst->Texture.Texture, NULL);
|
||||
assert(dim <= Elements(coords));
|
||||
/* fetch coordinates */
|
||||
for (i = 0; i < dim; i++) {
|
||||
FETCH(&coords[i], 0, TGSI_CHAN_X + i);
|
||||
args[i] = &coords[i];
|
||||
}
|
||||
for (i = dim; i < Elements(coords); i++) {
|
||||
args[i] = &ZeroVec;
|
||||
}
|
||||
mach->Sampler->query_lod(mach->Sampler, unit, unit,
|
||||
args[0]->f,
|
||||
args[1]->f,
|
||||
args[2]->f,
|
||||
args[3]->f,
|
||||
TGSI_SAMPLER_LOD_NONE,
|
||||
r[0].f,
|
||||
r[1].f);
|
||||
|
||||
if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) {
|
||||
store_dest(mach, &r[0], &inst->Dst[0], inst, TGSI_CHAN_X,
|
||||
TGSI_EXEC_DATA_FLOAT);
|
||||
}
|
||||
if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) {
|
||||
store_dest(mach, &r[1], &inst->Dst[0], inst, TGSI_CHAN_Y,
|
||||
TGSI_EXEC_DATA_FLOAT);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
exec_txd(struct tgsi_exec_machine *mach,
|
||||
@@ -2195,7 +2155,7 @@ exec_txd(struct tgsi_exec_machine *mach,
|
||||
|
||||
fetch_texel(mach->Sampler, unit, unit,
|
||||
&r[0], &ZeroVec, &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
|
||||
derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
|
||||
derivs, offsets, tgsi_sampler_derivs_explicit,
|
||||
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
|
||||
break;
|
||||
|
||||
@@ -2211,7 +2171,7 @@ exec_txd(struct tgsi_exec_machine *mach,
|
||||
|
||||
fetch_texel(mach->Sampler, unit, unit,
|
||||
&r[0], &r[1], &r[2], &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
|
||||
derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
|
||||
derivs, offsets, tgsi_sampler_derivs_explicit,
|
||||
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
|
||||
break;
|
||||
|
||||
@@ -2225,7 +2185,7 @@ exec_txd(struct tgsi_exec_machine *mach,
|
||||
|
||||
fetch_texel(mach->Sampler, unit, unit,
|
||||
&r[0], &r[1], &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
|
||||
derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
|
||||
derivs, offsets, tgsi_sampler_derivs_explicit,
|
||||
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
|
||||
break;
|
||||
|
||||
@@ -2245,7 +2205,7 @@ exec_txd(struct tgsi_exec_machine *mach,
|
||||
|
||||
fetch_texel(mach->Sampler, unit, unit,
|
||||
&r[0], &r[1], &r[2], &r[3], &ZeroVec, /* inputs */
|
||||
derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
|
||||
derivs, offsets, tgsi_sampler_derivs_explicit,
|
||||
&r[0], &r[1], &r[2], &r[3]); /* outputs */
|
||||
break;
|
||||
|
||||
@@ -2265,7 +2225,7 @@ exec_txd(struct tgsi_exec_machine *mach,
|
||||
|
||||
fetch_texel(mach->Sampler, unit, unit,
|
||||
&r[0], &r[1], &r[2], &r[3], &ZeroVec, /* inputs */
|
||||
derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
|
||||
derivs, offsets, tgsi_sampler_derivs_explicit,
|
||||
&r[0], &r[1], &r[2], &r[3]); /* outputs */
|
||||
break;
|
||||
|
||||
@@ -2404,7 +2364,7 @@ exec_sample(struct tgsi_exec_machine *mach,
|
||||
const uint sampler_unit = inst->Src[2].Register.Index;
|
||||
union tgsi_exec_channel r[5], c1;
|
||||
const union tgsi_exec_channel *lod = &ZeroVec;
|
||||
enum tgsi_sampler_control control = TGSI_SAMPLER_LOD_NONE;
|
||||
enum tgsi_sampler_control control = tgsi_sampler_lod_none;
|
||||
uint chan;
|
||||
unsigned char swizzles[4];
|
||||
int8_t offsets[3];
|
||||
@@ -2418,16 +2378,16 @@ exec_sample(struct tgsi_exec_machine *mach,
|
||||
if (modifier == TEX_MODIFIER_LOD_BIAS) {
|
||||
FETCH(&c1, 3, TGSI_CHAN_X);
|
||||
lod = &c1;
|
||||
control = TGSI_SAMPLER_LOD_BIAS;
|
||||
control = tgsi_sampler_lod_bias;
|
||||
}
|
||||
else if (modifier == TEX_MODIFIER_EXPLICIT_LOD) {
|
||||
FETCH(&c1, 3, TGSI_CHAN_X);
|
||||
lod = &c1;
|
||||
control = TGSI_SAMPLER_LOD_EXPLICIT;
|
||||
control = tgsi_sampler_lod_explicit;
|
||||
}
|
||||
else {
|
||||
assert(modifier == TEX_MODIFIER_LEVEL_ZERO);
|
||||
control = TGSI_SAMPLER_LOD_ZERO;
|
||||
control = tgsi_sampler_lod_zero;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2553,7 +2513,7 @@ exec_sample_d(struct tgsi_exec_machine *mach,
|
||||
|
||||
fetch_texel(mach->Sampler, resource_unit, sampler_unit,
|
||||
&r[0], &r[1], &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, C, LOD */
|
||||
derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
|
||||
derivs, offsets, tgsi_sampler_derivs_explicit,
|
||||
&r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */
|
||||
break;
|
||||
|
||||
@@ -2569,7 +2529,7 @@ exec_sample_d(struct tgsi_exec_machine *mach,
|
||||
|
||||
fetch_texel(mach->Sampler, resource_unit, sampler_unit,
|
||||
&r[0], &r[1], &r[2], &ZeroVec, &ZeroVec, /* inputs */
|
||||
derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
|
||||
derivs, offsets, tgsi_sampler_derivs_explicit,
|
||||
&r[0], &r[1], &r[2], &r[3]); /* outputs */
|
||||
break;
|
||||
|
||||
@@ -2587,7 +2547,7 @@ exec_sample_d(struct tgsi_exec_machine *mach,
|
||||
|
||||
fetch_texel(mach->Sampler, resource_unit, sampler_unit,
|
||||
&r[0], &r[1], &r[2], &r[3], &ZeroVec,
|
||||
derivs, offsets, TGSI_SAMPLER_DERIVS_EXPLICIT,
|
||||
derivs, offsets, tgsi_sampler_derivs_explicit,
|
||||
&r[0], &r[1], &r[2], &r[3]);
|
||||
break;
|
||||
|
||||
@@ -4418,12 +4378,6 @@ exec_instruction(
|
||||
exec_tex(mach, inst, TEX_MODIFIER_GATHER, 2);
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_LODQ:
|
||||
/* src[0] = texcoord */
|
||||
/* src[1] = sampler unit */
|
||||
exec_lodq(mach, inst);
|
||||
break;
|
||||
|
||||
case TGSI_OPCODE_UP2H:
|
||||
assert (0);
|
||||
break;
|
||||
|
@@ -88,14 +88,13 @@ struct tgsi_interp_coef
|
||||
float dady[TGSI_NUM_CHANNELS];
|
||||
};
|
||||
|
||||
enum tgsi_sampler_control
|
||||
{
|
||||
TGSI_SAMPLER_LOD_NONE,
|
||||
TGSI_SAMPLER_LOD_BIAS,
|
||||
TGSI_SAMPLER_LOD_EXPLICIT,
|
||||
TGSI_SAMPLER_LOD_ZERO,
|
||||
TGSI_SAMPLER_DERIVS_EXPLICIT,
|
||||
TGSI_SAMPLER_GATHER,
|
||||
enum tgsi_sampler_control {
|
||||
tgsi_sampler_lod_none,
|
||||
tgsi_sampler_lod_bias,
|
||||
tgsi_sampler_lod_explicit,
|
||||
tgsi_sampler_lod_zero,
|
||||
tgsi_sampler_derivs_explicit,
|
||||
tgsi_sampler_gather,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -139,16 +138,6 @@ struct tgsi_sampler
|
||||
const int j[TGSI_QUAD_SIZE], const int k[TGSI_QUAD_SIZE],
|
||||
const int lod[TGSI_QUAD_SIZE], const int8_t offset[3],
|
||||
float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]);
|
||||
void (*query_lod)(const struct tgsi_sampler *tgsi_sampler,
|
||||
const unsigned sview_index,
|
||||
const unsigned sampler_index,
|
||||
const float s[TGSI_QUAD_SIZE],
|
||||
const float t[TGSI_QUAD_SIZE],
|
||||
const float p[TGSI_QUAD_SIZE],
|
||||
const float c0[TGSI_QUAD_SIZE],
|
||||
const enum tgsi_sampler_control control,
|
||||
float mipmap[TGSI_QUAD_SIZE],
|
||||
float lod[TGSI_QUAD_SIZE]);
|
||||
};
|
||||
|
||||
#define TGSI_EXEC_NUM_TEMPS 4096
|
||||
|
@@ -141,7 +141,7 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
|
||||
{ 0, 0, 0, 1, 1, 0, NONE, "ENDLOOP", TGSI_OPCODE_ENDLOOP },
|
||||
{ 0, 0, 0, 0, 1, 0, NONE, "ENDSUB", TGSI_OPCODE_ENDSUB },
|
||||
{ 1, 1, 1, 0, 0, 0, OTHR, "TXQ_LZ", TGSI_OPCODE_TXQ_LZ },
|
||||
{ 1, 1, 1, 0, 0, 0, OTHR, "TXQS", TGSI_OPCODE_TXQS },
|
||||
{ 0, 0, 0, 0, 0, 0, NONE, "", 104 }, /* removed */
|
||||
{ 0, 0, 0, 0, 0, 0, NONE, "", 105 }, /* removed */
|
||||
{ 0, 0, 0, 0, 0, 0, NONE, "", 106 }, /* removed */
|
||||
{ 0, 0, 0, 0, 0, 0, NONE, "NOP", TGSI_OPCODE_NOP },
|
||||
@@ -331,7 +331,6 @@ tgsi_opcode_infer_type( uint opcode )
|
||||
case TGSI_OPCODE_SAD: /* XXX some src args may be signed for SAD ? */
|
||||
case TGSI_OPCODE_TXQ:
|
||||
case TGSI_OPCODE_TXQ_LZ:
|
||||
case TGSI_OPCODE_TXQS:
|
||||
case TGSI_OPCODE_F2U:
|
||||
case TGSI_OPCODE_UDIV:
|
||||
case TGSI_OPCODE_UMAD:
|
||||
|
@@ -1,582 +0,0 @@
|
||||
/*
|
||||
* Copyright 2014 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* This utility transforms the geometry shader to emulate point sprite by
|
||||
* drawing a quad. It also adds an extra output for the original point position
|
||||
* if the point position is to be written to a stream output buffer.
|
||||
* Note: It assumes the driver will add a constant for the inverse viewport
|
||||
* after the user defined constants.
|
||||
*/
|
||||
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_math.h"
|
||||
#include "tgsi_info.h"
|
||||
#include "tgsi_point_sprite.h"
|
||||
#include "tgsi_transform.h"
|
||||
#include "pipe/p_state.h"
|
||||
|
||||
#define INVALID_INDEX 9999
|
||||
|
||||
/* Set swizzle based on the immediates (0, 1, 0, -1) */
|
||||
static inline unsigned
|
||||
set_swizzle(int x, int y, int z, int w)
|
||||
{
|
||||
static const unsigned map[3] = {TGSI_SWIZZLE_W, TGSI_SWIZZLE_X,
|
||||
TGSI_SWIZZLE_Y};
|
||||
assert(x >= -1);
|
||||
assert(x <= 1);
|
||||
assert(y >= -1);
|
||||
assert(y <= 1);
|
||||
assert(z >= -1);
|
||||
assert(z <= 1);
|
||||
assert(w >= -1);
|
||||
assert(w <= 1);
|
||||
|
||||
return map[x+1] | (map[y+1] << 2) | (map[z+1] << 4) | (map[w+1] << 6);
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
get_swizzle(unsigned swizzle, unsigned component)
|
||||
{
|
||||
assert(component < 4);
|
||||
return (swizzle >> (component * 2)) & 0x3;
|
||||
}
|
||||
|
||||
struct psprite_transform_context
|
||||
{
|
||||
struct tgsi_transform_context base;
|
||||
unsigned num_tmp;
|
||||
unsigned num_out;
|
||||
unsigned num_orig_out;
|
||||
unsigned num_const;
|
||||
unsigned num_imm;
|
||||
unsigned point_size_in; // point size input
|
||||
unsigned point_size_out; // point size output
|
||||
unsigned point_size_tmp; // point size temp
|
||||
unsigned point_pos_in; // point pos input
|
||||
unsigned point_pos_out; // point pos output
|
||||
unsigned point_pos_sout; // original point pos for streamout
|
||||
unsigned point_pos_tmp; // point pos temp
|
||||
unsigned point_scale_tmp; // point scale temp
|
||||
unsigned point_color_out; // point color output
|
||||
unsigned point_color_tmp; // point color temp
|
||||
unsigned point_imm; // point immediates
|
||||
unsigned point_ivp; // point inverseViewport constant
|
||||
unsigned point_dir_swz[4]; // point direction swizzle
|
||||
unsigned point_coord_swz[4]; // point coord swizzle
|
||||
unsigned point_coord_enable; // point coord enable mask
|
||||
unsigned point_coord_decl; // point coord output declared mask
|
||||
unsigned point_coord_out; // point coord output starting index
|
||||
unsigned point_coord_aa; // aa point coord semantic index
|
||||
unsigned point_coord_k; // aa point coord threshold distance
|
||||
unsigned stream_out_point_pos:1; // set if to stream out original point pos
|
||||
unsigned aa_point:1; // set if doing aa point
|
||||
unsigned out_tmp_index[PIPE_MAX_SHADER_OUTPUTS];
|
||||
int max_generic;
|
||||
};
|
||||
|
||||
static inline struct psprite_transform_context *
|
||||
psprite_transform_context(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
return (struct psprite_transform_context *) ctx;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TGSI declaration transform callback.
|
||||
*/
|
||||
static void
|
||||
psprite_decl(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_declaration *decl)
|
||||
{
|
||||
struct psprite_transform_context *ts = psprite_transform_context(ctx);
|
||||
|
||||
if (decl->Declaration.File == TGSI_FILE_INPUT) {
|
||||
if (decl->Semantic.Name == TGSI_SEMANTIC_PSIZE) {
|
||||
ts->point_size_in = decl->Range.First;
|
||||
}
|
||||
else if (decl->Semantic.Name == TGSI_SEMANTIC_POSITION) {
|
||||
ts->point_pos_in = decl->Range.First;
|
||||
}
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_OUTPUT) {
|
||||
if (decl->Semantic.Name == TGSI_SEMANTIC_PSIZE) {
|
||||
ts->point_size_out = decl->Range.First;
|
||||
}
|
||||
else if (decl->Semantic.Name == TGSI_SEMANTIC_POSITION) {
|
||||
ts->point_pos_out = decl->Range.First;
|
||||
}
|
||||
else if (decl->Semantic.Name == TGSI_SEMANTIC_GENERIC &&
|
||||
decl->Semantic.Index < 32) {
|
||||
ts->point_coord_decl |= 1 << decl->Semantic.Index;
|
||||
ts->max_generic = MAX2(ts->max_generic, decl->Semantic.Index);
|
||||
}
|
||||
ts->num_out = MAX2(ts->num_out, decl->Range.Last + 1);
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
|
||||
ts->num_tmp = MAX2(ts->num_tmp, decl->Range.Last + 1);
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_CONSTANT) {
|
||||
ts->num_const = MAX2(ts->num_const, decl->Range.Last + 1);
|
||||
}
|
||||
|
||||
ctx->emit_declaration(ctx, decl);
|
||||
}
|
||||
|
||||
/**
|
||||
* TGSI immediate declaration transform callback.
|
||||
*/
|
||||
static void
|
||||
psprite_immediate(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_immediate *imm)
|
||||
{
|
||||
struct psprite_transform_context *ts = psprite_transform_context(ctx);
|
||||
|
||||
ctx->emit_immediate(ctx, imm);
|
||||
ts->num_imm++;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TGSI transform prolog callback.
|
||||
*/
|
||||
static void
|
||||
psprite_prolog(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
struct psprite_transform_context *ts = psprite_transform_context(ctx);
|
||||
unsigned point_coord_enable, en;
|
||||
int i;
|
||||
|
||||
/* Replace output registers with temporary registers */
|
||||
for (i = 0; i < ts->num_out; i++) {
|
||||
ts->out_tmp_index[i] = ts->num_tmp++;
|
||||
}
|
||||
ts->num_orig_out = ts->num_out;
|
||||
|
||||
/* Declare a tmp register for point scale */
|
||||
ts->point_scale_tmp = ts->num_tmp++;
|
||||
|
||||
if (ts->point_size_out != INVALID_INDEX)
|
||||
ts->point_size_tmp = ts->out_tmp_index[ts->point_size_out];
|
||||
else
|
||||
ts->point_size_tmp = ts->num_tmp++;
|
||||
|
||||
assert(ts->point_pos_out != INVALID_INDEX);
|
||||
ts->point_pos_tmp = ts->out_tmp_index[ts->point_pos_out];
|
||||
ts->out_tmp_index[ts->point_pos_out] = INVALID_INDEX;
|
||||
|
||||
/* Declare one more tmp register for point coord threshold distance
|
||||
* if we are generating anti-aliased point.
|
||||
*/
|
||||
if (ts->aa_point)
|
||||
ts->point_coord_k = ts->num_tmp++;
|
||||
|
||||
tgsi_transform_temps_decl(ctx, ts->point_size_tmp, ts->num_tmp-1);
|
||||
|
||||
/* Declare an extra output for the original point position for stream out */
|
||||
if (ts->stream_out_point_pos) {
|
||||
ts->point_pos_sout = ts->num_out++;
|
||||
tgsi_transform_output_decl(ctx, ts->point_pos_sout,
|
||||
TGSI_SEMANTIC_GENERIC, 0, 0);
|
||||
}
|
||||
|
||||
/* point coord outputs to be declared */
|
||||
point_coord_enable = ts->point_coord_enable & ~ts->point_coord_decl;
|
||||
|
||||
/* Declare outputs for those point coord that are enabled but are not
|
||||
* already declared in this shader.
|
||||
*/
|
||||
ts->point_coord_out = ts->num_out;
|
||||
if (point_coord_enable) {
|
||||
for (i = 0, en = point_coord_enable; en; en>>=1, i++) {
|
||||
if (en & 0x1) {
|
||||
tgsi_transform_output_decl(ctx, ts->num_out++,
|
||||
TGSI_SEMANTIC_GENERIC, i, 0);
|
||||
ts->max_generic = MAX2(ts->max_generic, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* add an extra generic output for aa point texcoord */
|
||||
if (ts->aa_point) {
|
||||
ts->point_coord_aa = ts->max_generic + 1;
|
||||
assert((ts->point_coord_enable & (1 << ts->point_coord_aa)) == 0);
|
||||
ts->point_coord_enable |= 1 << (ts->point_coord_aa);
|
||||
tgsi_transform_output_decl(ctx, ts->num_out++, TGSI_SEMANTIC_GENERIC,
|
||||
ts->point_coord_aa, 0);
|
||||
}
|
||||
|
||||
/* Declare extra immediates */
|
||||
ts->point_imm = ts->num_imm;
|
||||
tgsi_transform_immediate_decl(ctx, 0, 1, 0.5, -1);
|
||||
|
||||
/* Declare point constant -
|
||||
* constant.xy -- inverseViewport
|
||||
* constant.z -- current point size
|
||||
* constant.w -- max point size
|
||||
* The driver needs to add this constant to the constant buffer
|
||||
*/
|
||||
ts->point_ivp = ts->num_const++;
|
||||
tgsi_transform_const_decl(ctx, ts->point_ivp, ts->point_ivp);
|
||||
|
||||
/* If this geometry shader does not specify point size,
|
||||
* get the current point size from the point constant.
|
||||
*/
|
||||
if (ts->point_size_out == INVALID_INDEX) {
|
||||
struct tgsi_full_instruction inst;
|
||||
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = TGSI_OPCODE_MOV;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
tgsi_transform_dst_reg(&inst.Dst[0], TGSI_FILE_TEMPORARY,
|
||||
ts->point_size_tmp, TGSI_WRITEMASK_XYZW);
|
||||
inst.Instruction.NumSrcRegs = 1;
|
||||
tgsi_transform_src_reg(&inst.Src[0], TGSI_FILE_CONSTANT,
|
||||
ts->point_ivp, TGSI_SWIZZLE_Z,
|
||||
TGSI_SWIZZLE_Z, TGSI_SWIZZLE_Z, TGSI_SWIZZLE_Z);
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add the point sprite emulation instructions at the emit vertex instruction
|
||||
*/
|
||||
static void
|
||||
psprite_emit_vertex_inst(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_instruction *vert_inst)
|
||||
{
|
||||
struct psprite_transform_context *ts = psprite_transform_context(ctx);
|
||||
struct tgsi_full_instruction inst;
|
||||
unsigned point_coord_enable, en;
|
||||
unsigned i, j, s;
|
||||
|
||||
/* new point coord outputs */
|
||||
point_coord_enable = ts->point_coord_enable & ~ts->point_coord_decl;
|
||||
|
||||
/* OUTPUT[pos_sout] = TEMP[pos] */
|
||||
if (ts->point_pos_sout != INVALID_INDEX) {
|
||||
tgsi_transform_op1_inst(ctx, TGSI_OPCODE_MOV,
|
||||
TGSI_FILE_OUTPUT, ts->point_pos_sout,
|
||||
TGSI_WRITEMASK_XYZW,
|
||||
TGSI_FILE_TEMPORARY, ts->point_pos_tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up the point scale vector
|
||||
* scale = pointSize * pos.w * inverseViewport
|
||||
*/
|
||||
|
||||
/* MUL point_scale.x, point_size.x, point_pos.w */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_MUL,
|
||||
TGSI_FILE_TEMPORARY, ts->point_scale_tmp, TGSI_WRITEMASK_X,
|
||||
TGSI_FILE_TEMPORARY, ts->point_size_tmp, TGSI_SWIZZLE_X,
|
||||
TGSI_FILE_TEMPORARY, ts->point_pos_tmp, TGSI_SWIZZLE_W);
|
||||
|
||||
/* MUL point_scale.xy, point_scale.xx, inverseViewport.xy */
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = TGSI_OPCODE_MUL;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
tgsi_transform_dst_reg(&inst.Dst[0], TGSI_FILE_TEMPORARY,
|
||||
ts->point_scale_tmp, TGSI_WRITEMASK_XY);
|
||||
inst.Instruction.NumSrcRegs = 2;
|
||||
tgsi_transform_src_reg(&inst.Src[0], TGSI_FILE_TEMPORARY,
|
||||
ts->point_scale_tmp, TGSI_SWIZZLE_X,
|
||||
TGSI_SWIZZLE_X, TGSI_SWIZZLE_X, TGSI_SWIZZLE_X);
|
||||
tgsi_transform_src_reg(&inst.Src[1], TGSI_FILE_CONSTANT,
|
||||
ts->point_ivp, TGSI_SWIZZLE_X,
|
||||
TGSI_SWIZZLE_Y, TGSI_SWIZZLE_Z, TGSI_SWIZZLE_Z);
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
|
||||
/**
|
||||
* Set up the point coord threshold distance
|
||||
* k = 0.5 - 1 / pointsize
|
||||
*/
|
||||
if (ts->aa_point) {
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_DIV,
|
||||
TGSI_FILE_TEMPORARY, ts->point_coord_k,
|
||||
TGSI_WRITEMASK_X,
|
||||
TGSI_FILE_IMMEDIATE, ts->point_imm,
|
||||
TGSI_SWIZZLE_Y,
|
||||
TGSI_FILE_TEMPORARY, ts->point_size_tmp,
|
||||
TGSI_SWIZZLE_X);
|
||||
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_SUB,
|
||||
TGSI_FILE_TEMPORARY, ts->point_coord_k,
|
||||
TGSI_WRITEMASK_X,
|
||||
TGSI_FILE_IMMEDIATE, ts->point_imm,
|
||||
TGSI_SWIZZLE_Z,
|
||||
TGSI_FILE_TEMPORARY, ts->point_coord_k,
|
||||
TGSI_SWIZZLE_X);
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
unsigned point_dir_swz = ts->point_dir_swz[i];
|
||||
unsigned point_coord_swz = ts->point_coord_swz[i];
|
||||
|
||||
/* All outputs need to be emitted for each vertex */
|
||||
for (j = 0; j < ts->num_orig_out; j++) {
|
||||
if (ts->out_tmp_index[j] != INVALID_INDEX) {
|
||||
tgsi_transform_op1_inst(ctx, TGSI_OPCODE_MOV,
|
||||
TGSI_FILE_OUTPUT, j,
|
||||
TGSI_WRITEMASK_XYZW,
|
||||
TGSI_FILE_TEMPORARY, ts->out_tmp_index[j]);
|
||||
}
|
||||
}
|
||||
|
||||
/* pos = point_scale * point_dir + point_pos */
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = TGSI_OPCODE_MAD;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
tgsi_transform_dst_reg(&inst.Dst[0], TGSI_FILE_OUTPUT, ts->point_pos_out,
|
||||
TGSI_WRITEMASK_XYZW);
|
||||
inst.Instruction.NumSrcRegs = 3;
|
||||
tgsi_transform_src_reg(&inst.Src[0], TGSI_FILE_TEMPORARY, ts->point_scale_tmp,
|
||||
TGSI_SWIZZLE_X, TGSI_SWIZZLE_Y, TGSI_SWIZZLE_X,
|
||||
TGSI_SWIZZLE_X);
|
||||
tgsi_transform_src_reg(&inst.Src[1], TGSI_FILE_IMMEDIATE, ts->point_imm,
|
||||
get_swizzle(point_dir_swz, 0),
|
||||
get_swizzle(point_dir_swz, 1),
|
||||
get_swizzle(point_dir_swz, 2),
|
||||
get_swizzle(point_dir_swz, 3));
|
||||
tgsi_transform_src_reg(&inst.Src[2], TGSI_FILE_TEMPORARY, ts->point_pos_tmp,
|
||||
TGSI_SWIZZLE_X, TGSI_SWIZZLE_Y, TGSI_SWIZZLE_Z,
|
||||
TGSI_SWIZZLE_W);
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
|
||||
/* point coord */
|
||||
for (j = 0, s = 0, en = point_coord_enable; en; en>>=1, s++) {
|
||||
unsigned dstReg;
|
||||
|
||||
if (en & 0x1) {
|
||||
dstReg = ts->point_coord_out + j;
|
||||
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = TGSI_OPCODE_MOV;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
tgsi_transform_dst_reg(&inst.Dst[0], TGSI_FILE_OUTPUT,
|
||||
dstReg, TGSI_WRITEMASK_XYZW);
|
||||
inst.Instruction.NumSrcRegs = 1;
|
||||
tgsi_transform_src_reg(&inst.Src[0], TGSI_FILE_IMMEDIATE, ts->point_imm,
|
||||
get_swizzle(point_coord_swz, 0),
|
||||
get_swizzle(point_coord_swz, 1),
|
||||
get_swizzle(point_coord_swz, 2),
|
||||
get_swizzle(point_coord_swz, 3));
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
|
||||
/* MOV point_coord.z point_coord_k.x */
|
||||
if (s == ts->point_coord_aa) {
|
||||
tgsi_transform_op1_swz_inst(ctx, TGSI_OPCODE_MOV,
|
||||
TGSI_FILE_OUTPUT, dstReg, TGSI_WRITEMASK_Z,
|
||||
TGSI_FILE_TEMPORARY, ts->point_coord_k,
|
||||
TGSI_SWIZZLE_X);
|
||||
}
|
||||
j++; /* the next point coord output offset */
|
||||
}
|
||||
}
|
||||
|
||||
/* Emit the EMIT instruction for each vertex of the quad */
|
||||
ctx->emit_instruction(ctx, vert_inst);
|
||||
}
|
||||
|
||||
/* Emit the ENDPRIM instruction for the quad */
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = TGSI_OPCODE_ENDPRIM;
|
||||
inst.Instruction.NumDstRegs = 0;
|
||||
inst.Instruction.NumSrcRegs = 1;
|
||||
inst.Src[0] = vert_inst->Src[0];
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TGSI instruction transform callback.
|
||||
*/
|
||||
static void
|
||||
psprite_inst(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
struct psprite_transform_context *ts = psprite_transform_context(ctx);
|
||||
|
||||
if (inst->Instruction.Opcode == TGSI_OPCODE_EMIT) {
|
||||
psprite_emit_vertex_inst(ctx, inst);
|
||||
}
|
||||
else if (inst->Dst[0].Register.File == TGSI_FILE_OUTPUT &&
|
||||
inst->Dst[0].Register.Index == ts->point_size_out) {
|
||||
/**
|
||||
* Replace point size output reg with tmp reg.
|
||||
* The tmp reg will be later used as a src reg for computing
|
||||
* the point scale factor.
|
||||
*/
|
||||
inst->Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
inst->Dst[0].Register.Index = ts->point_size_tmp;
|
||||
ctx->emit_instruction(ctx, inst);
|
||||
|
||||
/* Clamp the point size */
|
||||
/* MAX point_size_tmp.x, point_size_tmp.x, point_imm.y */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_MAX,
|
||||
TGSI_FILE_TEMPORARY, ts->point_size_tmp, TGSI_WRITEMASK_X,
|
||||
TGSI_FILE_TEMPORARY, ts->point_size_tmp, TGSI_SWIZZLE_X,
|
||||
TGSI_FILE_IMMEDIATE, ts->point_imm, TGSI_SWIZZLE_Y);
|
||||
|
||||
/* MIN point_size_tmp.x, point_size_tmp.x, point_ivp.w */
|
||||
tgsi_transform_op2_swz_inst(ctx, TGSI_OPCODE_MIN,
|
||||
TGSI_FILE_TEMPORARY, ts->point_size_tmp, TGSI_WRITEMASK_X,
|
||||
TGSI_FILE_TEMPORARY, ts->point_size_tmp, TGSI_SWIZZLE_X,
|
||||
TGSI_FILE_CONSTANT, ts->point_ivp, TGSI_SWIZZLE_W);
|
||||
}
|
||||
else if (inst->Dst[0].Register.File == TGSI_FILE_OUTPUT &&
|
||||
inst->Dst[0].Register.Index == ts->point_pos_out) {
|
||||
/**
|
||||
* Replace point pos output reg with tmp reg.
|
||||
*/
|
||||
inst->Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
inst->Dst[0].Register.Index = ts->point_pos_tmp;
|
||||
ctx->emit_instruction(ctx, inst);
|
||||
}
|
||||
else if (inst->Dst[0].Register.File == TGSI_FILE_OUTPUT) {
|
||||
/**
|
||||
* Replace output reg with tmp reg.
|
||||
*/
|
||||
inst->Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
inst->Dst[0].Register.Index = ts->out_tmp_index[inst->Dst[0].Register.Index];
|
||||
ctx->emit_instruction(ctx, inst);
|
||||
}
|
||||
else {
|
||||
ctx->emit_instruction(ctx, inst);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TGSI property instruction transform callback.
|
||||
* Transforms a point into a 4-vertex triangle strip.
|
||||
*/
|
||||
static void
|
||||
psprite_property(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_property *prop)
|
||||
{
|
||||
switch (prop->Property.PropertyName) {
|
||||
case TGSI_PROPERTY_GS_OUTPUT_PRIM:
|
||||
prop->u[0].Data = PIPE_PRIM_TRIANGLE_STRIP;
|
||||
break;
|
||||
case TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES:
|
||||
prop->u[0].Data *= 4;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ctx->emit_property(ctx, prop);
|
||||
}
|
||||
|
||||
/**
|
||||
* TGSI utility to transform a geometry shader to support point sprite.
|
||||
*/
|
||||
struct tgsi_token *
|
||||
tgsi_add_point_sprite(const struct tgsi_token *tokens_in,
|
||||
const unsigned point_coord_enable,
|
||||
const bool sprite_origin_lower_left,
|
||||
const bool stream_out_point_pos,
|
||||
int *aa_point_coord_index)
|
||||
{
|
||||
struct psprite_transform_context transform;
|
||||
const uint num_new_tokens = 200; /* should be enough */
|
||||
const uint new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
|
||||
struct tgsi_token *new_tokens;
|
||||
|
||||
/* setup transformation context */
|
||||
memset(&transform, 0, sizeof(transform));
|
||||
transform.base.transform_declaration = psprite_decl;
|
||||
transform.base.transform_instruction = psprite_inst;
|
||||
transform.base.transform_property = psprite_property;
|
||||
transform.base.transform_immediate = psprite_immediate;
|
||||
transform.base.prolog = psprite_prolog;
|
||||
|
||||
transform.point_size_in = INVALID_INDEX;
|
||||
transform.point_size_out = INVALID_INDEX;
|
||||
transform.point_size_tmp = INVALID_INDEX;
|
||||
transform.point_pos_in = INVALID_INDEX;
|
||||
transform.point_pos_out = INVALID_INDEX;
|
||||
transform.point_pos_sout = INVALID_INDEX;
|
||||
transform.point_pos_tmp = INVALID_INDEX;
|
||||
transform.point_scale_tmp = INVALID_INDEX;
|
||||
transform.point_imm = INVALID_INDEX;
|
||||
transform.point_coord_aa = INVALID_INDEX;
|
||||
transform.point_coord_k = INVALID_INDEX;
|
||||
|
||||
transform.stream_out_point_pos = stream_out_point_pos;
|
||||
transform.point_coord_enable = point_coord_enable;
|
||||
transform.aa_point = aa_point_coord_index != NULL;
|
||||
transform.max_generic = -1;
|
||||
|
||||
/* point sprite directions based on the immediates (0, 1, 0.5, -1) */
|
||||
/* (-1, -1, 0, 0) */
|
||||
transform.point_dir_swz[0] = set_swizzle(-1, -1, 0, 0);
|
||||
/* (-1, 1, 0, 0) */
|
||||
transform.point_dir_swz[1] = set_swizzle(-1, 1, 0, 0);
|
||||
/* (1, -1, 0, 0) */
|
||||
transform.point_dir_swz[2] = set_swizzle(1, -1, 0, 0);
|
||||
/* (1, 1, 0, 0) */
|
||||
transform.point_dir_swz[3] = set_swizzle(1, 1, 0, 0);
|
||||
|
||||
/* point coord based on the immediates (0, 1, 0, -1) */
|
||||
if (sprite_origin_lower_left) {
|
||||
/* (0, 0, 0, 1) */
|
||||
transform.point_coord_swz[0] = set_swizzle(0, 0, 0, 1);
|
||||
/* (0, 1, 0, 1) */
|
||||
transform.point_coord_swz[1] = set_swizzle(0, 1, 0, 1);
|
||||
/* (1, 0, 0, 1) */
|
||||
transform.point_coord_swz[2] = set_swizzle(1, 0, 0, 1);
|
||||
/* (1, 1, 0, 1) */
|
||||
transform.point_coord_swz[3] = set_swizzle(1, 1, 0, 1);
|
||||
}
|
||||
else {
|
||||
/* (0, 1, 0, 1) */
|
||||
transform.point_coord_swz[0] = set_swizzle(0, 1, 0, 1);
|
||||
/* (0, 0, 0, 1) */
|
||||
transform.point_coord_swz[1] = set_swizzle(0, 0, 0, 1);
|
||||
/* (1, 1, 0, 1) */
|
||||
transform.point_coord_swz[2] = set_swizzle(1, 1, 0, 1);
|
||||
/* (1, 0, 0, 1) */
|
||||
transform.point_coord_swz[3] = set_swizzle(1, 0, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
/* allocate new tokens buffer */
|
||||
new_tokens = tgsi_alloc_tokens(new_len);
|
||||
if (!new_tokens)
|
||||
return NULL;
|
||||
|
||||
/* transform the shader */
|
||||
tgsi_transform_shader(tokens_in, new_tokens, new_len, &transform.base);
|
||||
|
||||
if (aa_point_coord_index)
|
||||
*aa_point_coord_index = transform.point_coord_aa;
|
||||
|
||||
return new_tokens;
|
||||
}
|
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright 2014 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
#ifndef TGSI_POINT_SPRITE_H
|
||||
#define TGSI_POINT_SPRITE_H
|
||||
|
||||
struct tgsi_token;
|
||||
|
||||
struct tgsi_token *
|
||||
tgsi_add_point_sprite(const struct tgsi_token *tokens_in,
|
||||
const unsigned point_coord_enable,
|
||||
const bool sprite_origin_lower_left,
|
||||
const bool stream_out_point_pos,
|
||||
int *aa_point_coord_index);
|
||||
|
||||
#endif /* TGSI_POINT_SPRITE_H */
|
@@ -56,7 +56,6 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
|
||||
{
|
||||
uint procType, i;
|
||||
struct tgsi_parse_context parse;
|
||||
unsigned current_depth = 0;
|
||||
|
||||
memset(info, 0, sizeof(*info));
|
||||
for (i = 0; i < TGSI_FILE_COUNT; i++)
|
||||
@@ -101,72 +100,6 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
|
||||
assert(fullinst->Instruction.Opcode < TGSI_OPCODE_LAST);
|
||||
info->opcode_count[fullinst->Instruction.Opcode]++;
|
||||
|
||||
switch (fullinst->Instruction.Opcode) {
|
||||
case TGSI_OPCODE_IF:
|
||||
case TGSI_OPCODE_UIF:
|
||||
case TGSI_OPCODE_BGNLOOP:
|
||||
current_depth++;
|
||||
info->max_depth = MAX2(info->max_depth, current_depth);
|
||||
break;
|
||||
case TGSI_OPCODE_ENDIF:
|
||||
case TGSI_OPCODE_ENDLOOP:
|
||||
current_depth--;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (fullinst->Instruction.Opcode == TGSI_OPCODE_INTERP_CENTROID ||
|
||||
fullinst->Instruction.Opcode == TGSI_OPCODE_INTERP_OFFSET ||
|
||||
fullinst->Instruction.Opcode == TGSI_OPCODE_INTERP_SAMPLE) {
|
||||
const struct tgsi_full_src_register *src0 = &fullinst->Src[0];
|
||||
unsigned input;
|
||||
|
||||
if (src0->Register.Indirect && src0->Indirect.ArrayID)
|
||||
input = info->input_array_first[src0->Indirect.ArrayID];
|
||||
else
|
||||
input = src0->Register.Index;
|
||||
|
||||
/* For the INTERP opcodes, the interpolation is always
|
||||
* PERSPECTIVE unless LINEAR is specified.
|
||||
*/
|
||||
switch (info->input_interpolate[input]) {
|
||||
case TGSI_INTERPOLATE_COLOR:
|
||||
case TGSI_INTERPOLATE_CONSTANT:
|
||||
case TGSI_INTERPOLATE_PERSPECTIVE:
|
||||
switch (fullinst->Instruction.Opcode) {
|
||||
case TGSI_OPCODE_INTERP_CENTROID:
|
||||
info->uses_persp_opcode_interp_centroid = true;
|
||||
break;
|
||||
case TGSI_OPCODE_INTERP_OFFSET:
|
||||
info->uses_persp_opcode_interp_offset = true;
|
||||
break;
|
||||
case TGSI_OPCODE_INTERP_SAMPLE:
|
||||
info->uses_persp_opcode_interp_sample = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case TGSI_INTERPOLATE_LINEAR:
|
||||
switch (fullinst->Instruction.Opcode) {
|
||||
case TGSI_OPCODE_INTERP_CENTROID:
|
||||
info->uses_linear_opcode_interp_centroid = true;
|
||||
break;
|
||||
case TGSI_OPCODE_INTERP_OFFSET:
|
||||
info->uses_linear_opcode_interp_offset = true;
|
||||
break;
|
||||
case TGSI_OPCODE_INTERP_SAMPLE:
|
||||
info->uses_linear_opcode_interp_sample = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (fullinst->Instruction.Opcode >= TGSI_OPCODE_F2D &&
|
||||
fullinst->Instruction.Opcode <= TGSI_OPCODE_DSSG)
|
||||
info->uses_doubles = true;
|
||||
|
||||
for (i = 0; i < fullinst->Instruction.NumSrcRegs; i++) {
|
||||
const struct tgsi_full_src_register *src =
|
||||
&fullinst->Src[i];
|
||||
@@ -283,48 +216,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
|
||||
info->input_cylindrical_wrap[reg] = (ubyte)fulldecl->Interp.CylindricalWrap;
|
||||
info->num_inputs++;
|
||||
|
||||
/* Only interpolated varyings. Don't include POSITION.
|
||||
* Don't include integer varyings, because they are not
|
||||
* interpolated.
|
||||
*/
|
||||
if (semName == TGSI_SEMANTIC_GENERIC ||
|
||||
semName == TGSI_SEMANTIC_TEXCOORD ||
|
||||
semName == TGSI_SEMANTIC_COLOR ||
|
||||
semName == TGSI_SEMANTIC_BCOLOR ||
|
||||
semName == TGSI_SEMANTIC_FOG ||
|
||||
semName == TGSI_SEMANTIC_CLIPDIST ||
|
||||
semName == TGSI_SEMANTIC_CULLDIST) {
|
||||
switch (fulldecl->Interp.Interpolate) {
|
||||
case TGSI_INTERPOLATE_COLOR:
|
||||
case TGSI_INTERPOLATE_PERSPECTIVE:
|
||||
switch (fulldecl->Interp.Location) {
|
||||
case TGSI_INTERPOLATE_LOC_CENTER:
|
||||
info->uses_persp_center = true;
|
||||
break;
|
||||
case TGSI_INTERPOLATE_LOC_CENTROID:
|
||||
info->uses_persp_centroid = true;
|
||||
break;
|
||||
case TGSI_INTERPOLATE_LOC_SAMPLE:
|
||||
info->uses_persp_sample = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case TGSI_INTERPOLATE_LINEAR:
|
||||
switch (fulldecl->Interp.Location) {
|
||||
case TGSI_INTERPOLATE_LOC_CENTER:
|
||||
info->uses_linear_center = true;
|
||||
break;
|
||||
case TGSI_INTERPOLATE_LOC_CENTROID:
|
||||
info->uses_linear_centroid = true;
|
||||
break;
|
||||
case TGSI_INTERPOLATE_LOC_SAMPLE:
|
||||
info->uses_linear_sample = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
/* TGSI_INTERPOLATE_CONSTANT doesn't do any interpolation. */
|
||||
}
|
||||
}
|
||||
if (fulldecl->Interp.Location == TGSI_INTERPOLATE_LOC_CENTROID)
|
||||
info->uses_centroid = TRUE;
|
||||
|
||||
if (semName == TGSI_SEMANTIC_PRIMID)
|
||||
info->uses_primid = TRUE;
|
||||
@@ -409,8 +302,6 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
|
||||
info->writes_edgeflag = TRUE;
|
||||
}
|
||||
}
|
||||
} else if (file == TGSI_FILE_SAMPLER) {
|
||||
info->samplers_declared |= 1 << reg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -64,7 +64,6 @@ struct tgsi_shader_info
|
||||
uint file_count[TGSI_FILE_COUNT]; /**< number of declared registers */
|
||||
int file_max[TGSI_FILE_COUNT]; /**< highest index of declared registers */
|
||||
int const_file_max[PIPE_MAX_CONSTANT_BUFFERS];
|
||||
unsigned samplers_declared; /**< bitmask of declared samplers */
|
||||
|
||||
ubyte input_array_first[PIPE_MAX_SHADER_INPUTS];
|
||||
ubyte input_array_last[PIPE_MAX_SHADER_INPUTS];
|
||||
@@ -83,18 +82,7 @@ struct tgsi_shader_info
|
||||
boolean writes_stencil; /**< does fragment shader write stencil value? */
|
||||
boolean writes_edgeflag; /**< vertex shader outputs edgeflag */
|
||||
boolean uses_kill; /**< KILL or KILL_IF instruction used? */
|
||||
boolean uses_persp_center;
|
||||
boolean uses_persp_centroid;
|
||||
boolean uses_persp_sample;
|
||||
boolean uses_linear_center;
|
||||
boolean uses_linear_centroid;
|
||||
boolean uses_linear_sample;
|
||||
boolean uses_persp_opcode_interp_centroid;
|
||||
boolean uses_persp_opcode_interp_offset;
|
||||
boolean uses_persp_opcode_interp_sample;
|
||||
boolean uses_linear_opcode_interp_centroid;
|
||||
boolean uses_linear_opcode_interp_offset;
|
||||
boolean uses_linear_opcode_interp_sample;
|
||||
boolean uses_centroid;
|
||||
boolean uses_instanceid;
|
||||
boolean uses_vertexid;
|
||||
boolean uses_vertexid_nobase;
|
||||
@@ -107,7 +95,7 @@ struct tgsi_shader_info
|
||||
boolean writes_viewport_index;
|
||||
boolean writes_layer;
|
||||
boolean is_msaa_sampler[PIPE_MAX_SAMPLERS];
|
||||
boolean uses_doubles; /**< uses any of the double instructions */
|
||||
|
||||
unsigned clipdist_writemask;
|
||||
unsigned culldist_writemask;
|
||||
unsigned num_written_culldistance;
|
||||
@@ -125,11 +113,6 @@ struct tgsi_shader_info
|
||||
unsigned indirect_files_written;
|
||||
|
||||
unsigned properties[TGSI_PROPERTY_COUNT]; /* index with TGSI_PROPERTY_ */
|
||||
|
||||
/**
|
||||
* Max nesting limit of loops/if's
|
||||
*/
|
||||
unsigned max_depth;
|
||||
};
|
||||
|
||||
extern void
|
||||
|
@@ -95,38 +95,19 @@ struct tgsi_transform_context
|
||||
* Helper for emitting temporary register declarations.
|
||||
*/
|
||||
static inline void
|
||||
tgsi_transform_temps_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned firstIdx, unsigned lastIdx)
|
||||
tgsi_transform_temp_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index)
|
||||
{
|
||||
struct tgsi_full_declaration decl;
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.Range.First = firstIdx;
|
||||
decl.Range.Last = lastIdx;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = index;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
static inline void
|
||||
tgsi_transform_temp_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index)
|
||||
{
|
||||
tgsi_transform_temps_decl(ctx, index, index);
|
||||
}
|
||||
|
||||
static inline void
|
||||
tgsi_transform_const_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned firstIdx, unsigned lastIdx)
|
||||
{
|
||||
struct tgsi_full_declaration decl;
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_CONSTANT;
|
||||
decl.Range.First = firstIdx;
|
||||
decl.Range.Last = lastIdx;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
static inline void
|
||||
tgsi_transform_input_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index,
|
||||
@@ -148,26 +129,6 @@ tgsi_transform_input_decl(struct tgsi_transform_context *ctx,
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
static inline void
|
||||
tgsi_transform_output_decl(struct tgsi_transform_context *ctx,
|
||||
unsigned index,
|
||||
unsigned sem_name, unsigned sem_index,
|
||||
unsigned interp)
|
||||
{
|
||||
struct tgsi_full_declaration decl;
|
||||
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_OUTPUT;
|
||||
decl.Declaration.Interpolate = 1;
|
||||
decl.Declaration.Semantic = 1;
|
||||
decl.Semantic.Name = sem_name;
|
||||
decl.Semantic.Index = sem_index;
|
||||
decl.Range.First =
|
||||
decl.Range.Last = index;
|
||||
decl.Interp.Interpolate = interp;
|
||||
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
}
|
||||
|
||||
static inline void
|
||||
tgsi_transform_sampler_decl(struct tgsi_transform_context *ctx,
|
||||
@@ -221,28 +182,6 @@ tgsi_transform_immediate_decl(struct tgsi_transform_context *ctx,
|
||||
ctx->emit_immediate(ctx, &immed);
|
||||
}
|
||||
|
||||
static inline void
|
||||
tgsi_transform_dst_reg(struct tgsi_full_dst_register *reg,
|
||||
unsigned file, unsigned index, unsigned writemask)
|
||||
{
|
||||
reg->Register.File = file;
|
||||
reg->Register.Index = index;
|
||||
reg->Register.WriteMask = writemask;
|
||||
}
|
||||
|
||||
static inline void
|
||||
tgsi_transform_src_reg(struct tgsi_full_src_register *reg,
|
||||
unsigned file, unsigned index,
|
||||
unsigned swizzleX, unsigned swizzleY,
|
||||
unsigned swizzleZ, unsigned swizzleW)
|
||||
{
|
||||
reg->Register.File = file;
|
||||
reg->Register.Index = index;
|
||||
reg->Register.SwizzleX = swizzleX;
|
||||
reg->Register.SwizzleY = swizzleY;
|
||||
reg->Register.SwizzleZ = swizzleZ;
|
||||
reg->Register.SwizzleW = swizzleW;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper for emitting 1-operand instructions.
|
||||
@@ -460,8 +399,7 @@ static inline void
|
||||
tgsi_transform_kill_inst(struct tgsi_transform_context *ctx,
|
||||
unsigned src_file,
|
||||
unsigned src_index,
|
||||
unsigned src_swizzle,
|
||||
boolean negate)
|
||||
unsigned src_swizzle)
|
||||
{
|
||||
struct tgsi_full_instruction inst;
|
||||
|
||||
@@ -475,7 +413,7 @@ tgsi_transform_kill_inst(struct tgsi_transform_context *ctx,
|
||||
inst.Src[0].Register.SwizzleY =
|
||||
inst.Src[0].Register.SwizzleZ =
|
||||
inst.Src[0].Register.SwizzleW = src_swizzle;
|
||||
inst.Src[0].Register.Negate = negate;
|
||||
inst.Src[0].Register.Negate = 1;
|
||||
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
|
@@ -1,228 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* This utility transforms fragment shaders to facilitate two-sided lighting.
|
||||
*
|
||||
* Basically, if the FS has any color inputs (TGSI_SEMANTIC_COLOR) we'll:
|
||||
* 1. create corresponding back-color inputs (TGSI_SEMANTIC_BCOLOR)
|
||||
* 2. use the FACE register to choose between front/back colors and put the
|
||||
* selected color in new temp regs.
|
||||
* 3. replace reads of the original color inputs with the new temp regs.
|
||||
*
|
||||
* Then, the driver just needs to link the VS front/back output colors to
|
||||
* the FS front/back input colors.
|
||||
*/
|
||||
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_math.h"
|
||||
#include "tgsi_info.h"
|
||||
#include "tgsi_two_side.h"
|
||||
#include "tgsi_transform.h"
|
||||
|
||||
|
||||
#define INVALID_INDEX 9999
|
||||
|
||||
|
||||
struct two_side_transform_context
|
||||
{
|
||||
struct tgsi_transform_context base;
|
||||
uint num_temps;
|
||||
uint num_inputs;
|
||||
uint face_input; /**< index of the FACE input */
|
||||
uint front_color_input[2]; /**< INPUT regs */
|
||||
uint front_color_interp[2];/**< TGSI_INTERPOLATE_x */
|
||||
uint back_color_input[2]; /**< INPUT regs */
|
||||
uint new_colors[2]; /**< TEMP regs */
|
||||
};
|
||||
|
||||
|
||||
static inline struct two_side_transform_context *
|
||||
two_side_transform_context(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
return (struct two_side_transform_context *) ctx;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
xform_decl(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_declaration *decl)
|
||||
{
|
||||
struct two_side_transform_context *ts = two_side_transform_context(ctx);
|
||||
|
||||
if (decl->Declaration.File == TGSI_FILE_INPUT) {
|
||||
if (decl->Semantic.Name == TGSI_SEMANTIC_COLOR) {
|
||||
/* found a front color */
|
||||
assert(decl->Semantic.Index < 2);
|
||||
ts->front_color_input[decl->Semantic.Index] = decl->Range.First;
|
||||
ts->front_color_interp[decl->Semantic.Index] = decl->Interp.Interpolate;
|
||||
}
|
||||
else if (decl->Semantic.Name == TGSI_SEMANTIC_FACE) {
|
||||
ts->face_input = decl->Range.First;
|
||||
}
|
||||
ts->num_inputs = MAX2(ts->num_inputs, decl->Range.Last + 1);
|
||||
}
|
||||
else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
|
||||
ts->num_temps = MAX2(ts->num_temps, decl->Range.Last + 1);
|
||||
}
|
||||
|
||||
ctx->emit_declaration(ctx, decl);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
emit_prolog(struct tgsi_transform_context *ctx)
|
||||
{
|
||||
struct two_side_transform_context *ts = two_side_transform_context(ctx);
|
||||
struct tgsi_full_declaration decl;
|
||||
struct tgsi_full_instruction inst;
|
||||
uint num_colors = 0;
|
||||
uint i;
|
||||
|
||||
/* Declare 0, 1 or 2 new BCOLOR inputs */
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (ts->front_color_input[i] != INVALID_INDEX) {
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_INPUT;
|
||||
decl.Declaration.Interpolate = 1;
|
||||
decl.Declaration.Semantic = 1;
|
||||
decl.Semantic.Name = TGSI_SEMANTIC_BCOLOR;
|
||||
decl.Semantic.Index = i;
|
||||
decl.Range.First = decl.Range.Last = ts->num_inputs++;
|
||||
decl.Interp.Interpolate = ts->front_color_interp[i];
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
ts->back_color_input[i] = decl.Range.First;
|
||||
num_colors++;
|
||||
}
|
||||
}
|
||||
|
||||
if (num_colors > 0) {
|
||||
/* Declare 1 or 2 temp registers */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_TEMPORARY;
|
||||
decl.Range.First = ts->num_temps;
|
||||
decl.Range.Last = ts->num_temps + num_colors - 1;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
ts->new_colors[0] = ts->num_temps;
|
||||
ts->new_colors[1] = ts->num_temps + 1;
|
||||
|
||||
if (ts->face_input == INVALID_INDEX) {
|
||||
/* declare FACE INPUT register */
|
||||
decl = tgsi_default_full_declaration();
|
||||
decl.Declaration.File = TGSI_FILE_INPUT;
|
||||
decl.Declaration.Semantic = 1;
|
||||
decl.Semantic.Name = TGSI_SEMANTIC_FACE;
|
||||
decl.Semantic.Index = 0;
|
||||
decl.Range.First = decl.Range.Last = ts->num_inputs++;
|
||||
ctx->emit_declaration(ctx, &decl);
|
||||
ts->face_input = decl.Range.First;
|
||||
}
|
||||
|
||||
/* CMP temp[c0], face, bcolor[c0], fcolor[c0]
|
||||
* temp[c0] = face < 0.0 ? bcolor[c0] : fcolor[c0]
|
||||
*/
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (ts->front_color_input[i] != INVALID_INDEX) {
|
||||
inst = tgsi_default_full_instruction();
|
||||
inst.Instruction.Opcode = TGSI_OPCODE_CMP;
|
||||
inst.Instruction.NumDstRegs = 1;
|
||||
inst.Dst[0].Register.File = TGSI_FILE_TEMPORARY;
|
||||
inst.Dst[0].Register.Index = ts->new_colors[i];
|
||||
inst.Instruction.NumSrcRegs = 3;
|
||||
inst.Src[0].Register.File = TGSI_FILE_INPUT;
|
||||
inst.Src[0].Register.Index = ts->face_input;
|
||||
inst.Src[1].Register.File = TGSI_FILE_INPUT;
|
||||
inst.Src[1].Register.Index = ts->back_color_input[i];
|
||||
inst.Src[2].Register.File = TGSI_FILE_INPUT;
|
||||
inst.Src[2].Register.Index = ts->front_color_input[i];
|
||||
|
||||
ctx->emit_instruction(ctx, &inst);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
xform_inst(struct tgsi_transform_context *ctx,
|
||||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
struct two_side_transform_context *ts = two_side_transform_context(ctx);
|
||||
const struct tgsi_opcode_info *info =
|
||||
tgsi_get_opcode_info(inst->Instruction.Opcode);
|
||||
uint i, j;
|
||||
|
||||
/* Look for src regs which reference the input color and replace
|
||||
* them with the temp color.
|
||||
*/
|
||||
for (i = 0; i < info->num_src; i++) {
|
||||
if (inst->Src[i].Register.File == TGSI_FILE_INPUT) {
|
||||
for (j = 0; j < 2; j++) {
|
||||
if (inst->Src[i].Register.Index == ts->front_color_input[j]) {
|
||||
/* replace color input with temp reg */
|
||||
inst->Src[i].Register.File = TGSI_FILE_TEMPORARY;
|
||||
inst->Src[i].Register.Index = ts->new_colors[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ctx->emit_instruction(ctx, inst);
|
||||
}
|
||||
|
||||
|
||||
struct tgsi_token *
|
||||
tgsi_add_two_side(const struct tgsi_token *tokens_in)
|
||||
{
|
||||
struct two_side_transform_context transform;
|
||||
const uint num_new_tokens = 100; /* should be enough */
|
||||
const uint new_len = tgsi_num_tokens(tokens_in) + num_new_tokens;
|
||||
struct tgsi_token *new_tokens;
|
||||
|
||||
/* setup transformation context */
|
||||
memset(&transform, 0, sizeof(transform));
|
||||
transform.base.transform_declaration = xform_decl;
|
||||
transform.base.transform_instruction = xform_inst;
|
||||
transform.base.prolog = emit_prolog;
|
||||
transform.face_input = INVALID_INDEX;
|
||||
transform.front_color_input[0] = INVALID_INDEX;
|
||||
transform.front_color_input[1] = INVALID_INDEX;
|
||||
transform.front_color_interp[0] = TGSI_INTERPOLATE_COLOR;
|
||||
transform.front_color_interp[1] = TGSI_INTERPOLATE_COLOR;
|
||||
transform.back_color_input[0] = INVALID_INDEX;
|
||||
transform.back_color_input[1] = INVALID_INDEX;
|
||||
|
||||
/* allocate new tokens buffer */
|
||||
new_tokens = tgsi_alloc_tokens(new_len);
|
||||
if (!new_tokens)
|
||||
return NULL;
|
||||
|
||||
/* transform the shader */
|
||||
tgsi_transform_shader(tokens_in, new_tokens, new_len, &transform.base);
|
||||
|
||||
return new_tokens;
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
#ifndef TGSI_TWO_SIDE_H
|
||||
#define TGSI_TWO_SIDE_H
|
||||
|
||||
struct tgsi_token;
|
||||
|
||||
struct tgsi_token *
|
||||
tgsi_add_two_side(const struct tgsi_token *tokens_in);
|
||||
|
||||
#endif /* TGSI_TWO_SIDE_H */
|
@@ -462,21 +462,3 @@ tgsi_util_get_texture_coord_dim(int tgsi_tex, int *shadow_or_sample)
|
||||
|
||||
return dim;
|
||||
}
|
||||
|
||||
|
||||
boolean
|
||||
tgsi_is_shadow_target(unsigned target)
|
||||
{
|
||||
switch (target) {
|
||||
case TGSI_TEXTURE_SHADOW1D:
|
||||
case TGSI_TEXTURE_SHADOW2D:
|
||||
case TGSI_TEXTURE_SHADOWRECT:
|
||||
case TGSI_TEXTURE_SHADOW1D_ARRAY:
|
||||
case TGSI_TEXTURE_SHADOW2D_ARRAY:
|
||||
case TGSI_TEXTURE_SHADOWCUBE:
|
||||
case TGSI_TEXTURE_SHADOWCUBE_ARRAY:
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@@ -82,9 +82,6 @@ tgsi_util_get_src_from_ind(const struct tgsi_ind_register *reg);
|
||||
int
|
||||
tgsi_util_get_texture_coord_dim(int tgsi_tex, int *shadow_or_sample);
|
||||
|
||||
boolean
|
||||
tgsi_is_shadow_target(unsigned target);
|
||||
|
||||
#if defined __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -1190,8 +1190,6 @@ static void blitter_draw(struct blitter_context_priv *ctx,
|
||||
|
||||
u_upload_data(ctx->upload, 0, sizeof(ctx->vertices), ctx->vertices,
|
||||
&vb.buffer_offset, &vb.buffer);
|
||||
if (!vb.buffer)
|
||||
return;
|
||||
u_upload_unmap(ctx->upload);
|
||||
|
||||
pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, &vb);
|
||||
@@ -2065,7 +2063,7 @@ void util_blitter_clear_buffer(struct blitter_context *blitter,
|
||||
struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
|
||||
struct pipe_context *pipe = ctx->base.pipe;
|
||||
struct pipe_vertex_buffer vb = {0};
|
||||
struct pipe_stream_output_target *so_target = NULL;
|
||||
struct pipe_stream_output_target *so_target;
|
||||
unsigned offsets[PIPE_MAX_SO_BUFFERS] = {0};
|
||||
|
||||
assert(num_channels >= 1);
|
||||
@@ -2091,9 +2089,6 @@ void util_blitter_clear_buffer(struct blitter_context *blitter,
|
||||
|
||||
u_upload_data(ctx->upload, 0, num_channels*4, clear_value,
|
||||
&vb.buffer_offset, &vb.buffer);
|
||||
if (!vb.buffer)
|
||||
goto out;
|
||||
|
||||
vb.stride = 0;
|
||||
|
||||
blitter_set_running_flag(ctx);
|
||||
@@ -2117,7 +2112,6 @@ void util_blitter_clear_buffer(struct blitter_context *blitter,
|
||||
|
||||
util_draw_arrays(pipe, PIPE_PRIM_POINTS, 0, size / 4);
|
||||
|
||||
out:
|
||||
blitter_restore_vertex_states(ctx);
|
||||
blitter_restore_render_cond(ctx);
|
||||
blitter_unset_running_flag(ctx);
|
||||
|
@@ -88,18 +88,3 @@ void util_set_vertex_buffers_count(struct pipe_vertex_buffer *dst,
|
||||
|
||||
*dst_count = util_last_bit(enabled_buffers);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
util_set_index_buffer(struct pipe_index_buffer *dst,
|
||||
const struct pipe_index_buffer *src)
|
||||
{
|
||||
if (src) {
|
||||
pipe_resource_reference(&dst->buffer, src->buffer);
|
||||
memcpy(dst, src, sizeof(*dst));
|
||||
}
|
||||
else {
|
||||
pipe_resource_reference(&dst->buffer, NULL);
|
||||
memset(dst, 0, sizeof(*dst));
|
||||
}
|
||||
}
|
||||
|
@@ -44,9 +44,6 @@ void util_set_vertex_buffers_count(struct pipe_vertex_buffer *dst,
|
||||
const struct pipe_vertex_buffer *src,
|
||||
unsigned start_slot, unsigned count);
|
||||
|
||||
void util_set_index_buffer(struct pipe_index_buffer *dst,
|
||||
const struct pipe_index_buffer *src);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -389,26 +389,6 @@ unsigned ffs( unsigned u )
|
||||
#define ffs __builtin_ffs
|
||||
#endif
|
||||
|
||||
#ifdef HAVE___BUILTIN_FFSLL
|
||||
#define ffsll __builtin_ffsll
|
||||
#else
|
||||
static inline int
|
||||
ffsll(long long int val)
|
||||
{
|
||||
int bit;
|
||||
|
||||
bit = ffs((unsigned) (val & 0xffffffff));
|
||||
if (bit != 0)
|
||||
return bit;
|
||||
|
||||
bit = ffs((unsigned) (val >> 32));
|
||||
if (bit != 0)
|
||||
return 32 + bit;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FFS_DEFINED */
|
||||
|
||||
/**
|
||||
@@ -503,26 +483,6 @@ u_bit_scan64(uint64_t *mask)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* For looping over a bitmask when you want to loop over consecutive bits
|
||||
* manually, for example:
|
||||
*
|
||||
* while (mask) {
|
||||
* int start, count, i;
|
||||
*
|
||||
* u_bit_scan_consecutive_range(&mask, &start, &count);
|
||||
*
|
||||
* for (i = 0; i < count; i++)
|
||||
* ... process element (start+i)
|
||||
* }
|
||||
*/
|
||||
static inline void
|
||||
u_bit_scan_consecutive_range(unsigned *mask, int *start, int *count)
|
||||
{
|
||||
*start = ffs(*mask) - 1;
|
||||
*count = ffs(~(*mask >> *start)) - 1;
|
||||
*mask &= ~(((1 << *count) - 1) << *start);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return float bits.
|
||||
*/
|
||||
|
@@ -1,267 +0,0 @@
|
||||
/*
|
||||
* Copyright 2014 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "u_inlines.h"
|
||||
#include "u_memory.h"
|
||||
#include "u_prim_restart.h"
|
||||
|
||||
|
||||
/**
|
||||
* Translate an index buffer for primitive restart.
|
||||
* Create a new index buffer which is a copy of the original index buffer
|
||||
* except that instances of 'restart_index' are converted to 0xffff or
|
||||
* 0xffffffff.
|
||||
* Also, index buffers using 1-byte indexes are converted to 2-byte indexes.
|
||||
*/
|
||||
enum pipe_error
|
||||
util_translate_prim_restart_ib(struct pipe_context *context,
|
||||
struct pipe_index_buffer *src_buffer,
|
||||
struct pipe_resource **dst_buffer,
|
||||
unsigned num_indexes,
|
||||
unsigned restart_index)
|
||||
{
|
||||
struct pipe_screen *screen = context->screen;
|
||||
struct pipe_transfer *src_transfer = NULL, *dst_transfer = NULL;
|
||||
void *src_map = NULL, *dst_map = NULL;
|
||||
const unsigned src_index_size = src_buffer->index_size;
|
||||
unsigned dst_index_size;
|
||||
|
||||
/* 1-byte indexes are converted to 2-byte indexes, 4-byte stays 4-byte */
|
||||
dst_index_size = MAX2(2, src_buffer->index_size);
|
||||
assert(dst_index_size == 2 || dst_index_size == 4);
|
||||
|
||||
/* no user buffers for now */
|
||||
assert(src_buffer->user_buffer == NULL);
|
||||
|
||||
/* Create new index buffer */
|
||||
*dst_buffer = pipe_buffer_create(screen, PIPE_BIND_INDEX_BUFFER,
|
||||
PIPE_USAGE_STREAM,
|
||||
num_indexes * dst_index_size);
|
||||
if (!*dst_buffer)
|
||||
goto error;
|
||||
|
||||
/* Map new / dest index buffer */
|
||||
dst_map = pipe_buffer_map(context, *dst_buffer,
|
||||
PIPE_TRANSFER_WRITE, &dst_transfer);
|
||||
if (!dst_map)
|
||||
goto error;
|
||||
|
||||
/* Map original / src index buffer */
|
||||
src_map = pipe_buffer_map_range(context, src_buffer->buffer,
|
||||
src_buffer->offset,
|
||||
num_indexes * src_index_size,
|
||||
PIPE_TRANSFER_READ,
|
||||
&src_transfer);
|
||||
if (!src_map)
|
||||
goto error;
|
||||
|
||||
if (src_index_size == 1 && dst_index_size == 2) {
|
||||
uint8_t *src = (uint8_t *) src_map;
|
||||
uint16_t *dst = (uint16_t *) dst_map;
|
||||
unsigned i;
|
||||
for (i = 0; i < num_indexes; i++) {
|
||||
dst[i] = (src[i] == restart_index) ? 0xffff : src[i];
|
||||
}
|
||||
}
|
||||
else if (src_index_size == 2 && dst_index_size == 2) {
|
||||
uint16_t *src = (uint16_t *) src_map;
|
||||
uint16_t *dst = (uint16_t *) dst_map;
|
||||
unsigned i;
|
||||
for (i = 0; i < num_indexes; i++) {
|
||||
dst[i] = (src[i] == restart_index) ? 0xffff : src[i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
uint32_t *src = (uint32_t *) src_map;
|
||||
uint32_t *dst = (uint32_t *) dst_map;
|
||||
unsigned i;
|
||||
assert(src_index_size == 4);
|
||||
assert(dst_index_size == 4);
|
||||
for (i = 0; i < num_indexes; i++) {
|
||||
dst[i] = (src[i] == restart_index) ? 0xffffffff : src[i];
|
||||
}
|
||||
}
|
||||
|
||||
pipe_buffer_unmap(context, src_transfer);
|
||||
pipe_buffer_unmap(context, dst_transfer);
|
||||
|
||||
return PIPE_OK;
|
||||
|
||||
error:
|
||||
if (src_transfer)
|
||||
pipe_buffer_unmap(context, src_transfer);
|
||||
if (dst_transfer)
|
||||
pipe_buffer_unmap(context, dst_transfer);
|
||||
if (*dst_buffer)
|
||||
screen->resource_destroy(screen, *dst_buffer);
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
/** Helper structs for util_draw_vbo_without_prim_restart() */
|
||||
|
||||
struct range {
|
||||
unsigned start, count;
|
||||
};
|
||||
|
||||
struct range_info {
|
||||
struct range *ranges;
|
||||
unsigned count, max;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Helper function for util_draw_vbo_without_prim_restart()
|
||||
* \return true for success, false if out of memory
|
||||
*/
|
||||
static boolean
|
||||
add_range(struct range_info *info, unsigned start, unsigned count)
|
||||
{
|
||||
if (info->max == 0) {
|
||||
info->max = 10;
|
||||
info->ranges = MALLOC(info->max * sizeof(struct range));
|
||||
if (!info->ranges) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else if (info->count == info->max) {
|
||||
/* grow the ranges[] array */
|
||||
info->ranges = REALLOC(info->ranges,
|
||||
info->max * sizeof(struct range),
|
||||
2 * info->max * sizeof(struct range));
|
||||
if (!info->ranges) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
info->max *= 2;
|
||||
}
|
||||
|
||||
/* save the range */
|
||||
info->ranges[info->count].start = start;
|
||||
info->ranges[info->count].count = count;
|
||||
info->count++;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implement primitive restart by breaking an indexed primitive into
|
||||
* pieces which do not contain restart indexes. Each piece is then
|
||||
* drawn by calling pipe_context::draw_vbo().
|
||||
* \return PIPE_OK if no error, an error code otherwise.
|
||||
*/
|
||||
enum pipe_error
|
||||
util_draw_vbo_without_prim_restart(struct pipe_context *context,
|
||||
const struct pipe_index_buffer *ib,
|
||||
const struct pipe_draw_info *info)
|
||||
{
|
||||
const void *src_map;
|
||||
struct range_info ranges = {0};
|
||||
struct pipe_draw_info new_info;
|
||||
struct pipe_transfer *src_transfer = NULL;
|
||||
unsigned i, start, count;
|
||||
|
||||
assert(info->indexed);
|
||||
assert(info->primitive_restart);
|
||||
|
||||
/* Get pointer to the index data */
|
||||
if (ib->buffer) {
|
||||
/* map the index buffer (only the range we need to scan) */
|
||||
src_map = pipe_buffer_map_range(context, ib->buffer,
|
||||
ib->offset + info->start * ib->index_size,
|
||||
info->count * ib->index_size,
|
||||
PIPE_TRANSFER_READ,
|
||||
&src_transfer);
|
||||
if (!src_map) {
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!ib->user_buffer) {
|
||||
debug_printf("User-space index buffer is null!");
|
||||
return PIPE_ERROR_BAD_INPUT;
|
||||
}
|
||||
src_map = (const uint8_t *) ib->user_buffer
|
||||
+ ib->offset
|
||||
+ info->start * ib->index_size;
|
||||
}
|
||||
|
||||
#define SCAN_INDEXES(TYPE) \
|
||||
for (i = 0; i <= info->count; i++) { \
|
||||
if (i == info->count || \
|
||||
((const TYPE *) src_map)[i] == info->restart_index) { \
|
||||
/* cut / restart */ \
|
||||
if (count > 0) { \
|
||||
if (!add_range(&ranges, info->start + start, count)) { \
|
||||
if (src_transfer) \
|
||||
pipe_buffer_unmap(context, src_transfer); \
|
||||
return PIPE_ERROR_OUT_OF_MEMORY; \
|
||||
} \
|
||||
} \
|
||||
start = i + 1; \
|
||||
count = 0; \
|
||||
} \
|
||||
else { \
|
||||
count++; \
|
||||
} \
|
||||
}
|
||||
|
||||
start = info->start;
|
||||
count = 0;
|
||||
switch (ib->index_size) {
|
||||
case 1:
|
||||
SCAN_INDEXES(uint8_t);
|
||||
break;
|
||||
case 2:
|
||||
SCAN_INDEXES(uint16_t);
|
||||
break;
|
||||
case 4:
|
||||
SCAN_INDEXES(uint32_t);
|
||||
break;
|
||||
default:
|
||||
assert(!"Bad index size");
|
||||
return PIPE_ERROR_BAD_INPUT;
|
||||
}
|
||||
|
||||
/* unmap index buffer */
|
||||
if (src_transfer)
|
||||
pipe_buffer_unmap(context, src_transfer);
|
||||
|
||||
/* draw ranges between the restart indexes */
|
||||
new_info = *info;
|
||||
new_info.primitive_restart = FALSE;
|
||||
for (i = 0; i < ranges.count; i++) {
|
||||
new_info.start = ranges.ranges[i].start;
|
||||
new_info.count = ranges.ranges[i].count;
|
||||
context->draw_vbo(context, &new_info);
|
||||
}
|
||||
|
||||
FREE(ranges.ranges);
|
||||
|
||||
return PIPE_OK;
|
||||
}
|
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright 2014 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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, sub license, 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 NON-INFRINGEMENT.
|
||||
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS 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.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef U_PRIM_RESTART_H
|
||||
#define U_PRIM_RESTART_H
|
||||
|
||||
|
||||
#include "pipe/p_defines.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
struct pipe_context;
|
||||
struct pipe_draw_info;
|
||||
struct pipe_index_buffer;
|
||||
struct pipe_resource;
|
||||
|
||||
|
||||
enum pipe_error
|
||||
util_translate_prim_restart_ib(struct pipe_context *context,
|
||||
struct pipe_index_buffer *src_buffer,
|
||||
struct pipe_resource **dst_buffer,
|
||||
unsigned num_indexes,
|
||||
unsigned restart_index);
|
||||
|
||||
enum pipe_error
|
||||
util_draw_vbo_without_prim_restart(struct pipe_context *context,
|
||||
const struct pipe_index_buffer *ib,
|
||||
const struct pipe_draw_info *info);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -339,7 +339,7 @@ pstip_transform_prolog(struct tgsi_transform_context *ctx)
|
||||
/* KILL_IF -texTemp; # if -texTemp < 0, kill fragment */
|
||||
tgsi_transform_kill_inst(ctx,
|
||||
TGSI_FILE_TEMPORARY, texTemp,
|
||||
TGSI_SWIZZLE_W, TRUE);
|
||||
TGSI_SWIZZLE_W);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -42,7 +42,6 @@ struct u_rect {
|
||||
};
|
||||
|
||||
/* Do two rectangles intersect?
|
||||
* Note: empty rectangles are valid as inputs (and never intersect).
|
||||
*/
|
||||
static inline boolean
|
||||
u_rect_test_intersection(const struct u_rect *a,
|
||||
@@ -51,11 +50,7 @@ u_rect_test_intersection(const struct u_rect *a,
|
||||
return (!(a->x1 < b->x0 ||
|
||||
b->x1 < a->x0 ||
|
||||
a->y1 < b->y0 ||
|
||||
b->y1 < a->y0 ||
|
||||
a->x1 < a->x0 ||
|
||||
a->y1 < a->y0 ||
|
||||
b->x1 < b->x0 ||
|
||||
b->y1 < b->y0));
|
||||
b->y1 < a->y0));
|
||||
}
|
||||
|
||||
/* Find the intersection of two rectangles known to intersect.
|
||||
@@ -87,12 +82,7 @@ u_rect_possible_intersection(const struct u_rect *a,
|
||||
u_rect_find_intersection(a,b);
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* Note the u_rect_xx tests deal with inclusive coordinates
|
||||
* hence all-zero would not be an empty box.
|
||||
*/
|
||||
b->x0 = b->y0 = 0;
|
||||
b->x1 = b->y1 = -1;
|
||||
b->x0 = b->x1 = b->y0 = b->y1 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -831,54 +831,3 @@ util_make_fs_msaa_resolve_bilinear(struct pipe_context *pipe,
|
||||
|
||||
return ureg_create_shader_and_destroy(ureg, pipe);
|
||||
}
|
||||
|
||||
void *
|
||||
util_make_geometry_passthrough_shader(struct pipe_context *pipe,
|
||||
uint num_attribs,
|
||||
const ubyte *semantic_names,
|
||||
const ubyte *semantic_indexes)
|
||||
{
|
||||
static const unsigned zero[4] = {0, 0, 0, 0};
|
||||
|
||||
struct ureg_program *ureg;
|
||||
struct ureg_dst dst[PIPE_MAX_SHADER_OUTPUTS];
|
||||
struct ureg_src src[PIPE_MAX_SHADER_INPUTS];
|
||||
struct ureg_src imm;
|
||||
|
||||
unsigned i;
|
||||
|
||||
ureg = ureg_create(TGSI_PROCESSOR_GEOMETRY);
|
||||
if (ureg == NULL)
|
||||
return NULL;
|
||||
|
||||
ureg_property(ureg, TGSI_PROPERTY_GS_INPUT_PRIM, PIPE_PRIM_POINTS);
|
||||
ureg_property(ureg, TGSI_PROPERTY_GS_OUTPUT_PRIM, PIPE_PRIM_POINTS);
|
||||
ureg_property(ureg, TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES, 1);
|
||||
ureg_property(ureg, TGSI_PROPERTY_GS_INVOCATIONS, 1);
|
||||
imm = ureg_DECL_immediate_uint(ureg, zero, 4);
|
||||
|
||||
/**
|
||||
* Loop over all the attribs and declare the corresponding
|
||||
* declarations in the geometry shader
|
||||
*/
|
||||
for (i = 0; i < num_attribs; i++) {
|
||||
src[i] = ureg_DECL_input(ureg, semantic_names[i],
|
||||
semantic_indexes[i], 0, 1);
|
||||
src[i] = ureg_src_dimension(src[i], 0);
|
||||
dst[i] = ureg_DECL_output(ureg, semantic_names[i], semantic_indexes[i]);
|
||||
}
|
||||
|
||||
/* MOV dst[i] src[i] */
|
||||
for (i = 0; i < num_attribs; i++) {
|
||||
ureg_MOV(ureg, dst[i], src[i]);
|
||||
}
|
||||
|
||||
/* EMIT IMM[0] */
|
||||
ureg_insn(ureg, TGSI_OPCODE_EMIT, NULL, 0, &imm, 1);
|
||||
|
||||
/* END */
|
||||
ureg_END(ureg);
|
||||
|
||||
return ureg_create_shader_and_destroy(ureg, pipe);
|
||||
}
|
||||
|
||||
|
@@ -146,12 +146,6 @@ util_make_fs_msaa_resolve_bilinear(struct pipe_context *pipe,
|
||||
unsigned tgsi_tex, unsigned nr_samples,
|
||||
enum tgsi_return_type stype);
|
||||
|
||||
extern void *
|
||||
util_make_geometry_passthrough_shader(struct pipe_context *pipe,
|
||||
uint num_attribs,
|
||||
const ubyte *semantic_names,
|
||||
const ubyte *semantic_indexes);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -199,8 +199,6 @@ util_memmove(void *dest, const void *src, size_t n)
|
||||
}
|
||||
|
||||
|
||||
#define util_strcasecmp stricmp
|
||||
|
||||
#else
|
||||
|
||||
#define util_vsnprintf vsnprintf
|
||||
@@ -213,7 +211,6 @@ util_memmove(void *dest, const void *src, size_t n)
|
||||
#define util_strncat strncat
|
||||
#define util_strstr strstr
|
||||
#define util_memmove memmove
|
||||
#define util_strcasecmp strcasecmp
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -129,9 +129,9 @@ void u_upload_destroy( struct u_upload_mgr *upload )
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
u_upload_alloc_buffer(struct u_upload_mgr *upload,
|
||||
unsigned min_size)
|
||||
static enum pipe_error
|
||||
u_upload_alloc_buffer( struct u_upload_mgr *upload,
|
||||
unsigned min_size )
|
||||
{
|
||||
struct pipe_screen *screen = upload->pipe->screen;
|
||||
struct pipe_resource buffer;
|
||||
@@ -161,8 +161,9 @@ u_upload_alloc_buffer(struct u_upload_mgr *upload,
|
||||
}
|
||||
|
||||
upload->buffer = screen->resource_create(screen, &buffer);
|
||||
if (upload->buffer == NULL)
|
||||
return;
|
||||
if (upload->buffer == NULL) {
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
/* Map the new buffer. */
|
||||
upload->map = pipe_buffer_map_range(upload->pipe, upload->buffer,
|
||||
@@ -171,54 +172,52 @@ u_upload_alloc_buffer(struct u_upload_mgr *upload,
|
||||
if (upload->map == NULL) {
|
||||
upload->transfer = NULL;
|
||||
pipe_resource_reference(&upload->buffer, NULL);
|
||||
return;
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
upload->offset = 0;
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
||||
void
|
||||
u_upload_alloc(struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned size,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf,
|
||||
void **ptr)
|
||||
enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned size,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf,
|
||||
void **ptr )
|
||||
{
|
||||
unsigned alloc_size = align(size, upload->alignment);
|
||||
unsigned alloc_size = align( size, upload->alignment );
|
||||
unsigned alloc_offset = align(min_out_offset, upload->alignment);
|
||||
unsigned buffer_size = upload->buffer ? upload->buffer->width0 : 0;
|
||||
unsigned offset;
|
||||
|
||||
/* Init these return values here in case we fail below to make
|
||||
* sure the caller doesn't get garbage values.
|
||||
*/
|
||||
*out_offset = ~0;
|
||||
pipe_resource_reference(outbuf, NULL);
|
||||
*ptr = NULL;
|
||||
|
||||
/* Make sure we have enough space in the upload buffer
|
||||
* for the sub-allocation. */
|
||||
if (unlikely(MAX2(upload->offset, alloc_offset) + alloc_size > buffer_size)) {
|
||||
u_upload_alloc_buffer(upload, alloc_offset + alloc_size);
|
||||
|
||||
if (unlikely(!upload->buffer)) {
|
||||
*out_offset = ~0;
|
||||
pipe_resource_reference(outbuf, NULL);
|
||||
*ptr = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
buffer_size = upload->buffer->width0;
|
||||
if (!upload->buffer ||
|
||||
MAX2(upload->offset, alloc_offset) + alloc_size > upload->buffer->width0) {
|
||||
enum pipe_error ret = u_upload_alloc_buffer(upload,
|
||||
alloc_offset + alloc_size);
|
||||
if (ret != PIPE_OK)
|
||||
return ret;
|
||||
}
|
||||
|
||||
offset = MAX2(upload->offset, alloc_offset);
|
||||
|
||||
if (unlikely(!upload->map)) {
|
||||
if (!upload->map) {
|
||||
upload->map = pipe_buffer_map_range(upload->pipe, upload->buffer,
|
||||
offset,
|
||||
buffer_size - offset,
|
||||
upload->buffer->width0 - offset,
|
||||
upload->map_flags,
|
||||
&upload->transfer);
|
||||
if (unlikely(!upload->map)) {
|
||||
if (!upload->map) {
|
||||
upload->transfer = NULL;
|
||||
*out_offset = ~0;
|
||||
pipe_resource_reference(outbuf, NULL);
|
||||
*ptr = NULL;
|
||||
return;
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
upload->map -= offset;
|
||||
@@ -230,37 +229,46 @@ u_upload_alloc(struct u_upload_mgr *upload,
|
||||
|
||||
/* Emit the return values: */
|
||||
*ptr = upload->map + offset;
|
||||
pipe_resource_reference(outbuf, upload->buffer);
|
||||
pipe_resource_reference( outbuf, upload->buffer );
|
||||
*out_offset = offset;
|
||||
|
||||
upload->offset = offset + alloc_size;
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
||||
void u_upload_data(struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned size,
|
||||
const void *data,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf)
|
||||
enum pipe_error u_upload_data( struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned size,
|
||||
const void *data,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf)
|
||||
{
|
||||
uint8_t *ptr;
|
||||
enum pipe_error ret = u_upload_alloc(upload, min_out_offset, size,
|
||||
out_offset, outbuf,
|
||||
(void**)&ptr);
|
||||
if (ret != PIPE_OK)
|
||||
return ret;
|
||||
|
||||
u_upload_alloc(upload, min_out_offset, size,
|
||||
out_offset, outbuf,
|
||||
(void**)&ptr);
|
||||
if (ptr)
|
||||
memcpy(ptr, data, size);
|
||||
memcpy(ptr, data, size);
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
||||
/* XXX: Remove. It's basically a CPU fallback of resource_copy_region. */
|
||||
void u_upload_buffer(struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned offset,
|
||||
unsigned size,
|
||||
struct pipe_resource *inbuf,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf)
|
||||
|
||||
/* As above, but upload the full contents of a buffer. Useful for
|
||||
* uploading user buffers, avoids generating an explosion of GPU
|
||||
* buffers if you have an app that does lots of small vertex buffer
|
||||
* renders or DrawElements calls.
|
||||
*/
|
||||
enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned offset,
|
||||
unsigned size,
|
||||
struct pipe_resource *inbuf,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf)
|
||||
{
|
||||
enum pipe_error ret = PIPE_OK;
|
||||
struct pipe_transfer *transfer = NULL;
|
||||
const char *map = NULL;
|
||||
|
||||
@@ -271,13 +279,20 @@ void u_upload_buffer(struct u_upload_mgr *upload,
|
||||
&transfer);
|
||||
|
||||
if (map == NULL) {
|
||||
pipe_resource_reference(outbuf, NULL);
|
||||
return;
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if (0)
|
||||
debug_printf("upload ptr %p ofs %d sz %d\n", map, offset, size);
|
||||
|
||||
u_upload_data(upload, min_out_offset, size, map, out_offset, outbuf);
|
||||
ret = u_upload_data( upload,
|
||||
min_out_offset,
|
||||
size,
|
||||
map,
|
||||
out_offset,
|
||||
outbuf);
|
||||
|
||||
pipe_buffer_unmap( upload->pipe, transfer );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@@ -78,12 +78,12 @@ void u_upload_unmap( struct u_upload_mgr *upload );
|
||||
* \param outbuf Pointer to where the upload buffer will be returned.
|
||||
* \param ptr Pointer to the allocated memory that is returned.
|
||||
*/
|
||||
void u_upload_alloc(struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned size,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf,
|
||||
void **ptr);
|
||||
enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned size,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf,
|
||||
void **ptr );
|
||||
|
||||
|
||||
/**
|
||||
@@ -92,12 +92,12 @@ void u_upload_alloc(struct u_upload_mgr *upload,
|
||||
* Same as u_upload_alloc, but in addition to that, it copies "data"
|
||||
* to the pointer returned from u_upload_alloc.
|
||||
*/
|
||||
void u_upload_data(struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned size,
|
||||
const void *data,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf);
|
||||
enum pipe_error u_upload_data( struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned size,
|
||||
const void *data,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf);
|
||||
|
||||
|
||||
/**
|
||||
@@ -106,13 +106,13 @@ void u_upload_data(struct u_upload_mgr *upload,
|
||||
* Same as u_upload_data, except that the input data comes from a buffer
|
||||
* instead of a user pointer.
|
||||
*/
|
||||
void u_upload_buffer(struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned offset,
|
||||
unsigned size,
|
||||
struct pipe_resource *inbuf,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf);
|
||||
enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
|
||||
unsigned min_out_offset,
|
||||
unsigned offset,
|
||||
unsigned size,
|
||||
struct pipe_resource *inbuf,
|
||||
unsigned *out_offset,
|
||||
struct pipe_resource **outbuf);
|
||||
|
||||
|
||||
|
||||
|
@@ -406,6 +406,7 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
struct pipe_resource *out_buffer = NULL;
|
||||
uint8_t *out_map;
|
||||
unsigned out_offset, mask;
|
||||
enum pipe_error err;
|
||||
|
||||
/* Get a translate object. */
|
||||
tr = translate_cache_find(mgr->translate_cache, key);
|
||||
@@ -453,12 +454,12 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
assert((ib->buffer || ib->user_buffer) && ib->index_size);
|
||||
|
||||
/* Create and map the output buffer. */
|
||||
u_upload_alloc(mgr->uploader, 0,
|
||||
key->output_stride * num_indices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
if (!out_buffer)
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
err = u_upload_alloc(mgr->uploader, 0,
|
||||
key->output_stride * num_indices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
if (err != PIPE_OK)
|
||||
return err;
|
||||
|
||||
if (ib->user_buffer) {
|
||||
map = (uint8_t*)ib->user_buffer + offset;
|
||||
@@ -485,13 +486,13 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
}
|
||||
} else {
|
||||
/* Create and map the output buffer. */
|
||||
u_upload_alloc(mgr->uploader,
|
||||
key->output_stride * start_vertex,
|
||||
key->output_stride * num_vertices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
if (!out_buffer)
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
err = u_upload_alloc(mgr->uploader,
|
||||
key->output_stride * start_vertex,
|
||||
key->output_stride * num_vertices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
if (err != PIPE_OK)
|
||||
return err;
|
||||
|
||||
out_offset -= key->output_stride * start_vertex;
|
||||
|
||||
@@ -976,6 +977,7 @@ u_vbuf_upload_buffers(struct u_vbuf *mgr,
|
||||
unsigned start, end;
|
||||
struct pipe_vertex_buffer *real_vb;
|
||||
const uint8_t *ptr;
|
||||
enum pipe_error err;
|
||||
|
||||
i = u_bit_scan(&buffer_mask);
|
||||
|
||||
@@ -986,10 +988,10 @@ u_vbuf_upload_buffers(struct u_vbuf *mgr,
|
||||
real_vb = &mgr->real_vertex_buffer[i];
|
||||
ptr = mgr->vertex_buffer[i].user_buffer;
|
||||
|
||||
u_upload_data(mgr->uploader, start, end - start, ptr + start,
|
||||
&real_vb->buffer_offset, &real_vb->buffer);
|
||||
if (!real_vb->buffer)
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
err = u_upload_data(mgr->uploader, start, end - start, ptr + start,
|
||||
&real_vb->buffer_offset, &real_vb->buffer);
|
||||
if (err != PIPE_OK)
|
||||
return err;
|
||||
|
||||
real_vb->buffer_offset -= start;
|
||||
}
|
||||
|
@@ -267,16 +267,6 @@ The integer capabilities:
|
||||
* ``PIPE_CAP_DEPTH_BOUNDS_TEST``: Whether bounds_test, bounds_min, and
|
||||
bounds_max states of pipe_depth_stencil_alpha_state behave according
|
||||
to the GL_EXT_depth_bounds_test specification.
|
||||
* ``PIPE_CAP_TGSI_TXQS``: Whether the `TXQS` opcode is supported
|
||||
* ``PIPE_CAP_FORCE_PERSAMPLE_INTERP``: If the driver can force per-sample
|
||||
interpolation for all fragment shader inputs if
|
||||
pipe_rasterizer_state::force_persample_interp is set. This is only used
|
||||
by GL3-level sample shading (ARB_sample_shading). GL4-level sample shading
|
||||
(ARB_gpu_shader5) doesn't use this. While GL3 hardware has a state for it,
|
||||
GL4 hardware will likely need to emulate it with a shader variant, or by
|
||||
selecting the interpolation weights with a conditional assignment
|
||||
in the shader.
|
||||
|
||||
|
||||
|
||||
.. _pipe_capf:
|
||||
|
@@ -960,6 +960,7 @@ XXX doesn't look like most of the opcodes really belong here.
|
||||
For components which don't return a resource dimension, their value
|
||||
is undefined.
|
||||
|
||||
|
||||
.. math::
|
||||
|
||||
lod = src0.x
|
||||
@@ -972,17 +973,6 @@ XXX doesn't look like most of the opcodes really belong here.
|
||||
|
||||
dst.w = texture\_levels(unit)
|
||||
|
||||
|
||||
.. opcode:: TXQS - Texture Samples Query
|
||||
|
||||
This retrieves the number of samples in the texture, and stores it
|
||||
into the x component. The other components are undefined.
|
||||
|
||||
.. math::
|
||||
|
||||
dst.x = texture\_samples(unit)
|
||||
|
||||
|
||||
.. opcode:: TG4 - Texture Gather
|
||||
|
||||
As per ARB_texture_gather, gathers the four texels to be used in a bi-linear
|
||||
|
@@ -1,7 +1,6 @@
|
||||
C_SOURCES := \
|
||||
dd_context.c \
|
||||
dd_draw.c \
|
||||
dd_pipe.h \
|
||||
dd_public.h \
|
||||
dd_screen.c \
|
||||
dd_util.h
|
||||
dd_context.c \
|
||||
dd_draw.c \
|
||||
dd_screen.c
|
||||
|
@@ -30,6 +30,9 @@
|
||||
#include "util/u_dump.h"
|
||||
#include "util/u_format.h"
|
||||
#include "tgsi/tgsi_scan.h"
|
||||
#include "os/os_process.h"
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
||||
enum call_type
|
||||
@@ -85,13 +88,33 @@ struct dd_call
|
||||
} info;
|
||||
};
|
||||
|
||||
|
||||
static FILE *
|
||||
dd_get_file_stream(struct dd_context *dctx)
|
||||
{
|
||||
struct pipe_screen *screen = dctx->pipe->screen;
|
||||
FILE *f = dd_get_debug_file();
|
||||
if (!f)
|
||||
static unsigned index;
|
||||
char proc_name[128], dir[256], name[512];
|
||||
FILE *f;
|
||||
|
||||
if (!os_get_process_name(proc_name, sizeof(proc_name))) {
|
||||
fprintf(stderr, "dd: can't get the process name\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
snprintf(dir, sizeof(dir), "%s/"DD_DIR, debug_get_option("HOME", "."));
|
||||
|
||||
if (mkdir(dir, 0774) && errno != EEXIST) {
|
||||
fprintf(stderr, "dd: can't create a directory (%i)\n", errno);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "%s/%s_%u_%08u", dir, proc_name, getpid(), index++);
|
||||
f = fopen(name, "w");
|
||||
if (!f) {
|
||||
fprintf(stderr, "dd: can't open file %s\n", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fprintf(f, "Driver vendor: %s\n", screen->get_vendor(screen));
|
||||
fprintf(f, "Device vendor: %s\n", screen->get_device_vendor(screen));
|
||||
|
@@ -31,7 +31,9 @@
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_state.h"
|
||||
#include "pipe/p_screen.h"
|
||||
#include "dd_util.h"
|
||||
|
||||
/* name of the directory in home */
|
||||
#define DD_DIR "ddebug_dumps"
|
||||
|
||||
enum dd_mode {
|
||||
DD_DETECT_HANGS,
|
||||
|
@@ -1,71 +0,0 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2015 Advanced Micro Devices, Inc.
|
||||
* Copyright 2008 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef DD_UTIL_H
|
||||
#define DD_UTIL_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "os/os_process.h"
|
||||
#include "util/u_debug.h"
|
||||
|
||||
/* name of the directory in home */
|
||||
#define DD_DIR "ddebug_dumps"
|
||||
|
||||
static inline FILE *
|
||||
dd_get_debug_file()
|
||||
{
|
||||
static unsigned index;
|
||||
char proc_name[128], dir[256], name[512];
|
||||
FILE *f;
|
||||
|
||||
if (!os_get_process_name(proc_name, sizeof(proc_name))) {
|
||||
fprintf(stderr, "dd: can't get the process name\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
snprintf(dir, sizeof(dir), "%s/"DD_DIR, debug_get_option("HOME", "."));
|
||||
|
||||
if (mkdir(dir, 0774) && errno != EEXIST) {
|
||||
fprintf(stderr, "dd: can't create a directory (%i)\n", errno);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
snprintf(name, sizeof(name), "%s/%s_%u_%08u", dir, proc_name, getpid(), index++);
|
||||
f = fopen(name, "w");
|
||||
if (!f) {
|
||||
fprintf(stderr, "dd: can't open file %s\n", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
#endif /* DD_UTIL_H */
|
@@ -11,10 +11,10 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2015-05-20 20:03:07)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2015-05-20 20:03:07)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10755 bytes, from 2015-09-14 20:46:55)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10551 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67771 bytes, from 2015-09-14 20:46:55)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63970 bytes, from 2015-09-14 20:50:12)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67120 bytes, from 2015-08-14 23:22:03)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63915 bytes, from 2015-08-24 16:56:28)
|
||||
|
||||
Copyright (C) 2013-2015 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
|
@@ -11,10 +11,10 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2015-05-20 20:03:07)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2015-05-20 20:03:07)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10755 bytes, from 2015-09-14 20:46:55)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10551 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67771 bytes, from 2015-09-14 20:46:55)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63970 bytes, from 2015-09-14 20:50:12)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67120 bytes, from 2015-08-14 23:22:03)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63915 bytes, from 2015-08-24 16:56:28)
|
||||
|
||||
Copyright (C) 2013-2015 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
@@ -280,8 +280,6 @@ enum a3xx_rb_blend_opcode {
|
||||
enum a3xx_intp_mode {
|
||||
SMOOTH = 0,
|
||||
FLAT = 1,
|
||||
ZERO = 2,
|
||||
ONE = 3,
|
||||
};
|
||||
|
||||
enum a3xx_repl_mode {
|
||||
@@ -686,12 +684,6 @@ static inline uint32_t REG_A3XX_CP_PROTECT_REG(uint32_t i0) { return 0x00000460
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_ZCOORD 0x00800000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_WCOORD 0x01000000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_ZCLIP_DISABLE 0x02000000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES__MASK 0x1c000000
|
||||
#define A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES__SHIFT 26
|
||||
static inline uint32_t A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES(uint32_t val)
|
||||
{
|
||||
return ((val) << A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES__SHIFT) & A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES__MASK;
|
||||
}
|
||||
|
||||
#define REG_A3XX_GRAS_CL_GB_CLIP_ADJ 0x00002044
|
||||
#define A3XX_GRAS_CL_GB_CLIP_ADJ_HORZ__MASK 0x000003ff
|
||||
@@ -782,7 +774,7 @@ static inline uint32_t A3XX_GRAS_SU_POINT_SIZE(float val)
|
||||
#define A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__SHIFT 0
|
||||
static inline uint32_t A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL(float val)
|
||||
{
|
||||
return ((((int32_t)(val * 1048576.0))) << A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__SHIFT) & A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__MASK;
|
||||
return ((((int32_t)(val * 16384.0))) << A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__SHIFT) & A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__MASK;
|
||||
}
|
||||
|
||||
#define REG_A3XX_GRAS_SU_POLY_OFFSET_OFFSET 0x0000206d
|
||||
@@ -903,9 +895,6 @@ static inline uint32_t A3XX_RB_MODE_CONTROL_MRT(uint32_t val)
|
||||
#define A3XX_RB_MODE_CONTROL_PACKER_TIMER_ENABLE 0x00010000
|
||||
|
||||
#define REG_A3XX_RB_RENDER_CONTROL 0x000020c1
|
||||
#define A3XX_RB_RENDER_CONTROL_DUAL_COLOR_IN_ENABLE 0x00000001
|
||||
#define A3XX_RB_RENDER_CONTROL_YUV_IN_ENABLE 0x00000002
|
||||
#define A3XX_RB_RENDER_CONTROL_COV_VALUE_INPUT_ENABLE 0x00000004
|
||||
#define A3XX_RB_RENDER_CONTROL_FACENESS 0x00000008
|
||||
#define A3XX_RB_RENDER_CONTROL_BIN_WIDTH__MASK 0x00000ff0
|
||||
#define A3XX_RB_RENDER_CONTROL_BIN_WIDTH__SHIFT 4
|
||||
@@ -919,8 +908,6 @@ static inline uint32_t A3XX_RB_RENDER_CONTROL_BIN_WIDTH(uint32_t val)
|
||||
#define A3XX_RB_RENDER_CONTROL_YCOORD 0x00008000
|
||||
#define A3XX_RB_RENDER_CONTROL_ZCOORD 0x00010000
|
||||
#define A3XX_RB_RENDER_CONTROL_WCOORD 0x00020000
|
||||
#define A3XX_RB_RENDER_CONTROL_I_CLAMP_ENABLE 0x00080000
|
||||
#define A3XX_RB_RENDER_CONTROL_COV_VALUE_OUTPUT_ENABLE 0x00100000
|
||||
#define A3XX_RB_RENDER_CONTROL_ALPHA_TEST 0x00400000
|
||||
#define A3XX_RB_RENDER_CONTROL_ALPHA_TEST_FUNC__MASK 0x07000000
|
||||
#define A3XX_RB_RENDER_CONTROL_ALPHA_TEST_FUNC__SHIFT 24
|
||||
@@ -928,8 +915,6 @@ static inline uint32_t A3XX_RB_RENDER_CONTROL_ALPHA_TEST_FUNC(enum adreno_compar
|
||||
{
|
||||
return ((val) << A3XX_RB_RENDER_CONTROL_ALPHA_TEST_FUNC__SHIFT) & A3XX_RB_RENDER_CONTROL_ALPHA_TEST_FUNC__MASK;
|
||||
}
|
||||
#define A3XX_RB_RENDER_CONTROL_ALPHA_TO_COVERAGE 0x40000000
|
||||
#define A3XX_RB_RENDER_CONTROL_ALPHA_TO_ONE 0x80000000
|
||||
|
||||
#define REG_A3XX_RB_MSAA_CONTROL 0x000020c2
|
||||
#define A3XX_RB_MSAA_CONTROL_DISABLE 0x00000400
|
||||
|
@@ -28,7 +28,6 @@
|
||||
|
||||
#include "pipe/p_state.h"
|
||||
#include "util/u_blend.h"
|
||||
#include "util/u_dual_blend.h"
|
||||
#include "util/u_string.h"
|
||||
#include "util/u_memory.h"
|
||||
|
||||
@@ -132,8 +131,5 @@ fd3_blend_state_create(struct pipe_context *pctx,
|
||||
so->rb_mrt[i].control |= A3XX_RB_MRT_CONTROL_DITHER_MODE(DITHER_ALWAYS);
|
||||
}
|
||||
|
||||
if (cso->rt[0].blend_enable && util_blend_state_is_dual(cso, 0))
|
||||
so->rb_render_control = A3XX_RB_RENDER_CONTROL_DUAL_COLOR_IN_ENABLE;
|
||||
|
||||
return so;
|
||||
}
|
||||
|
@@ -36,7 +36,6 @@
|
||||
|
||||
struct fd3_blend_stateobj {
|
||||
struct pipe_blend_state base;
|
||||
uint32_t rb_render_control;
|
||||
struct {
|
||||
/* Blend control bits for color if there is an alpha channel */
|
||||
uint32_t blend_control_rgb;
|
||||
|
@@ -73,6 +73,22 @@ struct fd3_context {
|
||||
*/
|
||||
struct fd_vertex_state blit_vbuf_state;
|
||||
|
||||
|
||||
/*
|
||||
* Border color layout *appears* to be as arrays of 0x40 byte
|
||||
* elements, with frag shader elements starting at (16 x 0x40).
|
||||
* But at some point I should probably experiment more with
|
||||
* samplers in vertex shaders to be sure. Unclear about why
|
||||
* there is this offset when there are separate VS and FS base
|
||||
* addr regs.
|
||||
*
|
||||
* The first 8 bytes of each entry are the requested border
|
||||
* color in fp16. Unclear about the rest.. could be used for
|
||||
* other formats, or could simply be for aligning the pitch
|
||||
* to 32 pixels.
|
||||
*/
|
||||
#define BORDERCOLOR_SIZE 0x40
|
||||
|
||||
struct u_upload_mgr *border_color_uploader;
|
||||
struct pipe_resource *border_color_buf;
|
||||
|
||||
|
@@ -149,8 +149,6 @@ emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
&fd3_ctx->border_color_buf,
|
||||
&ptr);
|
||||
|
||||
fd_setup_border_colors(tex, ptr, tex_off[sb]);
|
||||
|
||||
if (tex->num_samplers > 0) {
|
||||
/* output sampler state: */
|
||||
OUT_PKT3(ring, CP_LOAD_STATE, 2 + (2 * tex->num_samplers));
|
||||
@@ -165,6 +163,57 @@ emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
const struct fd3_sampler_stateobj *sampler = tex->samplers[i] ?
|
||||
fd3_sampler_stateobj(tex->samplers[i]) :
|
||||
&dummy_sampler;
|
||||
uint16_t *bcolor = (uint16_t *)((uint8_t *)ptr +
|
||||
(BORDERCOLOR_SIZE * tex_off[sb]) +
|
||||
(BORDERCOLOR_SIZE * i));
|
||||
uint32_t *bcolor32 = (uint32_t *)&bcolor[16];
|
||||
|
||||
/*
|
||||
* XXX HACK ALERT XXX
|
||||
*
|
||||
* The border colors need to be swizzled in a particular
|
||||
* format-dependent order. Even though samplers don't know about
|
||||
* formats, we can assume that with a GL state tracker, there's a
|
||||
* 1:1 correspondence between sampler and texture. Take advantage
|
||||
* of that knowledge.
|
||||
*/
|
||||
if (i < tex->num_textures && tex->textures[i]) {
|
||||
const struct util_format_description *desc =
|
||||
util_format_description(tex->textures[i]->format);
|
||||
for (j = 0; j < 4; j++) {
|
||||
if (desc->swizzle[j] >= 4)
|
||||
continue;
|
||||
|
||||
const struct util_format_channel_description *chan =
|
||||
&desc->channel[desc->swizzle[j]];
|
||||
int size = chan->size;
|
||||
|
||||
/* The Z16 texture format we use seems to look in the
|
||||
* 32-bit border color slots
|
||||
*/
|
||||
if (desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS)
|
||||
size = 32;
|
||||
|
||||
/* Formats like R11G11B10 or RGB9_E5 don't specify
|
||||
* per-channel sizes properly.
|
||||
*/
|
||||
if (desc->layout == UTIL_FORMAT_LAYOUT_OTHER)
|
||||
size = 16;
|
||||
|
||||
if (chan->pure_integer && size > 16)
|
||||
bcolor32[desc->swizzle[j] + 4] =
|
||||
sampler->base.border_color.i[j];
|
||||
else if (size > 16)
|
||||
bcolor32[desc->swizzle[j]] =
|
||||
fui(sampler->base.border_color.f[j]);
|
||||
else if (chan->pure_integer)
|
||||
bcolor[desc->swizzle[j] + 8] =
|
||||
sampler->base.border_color.i[j];
|
||||
else
|
||||
bcolor[desc->swizzle[j]] =
|
||||
util_float_to_half(sampler->base.border_color.f[j]);
|
||||
}
|
||||
}
|
||||
|
||||
OUT_RING(ring, sampler->texsamp0);
|
||||
OUT_RING(ring, sampler->texsamp1);
|
||||
@@ -351,27 +400,15 @@ fd3_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd3_emit *emit)
|
||||
unsigned vtxcnt_regid = regid(63, 0);
|
||||
|
||||
for (i = 0; i < vp->inputs_count; i++) {
|
||||
if (vp->inputs[i].sysval) {
|
||||
switch(vp->inputs[i].slot) {
|
||||
case SYSTEM_VALUE_BASE_VERTEX:
|
||||
/* handled elsewhere */
|
||||
break;
|
||||
case SYSTEM_VALUE_VERTEX_ID_ZERO_BASE:
|
||||
vertex_regid = vp->inputs[i].regid;
|
||||
break;
|
||||
case SYSTEM_VALUE_INSTANCE_ID:
|
||||
instance_regid = vp->inputs[i].regid;
|
||||
break;
|
||||
case SYSTEM_VALUE_VERTEX_CNT:
|
||||
vtxcnt_regid = vp->inputs[i].regid;
|
||||
break;
|
||||
default:
|
||||
unreachable("invalid system value");
|
||||
break;
|
||||
}
|
||||
} else if (i < vtx->vtx->num_elements && vp->inputs[i].compmask) {
|
||||
uint8_t semantic = sem2name(vp->inputs[i].semantic);
|
||||
if (semantic == TGSI_SEMANTIC_VERTEXID_NOBASE)
|
||||
vertex_regid = vp->inputs[i].regid;
|
||||
else if (semantic == TGSI_SEMANTIC_INSTANCEID)
|
||||
instance_regid = vp->inputs[i].regid;
|
||||
else if (semantic == IR3_SEMANTIC_VTXCNT)
|
||||
vtxcnt_regid = vp->inputs[i].regid;
|
||||
else if (i < vtx->vtx->num_elements && vp->inputs[i].compmask)
|
||||
last = i;
|
||||
}
|
||||
}
|
||||
|
||||
/* hw doesn't like to be configured for zero vbo's, it seems: */
|
||||
@@ -382,7 +419,7 @@ fd3_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd3_emit *emit)
|
||||
return;
|
||||
|
||||
for (i = 0, j = 0; i <= last; i++) {
|
||||
assert(!vp->inputs[i].sysval);
|
||||
assert(sem2name(vp->inputs[i].semantic) == 0);
|
||||
if (vp->inputs[i].compmask) {
|
||||
struct pipe_vertex_element *elem = &vtx->vtx->pipe[i];
|
||||
const struct pipe_vertex_buffer *vb =
|
||||
@@ -455,10 +492,8 @@ fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
A3XX_RB_MSAA_CONTROL_SAMPLE_MASK(ctx->sample_mask));
|
||||
}
|
||||
|
||||
if ((dirty & (FD_DIRTY_ZSA | FD_DIRTY_PROG | FD_DIRTY_BLEND_DUAL)) &&
|
||||
!emit->key.binning_pass) {
|
||||
uint32_t val = fd3_zsa_stateobj(ctx->zsa)->rb_render_control |
|
||||
fd3_blend_stateobj(ctx->blend)->rb_render_control;
|
||||
if ((dirty & (FD_DIRTY_ZSA | FD_DIRTY_PROG)) && !emit->key.binning_pass) {
|
||||
uint32_t val = fd3_zsa_stateobj(ctx->zsa)->rb_render_control;
|
||||
|
||||
val |= COND(fp->frag_face, A3XX_RB_RENDER_CONTROL_FACENESS);
|
||||
val |= COND(fp->frag_coord, A3XX_RB_RENDER_CONTROL_XCOORD |
|
||||
@@ -529,8 +564,7 @@ fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
val |= COND(fp->frag_coord, A3XX_GRAS_CL_CLIP_CNTL_ZCOORD |
|
||||
A3XX_GRAS_CL_CLIP_CNTL_WCOORD);
|
||||
/* TODO only use if prog doesn't use clipvertex/clipdist */
|
||||
val |= A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES(
|
||||
MIN2(util_bitcount(ctx->rasterizer->clip_plane_enable), 6));
|
||||
val |= MIN2(util_bitcount(ctx->rasterizer->clip_plane_enable), 6) << 26;
|
||||
OUT_PKT0(ring, REG_A3XX_GRAS_CL_CLIP_CNTL, 1);
|
||||
OUT_RING(ring, val);
|
||||
}
|
||||
@@ -605,13 +639,9 @@ fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
OUT_RING(ring, A3XX_GRAS_CL_VPORT_ZSCALE(ctx->viewport.scale[2]));
|
||||
}
|
||||
|
||||
if (dirty & (FD_DIRTY_PROG | FD_DIRTY_FRAMEBUFFER | FD_DIRTY_BLEND_DUAL)) {
|
||||
if (dirty & (FD_DIRTY_PROG | FD_DIRTY_FRAMEBUFFER)) {
|
||||
struct pipe_framebuffer_state *pfb = &ctx->framebuffer;
|
||||
int nr_cbufs = pfb->nr_cbufs;
|
||||
if (fd3_blend_stateobj(ctx->blend)->rb_render_control &
|
||||
A3XX_RB_RENDER_CONTROL_DUAL_COLOR_IN_ENABLE)
|
||||
nr_cbufs++;
|
||||
fd3_program_emit(ring, emit, nr_cbufs, pfb->cbufs);
|
||||
fd3_program_emit(ring, emit, pfb->nr_cbufs, pfb->cbufs);
|
||||
}
|
||||
|
||||
/* TODO we should not need this or fd_wfi() before emit_constants():
|
||||
|
@@ -355,8 +355,6 @@ fd3_fs_output_format(enum pipe_format format)
|
||||
case PIPE_FORMAT_R16G16_FLOAT:
|
||||
case PIPE_FORMAT_R11G11B10_FLOAT:
|
||||
return RB_R16G16B16A16_FLOAT;
|
||||
case PIPE_FORMAT_L8_UNORM:
|
||||
return RB_R8G8B8A8_UNORM;
|
||||
default:
|
||||
return fd3_pipe2color(format);
|
||||
}
|
||||
|
@@ -194,17 +194,24 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit,
|
||||
/* seems like vs->constlen + fs->constlen > 256, then CONSTMODE=1 */
|
||||
constmode = ((vp->constlen + fp->constlen) > 256) ? 1 : 0;
|
||||
|
||||
pos_regid = ir3_find_output_regid(vp, VARYING_SLOT_POS);
|
||||
posz_regid = ir3_find_output_regid(fp, FRAG_RESULT_DEPTH);
|
||||
psize_regid = ir3_find_output_regid(vp, VARYING_SLOT_PSIZ);
|
||||
pos_regid = ir3_find_output_regid(vp,
|
||||
ir3_semantic_name(TGSI_SEMANTIC_POSITION, 0));
|
||||
posz_regid = ir3_find_output_regid(fp,
|
||||
ir3_semantic_name(TGSI_SEMANTIC_POSITION, 0));
|
||||
psize_regid = ir3_find_output_regid(vp,
|
||||
ir3_semantic_name(TGSI_SEMANTIC_PSIZE, 0));
|
||||
if (fp->color0_mrt) {
|
||||
color_regid[0] = color_regid[1] = color_regid[2] = color_regid[3] =
|
||||
ir3_find_output_regid(fp, FRAG_RESULT_COLOR);
|
||||
ir3_find_output_regid(fp, ir3_semantic_name(TGSI_SEMANTIC_COLOR, 0));
|
||||
} else {
|
||||
color_regid[0] = ir3_find_output_regid(fp, FRAG_RESULT_DATA0);
|
||||
color_regid[1] = ir3_find_output_regid(fp, FRAG_RESULT_DATA1);
|
||||
color_regid[2] = ir3_find_output_regid(fp, FRAG_RESULT_DATA2);
|
||||
color_regid[3] = ir3_find_output_regid(fp, FRAG_RESULT_DATA3);
|
||||
for (i = 0; i < fp->outputs_count; i++) {
|
||||
ir3_semantic sem = fp->outputs[i].semantic;
|
||||
unsigned idx = sem2idx(sem);
|
||||
if (sem2name(sem) != TGSI_SEMANTIC_COLOR)
|
||||
continue;
|
||||
debug_assert(idx < ARRAY_SIZE(color_regid));
|
||||
color_regid[idx] = fp->outputs[i].regid;
|
||||
}
|
||||
}
|
||||
|
||||
/* adjust regids for alpha output formats. there is no alpha render
|
||||
@@ -273,14 +280,14 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit,
|
||||
|
||||
j = ir3_next_varying(fp, j);
|
||||
if (j < fp->inputs_count) {
|
||||
k = ir3_find_output(vp, fp->inputs[j].slot);
|
||||
k = ir3_find_output(vp, fp->inputs[j].semantic);
|
||||
reg |= A3XX_SP_VS_OUT_REG_A_REGID(vp->outputs[k].regid);
|
||||
reg |= A3XX_SP_VS_OUT_REG_A_COMPMASK(fp->inputs[j].compmask);
|
||||
}
|
||||
|
||||
j = ir3_next_varying(fp, j);
|
||||
if (j < fp->inputs_count) {
|
||||
k = ir3_find_output(vp, fp->inputs[j].slot);
|
||||
k = ir3_find_output(vp, fp->inputs[j].semantic);
|
||||
reg |= A3XX_SP_VS_OUT_REG_B_REGID(vp->outputs[k].regid);
|
||||
reg |= A3XX_SP_VS_OUT_REG_B_COMPMASK(fp->inputs[j].compmask);
|
||||
}
|
||||
@@ -387,6 +394,7 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit,
|
||||
|
||||
/* figure out VARYING_INTERP / FLAT_SHAD register values: */
|
||||
for (j = -1; (j = ir3_next_varying(fp, j)) < (int)fp->inputs_count; ) {
|
||||
uint32_t interp = fp->inputs[j].interpolate;
|
||||
|
||||
/* TODO might be cleaner to just +8 in SP_VS_VPC_DST_REG
|
||||
* instead.. rather than -8 everywhere else..
|
||||
@@ -398,8 +406,8 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit,
|
||||
*/
|
||||
debug_assert((inloc % 4) == 0);
|
||||
|
||||
if ((fp->inputs[j].interpolate == INTERP_QUALIFIER_FLAT) ||
|
||||
(fp->inputs[j].rasterflat && emit->rasterflat)) {
|
||||
if ((interp == TGSI_INTERPOLATE_CONSTANT) ||
|
||||
((interp == TGSI_INTERPOLATE_COLOR) && emit->rasterflat)) {
|
||||
uint32_t loc = inloc;
|
||||
for (i = 0; i < 4; i++, loc++) {
|
||||
vinterp[loc / 16] |= FLAT << ((loc % 16) * 2);
|
||||
@@ -407,20 +415,14 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit,
|
||||
}
|
||||
}
|
||||
|
||||
gl_varying_slot slot = fp->inputs[j].slot;
|
||||
|
||||
/* since we don't enable PIPE_CAP_TGSI_TEXCOORD: */
|
||||
if (slot >= VARYING_SLOT_VAR0) {
|
||||
unsigned texmask = 1 << (slot - VARYING_SLOT_VAR0);
|
||||
/* Replace the .xy coordinates with S/T from the point sprite. Set
|
||||
* interpolation bits for .zw such that they become .01
|
||||
*/
|
||||
if (emit->sprite_coord_enable & texmask) {
|
||||
vpsrepl[inloc / 16] |= (emit->sprite_coord_mode ? 0x0d : 0x09)
|
||||
<< ((inloc % 16) * 2);
|
||||
vinterp[(inloc + 2) / 16] |= 2 << (((inloc + 2) % 16) * 2);
|
||||
vinterp[(inloc + 3) / 16] |= 3 << (((inloc + 3) % 16) * 2);
|
||||
}
|
||||
/* Replace the .xy coordinates with S/T from the point sprite. Set
|
||||
* interpolation bits for .zw such that they become .01
|
||||
*/
|
||||
if (emit->sprite_coord_enable & (1 << sem2idx(fp->inputs[j].semantic))) {
|
||||
vpsrepl[inloc / 16] |= (emit->sprite_coord_mode ? 0x0d : 0x09)
|
||||
<< ((inloc % 16) * 2);
|
||||
vinterp[(inloc + 2) / 16] |= 2 << (((inloc + 2) % 16) * 2);
|
||||
vinterp[(inloc + 3) / 16] |= 3 << (((inloc + 3) % 16) * 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -11,10 +11,10 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2015-05-20 20:03:07)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2015-05-20 20:03:07)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10755 bytes, from 2015-09-14 20:46:55)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10551 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67771 bytes, from 2015-09-14 20:46:55)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63970 bytes, from 2015-09-14 20:50:12)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67120 bytes, from 2015-08-14 23:22:03)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63915 bytes, from 2015-08-24 16:56:28)
|
||||
|
||||
Copyright (C) 2013-2015 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
@@ -249,8 +249,7 @@ enum a4xx_tex_clamp {
|
||||
A4XX_TEX_REPEAT = 0,
|
||||
A4XX_TEX_CLAMP_TO_EDGE = 1,
|
||||
A4XX_TEX_MIRROR_REPEAT = 2,
|
||||
A4XX_TEX_CLAMP_TO_BORDER = 3,
|
||||
A4XX_TEX_MIRROR_CLAMP = 4,
|
||||
A4XX_TEX_CLAMP_NONE = 3,
|
||||
};
|
||||
|
||||
enum a4xx_tex_aniso {
|
||||
|
@@ -55,8 +55,6 @@ fd4_context_destroy(struct pipe_context *pctx)
|
||||
pipe_resource_reference(&fd4_ctx->solid_vbuf, NULL);
|
||||
pipe_resource_reference(&fd4_ctx->blit_texcoord_vbuf, NULL);
|
||||
|
||||
u_upload_destroy(fd4_ctx->border_color_uploader);
|
||||
|
||||
fd_context_destroy(pctx);
|
||||
}
|
||||
|
||||
@@ -171,8 +169,5 @@ fd4_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
||||
|
||||
fd4_query_context_init(pctx);
|
||||
|
||||
fd4_ctx->border_color_uploader = u_upload_create(pctx, 4096,
|
||||
2 * PIPE_MAX_SAMPLERS * BORDERCOLOR_SIZE, 0);
|
||||
|
||||
return pctx;
|
||||
}
|
||||
|
@@ -29,8 +29,6 @@
|
||||
#ifndef FD4_CONTEXT_H_
|
||||
#define FD4_CONTEXT_H_
|
||||
|
||||
#include "util/u_upload_mgr.h"
|
||||
|
||||
#include "freedreno_drmif.h"
|
||||
|
||||
#include "freedreno_context.h"
|
||||
@@ -72,9 +70,6 @@ struct fd4_context {
|
||||
*/
|
||||
struct fd_vertex_state blit_vbuf_state;
|
||||
|
||||
struct u_upload_mgr *border_color_uploader;
|
||||
struct pipe_resource *border_color_buf;
|
||||
|
||||
/* if *any* of bits are set in {v,f}saturate_{s,t,r} */
|
||||
bool vsaturate, fsaturate;
|
||||
|
||||
|
@@ -123,7 +123,6 @@ fd4_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info)
|
||||
// TODO set .half_precision based on render target format,
|
||||
// ie. float16 and smaller use half, float32 use full..
|
||||
.half_precision = !!(fd_mesa_debug & FD_DBG_FRAGHALF),
|
||||
.ucp_enables = ctx->rasterizer ? ctx->rasterizer->clip_plane_enable : 0,
|
||||
.has_per_samp = (fd4_ctx->fsaturate || fd4_ctx->vsaturate),
|
||||
.vsaturate_s = fd4_ctx->vsaturate_s,
|
||||
.vsaturate_t = fd4_ctx->vsaturate_t,
|
||||
|
@@ -124,20 +124,7 @@ static void
|
||||
emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
enum adreno_state_block sb, struct fd_texture_stateobj *tex)
|
||||
{
|
||||
static const uint32_t bcolor_reg[] = {
|
||||
[SB_VERT_TEX] = REG_A4XX_TPL1_TP_VS_BORDER_COLOR_BASE_ADDR,
|
||||
[SB_FRAG_TEX] = REG_A4XX_TPL1_TP_FS_BORDER_COLOR_BASE_ADDR,
|
||||
};
|
||||
struct fd4_context *fd4_ctx = fd4_context(ctx);
|
||||
unsigned i, off;
|
||||
void *ptr;
|
||||
|
||||
u_upload_alloc(fd4_ctx->border_color_uploader,
|
||||
0, 2 * PIPE_MAX_SAMPLERS * BORDERCOLOR_SIZE, &off,
|
||||
&fd4_ctx->border_color_buf,
|
||||
&ptr);
|
||||
|
||||
fd_setup_border_colors(tex, ptr, 0);
|
||||
unsigned i;
|
||||
|
||||
if (tex->num_samplers > 0) {
|
||||
int num_samplers;
|
||||
@@ -203,11 +190,6 @@ emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
OUT_RING(ring, 0x00000000);
|
||||
}
|
||||
}
|
||||
|
||||
OUT_PKT0(ring, bcolor_reg[sb], 1);
|
||||
OUT_RELOC(ring, fd_resource(fd4_ctx->border_color_buf)->bo, off, 0, 0);
|
||||
|
||||
u_upload_unmap(fd4_ctx->border_color_uploader);
|
||||
}
|
||||
|
||||
/* emit texture state for mem->gmem restore operation.. eventually it would
|
||||
@@ -333,30 +315,17 @@ fd4_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd4_emit *emit)
|
||||
unsigned vtxcnt_regid = regid(63, 0);
|
||||
|
||||
for (i = 0; i < vp->inputs_count; i++) {
|
||||
if (vp->inputs[i].sysval) {
|
||||
switch(vp->inputs[i].slot) {
|
||||
case SYSTEM_VALUE_BASE_VERTEX:
|
||||
/* handled elsewhere */
|
||||
break;
|
||||
case SYSTEM_VALUE_VERTEX_ID_ZERO_BASE:
|
||||
vertex_regid = vp->inputs[i].regid;
|
||||
break;
|
||||
case SYSTEM_VALUE_INSTANCE_ID:
|
||||
instance_regid = vp->inputs[i].regid;
|
||||
break;
|
||||
case SYSTEM_VALUE_VERTEX_CNT:
|
||||
vtxcnt_regid = vp->inputs[i].regid;
|
||||
break;
|
||||
default:
|
||||
unreachable("invalid system value");
|
||||
break;
|
||||
}
|
||||
} else if (i < vtx->vtx->num_elements && vp->inputs[i].compmask) {
|
||||
uint8_t semantic = sem2name(vp->inputs[i].semantic);
|
||||
if (semantic == TGSI_SEMANTIC_VERTEXID_NOBASE)
|
||||
vertex_regid = vp->inputs[i].regid;
|
||||
else if (semantic == TGSI_SEMANTIC_INSTANCEID)
|
||||
instance_regid = vp->inputs[i].regid;
|
||||
else if (semantic == IR3_SEMANTIC_VTXCNT)
|
||||
vtxcnt_regid = vp->inputs[i].regid;
|
||||
else if ((i < vtx->vtx->num_elements) && vp->inputs[i].compmask)
|
||||
last = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* hw doesn't like to be configured for zero vbo's, it seems: */
|
||||
if ((vtx->vtx->num_elements == 0) &&
|
||||
(vertex_regid == regid(63, 0)) &&
|
||||
@@ -365,7 +334,7 @@ fd4_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd4_emit *emit)
|
||||
return;
|
||||
|
||||
for (i = 0, j = 0; i <= last; i++) {
|
||||
assert(!vp->inputs[i].sysval);
|
||||
assert(sem2name(vp->inputs[i].semantic) == 0);
|
||||
if (vp->inputs[i].compmask) {
|
||||
struct pipe_vertex_element *elem = &vtx->vtx->pipe[i];
|
||||
const struct pipe_vertex_buffer *vb =
|
||||
|
@@ -89,14 +89,13 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = {
|
||||
_T(L8_UNORM, 8_UNORM, R8_UNORM, WZYX),
|
||||
_T(I8_UNORM, 8_UNORM, NONE, WZYX),
|
||||
|
||||
_T(A8_UINT, 8_UINT, NONE, WZYX),
|
||||
_T(A8_SINT, 8_SINT, NONE, WZYX),
|
||||
_T(L8_UINT, 8_UINT, NONE, WZYX),
|
||||
_T(L8_SINT, 8_SINT, NONE, WZYX),
|
||||
_T(I8_UINT, 8_UINT, NONE, WZYX),
|
||||
_T(I8_SINT, 8_SINT, NONE, WZYX),
|
||||
|
||||
_T(S8_UINT, 8_UINT, R8_UNORM, WZYX),
|
||||
/* NOTE: should be TFMT_8_UINT (which then gets remapped to
|
||||
* TFMT_8_UNORM for mem2gmem in _gmem_restore_format()), but
|
||||
* we don't know TFMT_8_UINT yet.. so just use TFMT_8_UNORM
|
||||
* for now.. sampling from stencil as a texture might not
|
||||
* work right, but at least should be fine for zsbuf..
|
||||
*/
|
||||
_T(S8_UINT, 8_UNORM, R8_UNORM, WZYX),
|
||||
|
||||
/* 16-bit */
|
||||
V_(R16_UNORM, 16_UNORM, NONE, WZYX),
|
||||
|
@@ -227,22 +227,27 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
|
||||
/* blob seems to always use constmode currently: */
|
||||
constmode = 1;
|
||||
|
||||
pos_regid = ir3_find_output_regid(s[VS].v, VARYING_SLOT_POS);
|
||||
posz_regid = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DEPTH);
|
||||
psize_regid = ir3_find_output_regid(s[VS].v, VARYING_SLOT_PSIZ);
|
||||
pos_regid = ir3_find_output_regid(s[VS].v,
|
||||
ir3_semantic_name(TGSI_SEMANTIC_POSITION, 0));
|
||||
posz_regid = ir3_find_output_regid(s[FS].v,
|
||||
ir3_semantic_name(TGSI_SEMANTIC_POSITION, 0));
|
||||
psize_regid = ir3_find_output_regid(s[VS].v,
|
||||
ir3_semantic_name(TGSI_SEMANTIC_PSIZE, 0));
|
||||
if (s[FS].v->color0_mrt) {
|
||||
color_regid[0] = color_regid[1] = color_regid[2] = color_regid[3] =
|
||||
color_regid[4] = color_regid[5] = color_regid[6] = color_regid[7] =
|
||||
ir3_find_output_regid(s[FS].v, FRAG_RESULT_COLOR);
|
||||
ir3_find_output_regid(s[FS].v, ir3_semantic_name(TGSI_SEMANTIC_COLOR, 0));
|
||||
} else {
|
||||
color_regid[0] = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DATA0);
|
||||
color_regid[1] = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DATA1);
|
||||
color_regid[2] = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DATA2);
|
||||
color_regid[3] = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DATA3);
|
||||
color_regid[4] = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DATA4);
|
||||
color_regid[5] = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DATA5);
|
||||
color_regid[6] = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DATA6);
|
||||
color_regid[7] = ir3_find_output_regid(s[FS].v, FRAG_RESULT_DATA7);
|
||||
const struct ir3_shader_variant *fp = s[FS].v;
|
||||
memset(color_regid, 0, sizeof(color_regid));
|
||||
for (i = 0; i < fp->outputs_count; i++) {
|
||||
ir3_semantic sem = fp->outputs[i].semantic;
|
||||
unsigned idx = sem2idx(sem);
|
||||
if (sem2name(sem) != TGSI_SEMANTIC_COLOR)
|
||||
continue;
|
||||
debug_assert(idx < ARRAY_SIZE(color_regid));
|
||||
color_regid[idx] = fp->outputs[i].regid;
|
||||
}
|
||||
}
|
||||
|
||||
/* adjust regids for alpha output formats. there is no alpha render
|
||||
@@ -252,6 +257,7 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
|
||||
if (util_format_is_alpha(pipe_surface_format(bufs[i])))
|
||||
color_regid[i] += 3;
|
||||
|
||||
|
||||
/* TODO get these dynamically: */
|
||||
face_regid = s[FS].v->frag_face ? regid(0,0) : regid(63,0);
|
||||
coord_regid = s[FS].v->frag_coord ? regid(0,0) : regid(63,0);
|
||||
@@ -342,14 +348,14 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
|
||||
|
||||
j = ir3_next_varying(s[FS].v, j);
|
||||
if (j < s[FS].v->inputs_count) {
|
||||
k = ir3_find_output(s[VS].v, s[FS].v->inputs[j].slot);
|
||||
k = ir3_find_output(s[VS].v, s[FS].v->inputs[j].semantic);
|
||||
reg |= A4XX_SP_VS_OUT_REG_A_REGID(s[VS].v->outputs[k].regid);
|
||||
reg |= A4XX_SP_VS_OUT_REG_A_COMPMASK(s[FS].v->inputs[j].compmask);
|
||||
}
|
||||
|
||||
j = ir3_next_varying(s[FS].v, j);
|
||||
if (j < s[FS].v->inputs_count) {
|
||||
k = ir3_find_output(s[VS].v, s[FS].v->inputs[j].slot);
|
||||
k = ir3_find_output(s[VS].v, s[FS].v->inputs[j].semantic);
|
||||
reg |= A4XX_SP_VS_OUT_REG_B_REGID(s[VS].v->outputs[k].regid);
|
||||
reg |= A4XX_SP_VS_OUT_REG_B_COMPMASK(s[FS].v->inputs[j].compmask);
|
||||
}
|
||||
@@ -486,6 +492,7 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
|
||||
*/
|
||||
/* figure out VARYING_INTERP / VARYING_PS_REPL register values: */
|
||||
for (j = -1; (j = ir3_next_varying(s[FS].v, j)) < (int)s[FS].v->inputs_count; ) {
|
||||
uint32_t interp = s[FS].v->inputs[j].interpolate;
|
||||
|
||||
/* TODO might be cleaner to just +8 in SP_VS_VPC_DST_REG
|
||||
* instead.. rather than -8 everywhere else..
|
||||
@@ -497,8 +504,8 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
|
||||
*/
|
||||
debug_assert((inloc % 4) == 0);
|
||||
|
||||
if ((s[FS].v->inputs[j].interpolate == INTERP_QUALIFIER_FLAT) ||
|
||||
(s[FS].v->inputs[j].rasterflat && emit->rasterflat)) {
|
||||
if ((interp == TGSI_INTERPOLATE_CONSTANT) ||
|
||||
((interp == TGSI_INTERPOLATE_COLOR) && emit->rasterflat)) {
|
||||
uint32_t loc = inloc;
|
||||
|
||||
for (i = 0; i < 4; i++, loc++) {
|
||||
@@ -507,20 +514,14 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit,
|
||||
}
|
||||
}
|
||||
|
||||
gl_varying_slot slot = s[FS].v->inputs[j].slot;
|
||||
|
||||
/* since we don't enable PIPE_CAP_TGSI_TEXCOORD: */
|
||||
if (slot >= VARYING_SLOT_VAR0) {
|
||||
unsigned texmask = 1 << (slot - VARYING_SLOT_VAR0);
|
||||
/* Replace the .xy coordinates with S/T from the point sprite. Set
|
||||
* interpolation bits for .zw such that they become .01
|
||||
*/
|
||||
if (emit->sprite_coord_enable & texmask) {
|
||||
vpsrepl[inloc / 16] |= (emit->sprite_coord_mode ? 0x0d : 0x09)
|
||||
<< ((inloc % 16) * 2);
|
||||
vinterp[(inloc + 2) / 16] |= 2 << (((inloc + 2) % 16) * 2);
|
||||
vinterp[(inloc + 3) / 16] |= 3 << (((inloc + 3) % 16) * 2);
|
||||
}
|
||||
/* Replace the .xy coordinates with S/T from the point sprite. Set
|
||||
* interpolation bits for .zw such that they become .01
|
||||
*/
|
||||
if (emit->sprite_coord_enable & (1 << sem2idx(s[FS].v->inputs[j].semantic))) {
|
||||
vpsrepl[inloc / 16] |= (emit->sprite_coord_mode ? 0x0d : 0x09)
|
||||
<< ((inloc % 16) * 2);
|
||||
vinterp[(inloc + 2) / 16] |= 2 << (((inloc + 2) % 16) * 2);
|
||||
vinterp[(inloc + 3) / 16] |= 3 << (((inloc + 3) % 16) * 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -35,32 +35,32 @@
|
||||
#include "fd4_texture.h"
|
||||
#include "fd4_format.h"
|
||||
|
||||
/* TODO do we need to emulate clamp-to-edge like a3xx? */
|
||||
static enum a4xx_tex_clamp
|
||||
tex_clamp(unsigned wrap, bool clamp_to_edge)
|
||||
tex_clamp(unsigned wrap)
|
||||
{
|
||||
/* Hardware does not support _CLAMP, but we emulate it: */
|
||||
if (wrap == PIPE_TEX_WRAP_CLAMP) {
|
||||
wrap = (clamp_to_edge) ?
|
||||
PIPE_TEX_WRAP_CLAMP_TO_EDGE : PIPE_TEX_WRAP_CLAMP_TO_BORDER;
|
||||
}
|
||||
|
||||
/* hardware probably supports more, but we can't coax all the
|
||||
* wrap/clamp modes out of the GLESv2 blob driver.
|
||||
*
|
||||
* TODO once we have basics working, go back and just try
|
||||
* different values and see what happens
|
||||
*/
|
||||
switch (wrap) {
|
||||
case PIPE_TEX_WRAP_REPEAT:
|
||||
return A4XX_TEX_REPEAT;
|
||||
case PIPE_TEX_WRAP_CLAMP:
|
||||
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
|
||||
return A4XX_TEX_CLAMP_TO_EDGE;
|
||||
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
|
||||
return A4XX_TEX_CLAMP_TO_BORDER;
|
||||
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
|
||||
/* only works for PoT.. need to emulate otherwise! */
|
||||
return A4XX_TEX_MIRROR_CLAMP;
|
||||
case PIPE_TEX_WRAP_MIRROR_REPEAT:
|
||||
return A4XX_TEX_MIRROR_REPEAT;
|
||||
// TODO
|
||||
// return A4XX_TEX_CLAMP_TO_BORDER;
|
||||
case PIPE_TEX_WRAP_MIRROR_CLAMP:
|
||||
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
|
||||
/* these two we could perhaps emulate, but we currently
|
||||
* just don't advertise PIPE_CAP_TEXTURE_MIRROR_CLAMP
|
||||
*/
|
||||
case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
|
||||
// TODO
|
||||
// return A4XX_TEX_MIRROR_CLAMP;
|
||||
case PIPE_TEX_WRAP_MIRROR_REPEAT:
|
||||
return A4XX_TEX_MIRROR_REPEAT;
|
||||
default:
|
||||
DBG("invalid wrap: %u", wrap);
|
||||
return 0;
|
||||
@@ -88,7 +88,6 @@ fd4_sampler_state_create(struct pipe_context *pctx,
|
||||
struct fd4_sampler_stateobj *so = CALLOC_STRUCT(fd4_sampler_stateobj);
|
||||
unsigned aniso = util_last_bit(MIN2(cso->max_anisotropy >> 1, 8));
|
||||
bool miplinear = false;
|
||||
bool clamp_to_edge;
|
||||
|
||||
if (!so)
|
||||
return NULL;
|
||||
@@ -98,29 +97,14 @@ fd4_sampler_state_create(struct pipe_context *pctx,
|
||||
|
||||
so->base = *cso;
|
||||
|
||||
/*
|
||||
* For nearest filtering, _CLAMP means _CLAMP_TO_EDGE; for linear
|
||||
* filtering, _CLAMP means _CLAMP_TO_BORDER while additionally
|
||||
* clamping the texture coordinates to [0.0, 1.0].
|
||||
*
|
||||
* The clamping will be taken care of in the shaders. There are two
|
||||
* filters here, but let the minification one has a say.
|
||||
*/
|
||||
clamp_to_edge = (cso->min_img_filter == PIPE_TEX_FILTER_NEAREST);
|
||||
if (!clamp_to_edge) {
|
||||
so->saturate_s = (cso->wrap_s == PIPE_TEX_WRAP_CLAMP);
|
||||
so->saturate_t = (cso->wrap_t == PIPE_TEX_WRAP_CLAMP);
|
||||
so->saturate_r = (cso->wrap_r == PIPE_TEX_WRAP_CLAMP);
|
||||
}
|
||||
|
||||
so->texsamp0 =
|
||||
COND(miplinear, A4XX_TEX_SAMP_0_MIPFILTER_LINEAR_NEAR) |
|
||||
A4XX_TEX_SAMP_0_XY_MAG(tex_filter(cso->mag_img_filter, aniso)) |
|
||||
A4XX_TEX_SAMP_0_XY_MIN(tex_filter(cso->min_img_filter, aniso)) |
|
||||
A4XX_TEX_SAMP_0_ANISO(aniso) |
|
||||
A4XX_TEX_SAMP_0_WRAP_S(tex_clamp(cso->wrap_s, clamp_to_edge)) |
|
||||
A4XX_TEX_SAMP_0_WRAP_T(tex_clamp(cso->wrap_t, clamp_to_edge)) |
|
||||
A4XX_TEX_SAMP_0_WRAP_R(tex_clamp(cso->wrap_r, clamp_to_edge));
|
||||
A4XX_TEX_SAMP_0_WRAP_S(tex_clamp(cso->wrap_s)) |
|
||||
A4XX_TEX_SAMP_0_WRAP_T(tex_clamp(cso->wrap_t)) |
|
||||
A4XX_TEX_SAMP_0_WRAP_R(tex_clamp(cso->wrap_r));
|
||||
|
||||
so->texsamp1 =
|
||||
// COND(miplinear, A4XX_TEX_SAMP_1_MIPFILTER_LINEAR_FAR) |
|
||||
@@ -138,50 +122,6 @@ fd4_sampler_state_create(struct pipe_context *pctx,
|
||||
return so;
|
||||
}
|
||||
|
||||
static void
|
||||
fd4_sampler_states_bind(struct pipe_context *pctx,
|
||||
unsigned shader, unsigned start,
|
||||
unsigned nr, void **hwcso)
|
||||
{
|
||||
struct fd_context *ctx = fd_context(pctx);
|
||||
struct fd4_context *fd4_ctx = fd4_context(ctx);
|
||||
uint16_t saturate_s = 0, saturate_t = 0, saturate_r = 0;
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < nr; i++) {
|
||||
if (hwcso[i]) {
|
||||
struct fd4_sampler_stateobj *sampler =
|
||||
fd4_sampler_stateobj(hwcso[i]);
|
||||
if (sampler->saturate_s)
|
||||
saturate_s |= (1 << i);
|
||||
if (sampler->saturate_t)
|
||||
saturate_t |= (1 << i);
|
||||
if (sampler->saturate_r)
|
||||
saturate_r |= (1 << i);
|
||||
}
|
||||
}
|
||||
|
||||
fd_sampler_states_bind(pctx, shader, start, nr, hwcso);
|
||||
|
||||
if (shader == PIPE_SHADER_FRAGMENT) {
|
||||
fd4_ctx->fsaturate =
|
||||
(saturate_s != 0) ||
|
||||
(saturate_t != 0) ||
|
||||
(saturate_r != 0);
|
||||
fd4_ctx->fsaturate_s = saturate_s;
|
||||
fd4_ctx->fsaturate_t = saturate_t;
|
||||
fd4_ctx->fsaturate_r = saturate_r;
|
||||
} else if (shader == PIPE_SHADER_VERTEX) {
|
||||
fd4_ctx->vsaturate =
|
||||
(saturate_s != 0) ||
|
||||
(saturate_t != 0) ||
|
||||
(saturate_r != 0);
|
||||
fd4_ctx->vsaturate_s = saturate_s;
|
||||
fd4_ctx->vsaturate_t = saturate_t;
|
||||
fd4_ctx->vsaturate_r = saturate_r;
|
||||
}
|
||||
}
|
||||
|
||||
static enum a4xx_tex_type
|
||||
tex_type(unsigned target)
|
||||
{
|
||||
@@ -269,7 +209,7 @@ void
|
||||
fd4_texture_init(struct pipe_context *pctx)
|
||||
{
|
||||
pctx->create_sampler_state = fd4_sampler_state_create;
|
||||
pctx->bind_sampler_states = fd4_sampler_states_bind;
|
||||
pctx->bind_sampler_states = fd_sampler_states_bind;
|
||||
pctx->create_sampler_view = fd4_sampler_view_create;
|
||||
pctx->set_sampler_views = fd_set_sampler_views;
|
||||
}
|
||||
|
@@ -40,7 +40,6 @@
|
||||
struct fd4_sampler_stateobj {
|
||||
struct pipe_sampler_state base;
|
||||
uint32_t texsamp0, texsamp1;
|
||||
bool saturate_s, saturate_t, saturate_r;
|
||||
};
|
||||
|
||||
static inline struct fd4_sampler_stateobj *
|
||||
|
@@ -11,10 +11,10 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2015-05-20 20:03:07)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2015-05-20 20:03:07)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10755 bytes, from 2015-09-14 20:46:55)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10551 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67771 bytes, from 2015-09-14 20:46:55)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63970 bytes, from 2015-09-14 20:50:12)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67120 bytes, from 2015-08-14 23:22:03)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63915 bytes, from 2015-08-24 16:56:28)
|
||||
|
||||
Copyright (C) 2013-2015 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
@@ -85,10 +85,6 @@ enum adreno_rb_blend_factor {
|
||||
FACTOR_CONSTANT_ALPHA = 14,
|
||||
FACTOR_ONE_MINUS_CONSTANT_ALPHA = 15,
|
||||
FACTOR_SRC_ALPHA_SATURATE = 16,
|
||||
FACTOR_SRC1_COLOR = 20,
|
||||
FACTOR_ONE_MINUS_SRC1_COLOR = 21,
|
||||
FACTOR_SRC1_ALPHA = 22,
|
||||
FACTOR_ONE_MINUS_SRC1_ALPHA = 23,
|
||||
};
|
||||
|
||||
enum adreno_rb_surface_endian {
|
||||
|
@@ -11,10 +11,10 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 364 bytes, from 2015-05-20 20:03:07)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2015-05-20 20:03:07)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10755 bytes, from 2015-09-14 20:46:55)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10551 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67771 bytes, from 2015-09-14 20:46:55)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63970 bytes, from 2015-09-14 20:50:12)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67120 bytes, from 2015-08-14 23:22:03)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63915 bytes, from 2015-08-24 16:56:28)
|
||||
|
||||
Copyright (C) 2013-2015 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user