Re: [1/4] wined3d: Use an rbtree for the blit programs
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 12.10.2011 um 11:26 schrieb Henri Verbeet:
Why do you need this? Because when we add more conversions(P8) and settings(color keying) the current approach will result ugly unmaintainable if blocks.
-----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) iQIcBAEBAgAGBQJOlWIoAAoJEN0/YqbEcdMwdsoP/1FWotm97eiLNanErb/fXL6C t9dlTzVVXbcUboFSw9uBhSY+GQNj+sjZ3sQ5wLJSsQbsypW4MMOYjoBIUD4n+N91 6QY2xK5Bys7DnE7l8T9k3jCss5Fi93TpOkrQjDi0I7C0OreL7/yueM3NJQwn4PiS PJE9C5upvARhPII158NqYtVrd5TmImpLes6yshI9k4gQc4XfDZt9n0x0ERWmL8ag zS8nVR2Zaa3HaRuk/BMnf5X8FWiImwT/JapK9AyroWV4Lcg4MlKaOLGl43KaRTjQ 8IbMDPxFdWOFyU4yOfu8MEwLPDj1g7wG/CxCDNrKXMgRxgTmam9mtogM+e/dGWFX H8x+Td7h56syIU9l7g+L/4ODVugIKBxBlDdeJVUYbjOOpxuaUjsiQXG5aUcfYLf2 +1hVoKXuk7XfobCF3XKRW0hQIZGW9iJ2NAfLQ6OWK/tCZIsQ+GQafjJRPSAMgC7E y/WQ6YuuTA9eGo9si8wiuzJ5xCJoqjG7Y4oB7aih/l0DjG8MwKwWuxk85kcMg6xF 9Hnkz7738HyXhb6Y2cyUtPVsJTao5DZkBFXKs+SiCQhOnLFKPrXyIB8Zk2R4uLl3 9v+OU9khdzjTvu+f8uRw+V3HW4X+inDdS2UueGNlRHh/rYFMHX8GIYKeVK+8PS/C 1ZEjQ+1hE7S664QuNv3g =Ptfk -----END PGP SIGNATURE-----
On 12 October 2011 11:47, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
Because when we add more conversions(P8) and settings(color keying) the current approach will result ugly unmaintainable if blocks.
You already have the P8 shader. In the case of color keying it should probably at least be in the same series as the code that uses it, but I'm not sure an rbtree would really have a lot of advantages over a simple array there.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 12.10.2011 um 11:57 schrieb Henri Verbeet:
You already have the P8 shader. My bad. What will actually be added is the NONE conversion with color keying. But adding a color keying flag is what makes the current approach unsustainable because it's orthogonal to the other properties.
In the case of color keying it should probably at least be in the same series as the code that uses it, I can resend the patch later, but IMO getting rid of the current spaghetti shader selection code makes sense on its own.
but I'm not sure an rbtree would really have a lot of advantages over a simple array there. I chose the rbtree for consistency with the ffp and pshader/vshader selection, but an array is probably more efficient because I don't expect to have more than 4 different blit shaders at a time.
-----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) iQIcBAEBAgAGBQJOlXiYAAoJEN0/YqbEcdMwXLMP/0OUs1gZK6lJDmTOo7/HJRqt xh0+4pTZqWfQsPOePPJ9Erz5wtPSToKayShimwpbdvsmfdUgsGuWGqR22MipgADJ Q7t8muOEe8K9tFb5QgLwNhK39VQMASh+WohuUNFazMmBXbRIETT2UaGkh/VipihK gkI/7JnA8ju/Y41golqiEdnYShnmSTcnTXgaQp4NZDYZDgkT9IFHOmdd+uE4NvE2 ngYciZywyA8Rt37On4DjEMw9Jv32NKpnfoocXx7sPWFFpcqeDejCqIj32yVbWZBo Wj8gi4IbfAE+xdMWFBS2PIlCR1rbv6wwfaC9jB9rAYVpKin4hvk7DDPr4fqCTJ5q eTi5w1ehoH4MOeH8YPnu9BtxrKkrUwXYGKsivKB2jDBTzjm0G+IiZxKT00rvBrmL WpId1Y3Zau7TkTKeoy/W6LThjZzLeyw48Mmf5XTUabp8U/TBIwbPHzn5bHuYZJle AFt/74iWwbIfMVgeRGgSbXXCk56aV1+ykK9HT7DrH4Ne/74tZjZM4+kf54s/H9T+ hjj9lmR3mdm6wCnJqPdX+9+DyiYLSCgkdVa3Cd9TDaElsoMaggJIraxU8PFidU7c 3tzyg5AE+7QjqjKgv1ZZQhyYUWK85Z29iij5BWpzlqvaqfsKQD0fC6inaRhbkLG6 t5j6zcErEey2yeNttNas =3kLs -----END PGP SIGNATURE-----
participants (2)
-
Henri Verbeet -
Stefan Dösinger