[Mesa-dev] [RFC PATCH] st/mesa/r200/i915/i965: move ARB program fields into a union

Timothy Arceri timothy.arceri at collabora.com
Wed Nov 2 21:15:49 UTC 2016


On Wed, 2016-11-02 at 12:08 +0100, Marek Olšák wrote:
> On Wed, Nov 2, 2016 at 2:38 AM, Timothy Arceri
> <timothy.arceri at collabora.com> wrote:
> > 
> > I'm about to do some refactoring that will move a bunch of glsl
> > only
> > fields from gl_linked_program into gl_program.
> > 
> > If we wan't to share memory it makes sense to do it while I move
> > things. I just wanted to see what people think about this before
> > I get started as it's not going to be fun to go back and undo.
> > 
> > It seems common for games to compile 2000 programs or more so at
> > 
> > 32bits X 2000 programs X 22 fields X 2 (at least) stages
> > 
> > This should give us something like 352 kilobytes in savings.
> > 
> > What do you think?
> 
> Sounds good, but if you wanna save memory, using GLuint everywhere is
> a bad idea. I suggest using uint8_t or uint16_t where appropriate.
> Bitfields are even better, but probably overkill here.

Sure. But this is a quick win without the effort of checking required
field sizes. Maybe a next step.

Thanks. 

> 
> Marek
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list