From: Roland M. <rol...@nr...> - 2004-12-03 06:47:42
|
Hi! ---- Looking at mesa/main/config.h - is there a reason why |MAX_COLOR_TABLE_SIZE| is set to |256| ? Would it be safe to bump the value up to 2^12 (4096 colors per palette) or 2^16 (65536 colors) or will that hit any Mesa-internal limitations ? ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) rol...@nr... \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;) |
From: Brian P. <bri...@tu...> - 2004-12-03 17:59:47
|
Roland Mainz wrote: > Hi! > > ---- > > Looking at mesa/main/config.h - is there a reason why > |MAX_COLOR_TABLE_SIZE| is set to |256| ? Would it be safe to bump the > value up to 2^12 (4096 colors per palette) or 2^16 (65536 colors) or > will that hit any Mesa-internal limitations ? Colortables are significant in two areas: pixel transfer (glDraw/Read/CopyPixels) and paletted textures. Larger color tables might work fine on the pixel transfer path, since that's mostly implemented in floating point. But for paletted textures, we only support 8-bit color index textures. So all the indexes will be in [0,255] and a larger table won't be of any use. So, if you want to use a larger palette, you'll also have to add support for the GL_COLOR_INDEX12/16_EXT texture formats. -Brian |
From: Roland M. <rol...@nr...> - 2004-12-03 20:12:27
|
Brian Paul wrote: > So, if you want to use a larger palette, you'll also have to add > support for the GL_COLOR_INDEX12/16_EXT texture formats. OK... do you have any pointers what needs to be done for that (e.g. which source files need to be touched approximately etc.) ? ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) rol...@nr... \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;) |
From: Brian P. <bri...@tu...> - 2004-12-03 20:37:17
|
Roland Mainz wrote: > Brian Paul wrote: > >>So, if you want to use a larger palette, you'll also have to add >>support for the GL_COLOR_INDEX12/16_EXT texture formats. > > > OK... do you have any pointers what needs to be done for that (e.g. > which source files need to be touched approximately etc.) ? grep for 'ci8' in the texformat.[ch], texformat_tmp.h and texstore.c files. You'll have to add similar 'ci16' code which will use GLushorts instead of GLubytes for storage. It should be pretty simple. -Brian |