Commit Graph

3 Commits

Author SHA1 Message Date
Sylvain Munaut 3ccf1aa52d fosphor: Refactor to introduce more shared state between global/cl/gl
Originally I wanted the CL/GL part to be as separate as possible and
have no shared data. But it's too inconvenient since a beside the
CL / GL objects there is also configuration data that should be shared
and distributed between the two.

So instead we still have separate gl/cl state that are restricted but
the function act on a shared 'struct fosphor' object that contains
everything that's shared and exposed to both cl.c and gl.c

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-11-10 22:24:06 +01:00
Sylvain Munaut bbbd9986a4 fosphor/gl_cmap: Use an explicit 'context' object rather than static var
I originally thought that even with multiple fosphor instance, the shaders
could just be shared. But if those instances are binded to different
GL Contexts, shaders aren't shared and so need to be recreated.

So all the gl_cmap shader stuff is now stored inside a fosphor_gl_cmap_ctx
struct and the latter is stored in fosphor_gl_state

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 17:52:43 +02:00
Sylvain Munaut aabc21b7f2 fosphor: Initial import of the core code
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-13 22:05:38 +02:00