[comp.windows.x] X11R4 and TrueColor

pinkas@st860.intel.com (Israel Pinkas) (01/12/90)

Has anyone ported R4 to a TrueColor framebuffer yet?  How about 16 bit
pixels?  Is there generic support in the sample server, or do I get to
start from scratch?

I have a dumb framebuffer, with a depth of 16.  The hardware conforms to
TrueColor/DirectColor model, with a 6-6-4 split for RGB.  (The RBG
colortables are modifiable, but for right now, I'll settle for static
colortables.)

Any and all help/pointers/code appreciated.  I have code to do the actual
framebuffer manipulation, but the README file in the cfb directory only
mentions 8 bit.

-Israel Pinkas
--
--------------------------------------
Disclaimer: The above are my personal opinions, and in no way represent
the opinions of Intel Corporation.  In no way should the above be taken
to be a statement of Intel.

UUCP:	{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!cadev4!pinkas
ARPA:	pinkas%cadev4.intel.com@relay.cs.net
CSNET:	pinkas@cadev4.intel.com

keith@EXPO.LCS.MIT.EDU (Keith Packard) (01/12/90)

> I have a dumb framebuffer, with a depth of 16.  The hardware conforms to
> TrueColor/DirectColor model, with a 6-6-4 split for RGB.  (The RBG
> colortables are modifiable, but for right now, I'll settle for static
> colortables.)

The sample server CFB code will work on a 16-bit display.  Porting is
a matter of editing cfbmskbits.c and cfbmskbits.h to conform to the
display characteristics.  You'll need a reasonable understanding of the
contents of those two files to change them appropriately.  The rest
of the porting process will follow a typical CFB server port, several
examples of which are provided with R4.

CFB already supports all possible colormap types, if you're hardware
only supports direct color and true color, you'll simply need to remove
the portions which advertise other visual types to DIX and change the
default visual to either true color or direct color.

Much of the R4 code is tuned for 8-bit displays, but those portions are
carefully ignored in the non 8-bit cases.  Naturally, the performance of
a 16-bit version of CFB will not be stunning; pixel-size independent code
is difficult to optimize.

Keith Packard
MIT X Consortium

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/12/90)

    Has anyone ported R4 to a TrueColor framebuffer yet?

The R4 cfb code supports all visual classes.  If you want a hack,
you can run a cfb-based server with "-cc 4".

    How about 16 bit pixels?

It should be possible to frob the cfb code for this, although you won't
be able to take advantage of all the 8-bit optimized code.  Most of
the colormap code in cfb is pretty generic, although you'll have to
massage the static visual definitions a bit.