[Mesa-dev] gallium scaled types

Marek Olšák maraeo at gmail.com
Tue Sep 13 09:21:36 PDT 2011

On Tue, Sep 13, 2011 at 5:31 PM, Dave Airlie <airlied at gmail.com> wrote:
> I've attached a rough outline of a patch to add a bind_as_integer flag
> for vertex elements, sampler views and surfaces.
> I wonder if the sampler view and surfaces are always going to be bind
> as integer for SCALED types, in which case maybe we can just state
> that somewhere and move on.

Yes. The samplers and surfaces cannot be 'scaled' in any API, they are
either ints or norms everywhere, so the flag bind_as_integer doesn't
have to be there.

Just treat all the scaled pipe formats as ints, despite the wrong naming.

pipe_vertex_element is another story. Instead, I would add a flag
called 'convert_to_float', for two reasons:
1) To indicate that ints should be converted to float upon shader read.
2) To indicate that doubles should be converted to float too.

That also resolves the OpenGL issue with real vs fake doubles.

Just noticed Roland's email, he has the same idea basically.


More information about the mesa-dev mailing list