On Tuesday 22 August 2006 22:04, Timothy Miller wrote: > On 8/22/06, Lourens Veen <[EMAIL PROTECTED]> wrote: > > What is the job of the kernel with respect to graphics? > > The job of the kernel, always, is to provide abstraction from the > hardware, as well as insulate the hardware and other applications > from badly behaved applications. > > Many aspects of the abstraction only SEEM to be in the kernel. For > instance, glibc provides a portable wrapper around the kernel ABI. A > lot of this is done for efficiency reasons so as to avoid actual > kernel calls as much as possible.
Okay, so let's say that the job of the kernel and associated userspace daemons/services/whatever is to provide an abstraction from the hardware. That's what my OS design course said, but I was wondering about the daemons. Counting them as parts of the kernel that happen to live in userspace solves the problem nicely. Okay. Then we end up with the next question. > > What abstraction should the kernel offer to userspace? > > That's a hard question. Here are some groups of facilities I can > think of right off: > > - Setting resolution/depth > - Allocating virtual consoles > - Low-level rendering (2D, 3D) > - Graphics memory management > - Timing facilities (wake on vertical blank interrupt, etc.) > - Zero-copy mechanisms So, a graphics device is a rectangular grid of a certain size. Each cell on that grid has an associated colour which is encoded in some way. There are various operations that change these colours. Sometimes an event occurs which the graphics device can tell us about. But then what about off-screen buffers? And do we need that interrupt event? Let's try that again. A graphics device is a collection of rectangular grids of a certain size. Each cell on a grid has an associated colour which is encoded in some way. There are various operations that change these colours. At any point in time, one of the grids is designated as primary grid. Notes: the primary grid is the one that is visible on-screen. Could we have the abstraction queue drawing operations until it's time to perform them (during vertical blank for example), and do away with the interrupt? Perhaps that's not general enough. For example, with DOT3 bumpmapping, a grid cell doesn't store a colour, it stores a normal vector. Now we're suddenly approaching the realm of GPGPU. How far can we take this? How far do we want to take it? Lourens
pgp8PwbHIid8f.pgp
Description: PGP signature
_______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
