Zack Rusin pisze:
> On Monday 14 December 2009 09:29:03 Keith Whitwell wrote:
>
>> On Mon, 2009-12-14 at 06:23 -0800, michal wrote:
>>
>>> To fully support geometry shaders, we need some means to declare a
>>> two-dimensional register file. The following declaration
>>>
>>> DCL IN[3][0]
>>>
>>> would declare an input register with index 0 (first dimension) and size
>>> 3 (second dimension). Since the second dimension is a size, not an index
>>> (or, for that matter, an index range), a new token has been added that
>>> specifies the declared size of the register.
>>>
>> Is this a good representation? What would happen if there was:
>>
>> DCL IN[4][0]
>> DCL IN[3][1]
>>
>> Presumably the "3" is always going to be "3", and it's a property of the
>> geometry shader - I think Zack has a patch which adds something like:
>>
>> PROP GS_VERTICES_IN 3
>>
>> Then couldn't we just have the equivalent of:
>>
>> DCL IN[][0]
>> DCL IN[][1]
>>
>> with the size of the first dimension specified by the property?
>>
>
> Yea, that's what I thought the dimensional arrays should look like for GS in
> TGSI (they already do in GLSL and HLSL).
>
Actually, GS_VERTICES_IN could be derived from GS_INPUT_PRIM property.
GL_ARB_geometry_shader4 has this mapping:
"
Value of built-in
Input primitive type gl_VerticesIn
----------------------- -----------------
POINTS 1
LINES 2
LINES_ADJACENCY_ARB 4
TRIANGLES 3
TRIANGLES_ADJACENCY_ARB 6
"
But that also defeats the purpose of this patch -- INPUT registers would
have implied two-dimensionality when declared inside GS.
>
>
>> Are there going to be cases where this doesn't work?
>>
>
> I don't think so.
> Also if we decide to go with DCL IN[x][1] notation then it probably should be
> DCL IN[a..b][1] because otherwise it just looks weird that one component
> declares a range while the other the index.
>
>
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev