[Mesa-dev] gallium: adding PointCoord and TexCoord TGSI semantics

Christoph Bumiller e0425955 at student.tuwien.ac.at
Thu Mar 10 12:36:29 PST 2011


The attached patches are preliminary, and I didn't try very hard to fix
most drivers yet, as I did not want to invest too much time yet only to
get shot down later.

I'd like to add 2 new TGSI semantics so that nvc0 can identify
gl_TexCoord and gl_PointCoord.

The reason for this is that nvc0 hardware, contrary to nv50, now has
dedicated output/input locations for most semantics in order to make
GL_ARB_separate_shader_objects easily implementable.
Unfortunately this limits the point coordinate replacement enable to a
small set of locations which I should be able to choose when the shader
is compiled.

I realize that this is going to be a bit invasive and possibly make some
drivers' shader linkage code a little less nice, and all that just for a
single target (although I hope newer Radeons will work similarly), but I
really want to find a solution to make the gallium interface not be a
major pain for it.

I'm looking forward to comments or suggestions of alternatives, and,
given that we might abandon TGSI at some point and use e.g. GLSL IR
directly I'd be willing to wait (keeping my hack in the code) and hope
that the new IR makes this change come more naturally.

Thanks in advance in case of potential responses,
Regards,
Christoph

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-gallium-add-TGSI_SEMANTIC_TEXCOORD.patch
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110310/8f4c40bf/attachment.asc>


More information about the mesa-dev mailing list