[Mesa-dev] [PATCH 2/2] gallium/tgsi: s/TGSI_BUFFER/TGSI_TEXTURE_BUFFER/

Jose Fonseca jfonseca at vmware.com
Fri May 11 08:00:28 PDT 2012



----- Original Message -----
> On Fri, May 11, 2012 at 10:03 AM, Francisco Jerez
> <currojerez at riseup.net> wrote:
> > jfonseca at vmware.com writes:
> >
> >> From: José Fonseca <jfonseca at vmware.com>
> >>
> >> For consistency.
> >
> > I'm OK with this change, but, just so that you know, the only
> > reason I
> > called it TGSI_BUFFER instead of TGSI_TEXTURE_BUFFER was to keep it
> > consistent with the pipe_texture_target enumeration.
> >
> 
> I think plain TGSI_BUFFER makes more sense from an OpenCL
> perspective.

OpenGL/OpenCL uses the same symbols for multiple things. And pipe_texture_target was modelled after it.

But I think that in mesa/gallium, all enumerations should have an unique prefix, otherwise code becomes quite confusing, as it looks like different quantities are being mixed, auto-complete will skip it, etc.

Therefore, if buffers should not be preceeded by TEXTURE_, then we'll need TGSI_FOO_BUFFER, TGSI_FOO_TEXTURE_2D, etc. For example, FOO could be RESOURCE, SAMPLER, etc.

PIPE_BUFFER too, should eventually be fixed.


Jose


More information about the mesa-dev mailing list