[Mesa-dev] [PATCH 1/7] gallium: Constify several pipe_screen get_* functions

Tom Stellard tom at stellard.net
Wed Jul 17 14:19:00 PDT 2013


On Tue, Jul 16, 2013 at 07:03:29AM -0700, Jose Fonseca wrote:
> ----- Original Message -----
> > Has anyone had a chance to look at this series?
> 
> No, I just noticed this one now.
> 
> 
> FWIW, I don't see much value in constifying gallium interfaces:
> 
> - interfaces like pipe_screen have no state other that function pointers.
> 
> - some drivers might change function pointers on the fly (draw module does this for example)
> 
> - some drivers might need do complex things -- imagine a pipe driver that needs to communicate with a remote computer and change a bunch of internal state even for something as basic pipe_screen::get_shader_param -- the screen object might not be constant either
> 
> AFAICT, "const" here just imposes a constrain on the implementation of pipe drivers, but without a solid basis for it. So I'd prefer leave it alone.
> 

Ok, I will drop this patch from the series.

> 
> The other two gallium interface changes in the series (endianess and alignment cap) look alright AFAICT.
> 
> 

Thanks for reviewing.

-Tom



More information about the mesa-dev mailing list