On 07/12/2010 09:23 PM, Zack Rusin wrote:
Hey,
this is relatively simple: Mesa GPU instructions had no way of representing 2D
register arrays which was especially painful for things like geometry shaders.
It's the same thing Gallium supported for a while meaning
INPUT[index1][index2] syntax. So for example gl_PositionIn[index] becomes
INPUT[index][gl_PositionIn], so the first index is the index within the array
and the second identifies the semantic of the array.
This merge finally brings working ARB_geometry_shader4 to Mesa3D!
For drivers that use Gallium3D the change means absolutely nothing (of course
besides the fact that if the driver had implemented Gallium's geometry shader
interface then it gets ARB_geometry_shader4 support for free).
There's a nice example called bezier in demos/src/glsl/bezier.c that uses
geometry shaders to render a bezier curve. Oh, and also both llvmpipe and
softpipe drivers support geometry shaders.
Looks great, Zack!
Just minor things:
A bunch of the shader setup code in bezier.c could probably be
replaced by calls to shaderutil.c functions.
In struct prog_src_register, a few more comments about the new "2D"
fields might be good (what's it for?). We could also use this new
index for implementing multiple constant buffers. Perhaps just "2"
instead of "2D" would be a better name?
-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev