Why do you need this?
-----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.
On 12 October 2011 11:47, Stefan Dösinger stefan@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.