[Mesa-dev] TGSI RET only at end of function?

Brian Paul brianp at vmware.com
Tue Sep 21 10:55:46 PDT 2010


On 09/21/2010 11:33 AM, Tilman Sauerbeck wrote:
> Hi,
> tgsi.rst currently reads:
>
>> .. opcode:: RET - Subroutine Call Return
>>
>>   pc = pop()
>>
>>   Potential restrictions:
>>   * Only occurs at end of function.
>
> Also, currently the glsl compiler happily generates code that ends up as
> a TGSI shader that has RET in the middle of a function. ie it seems that
> "potential restriction" isn't true at the moment.
>
> Should that restriction be removed from tgsi.rst?
>
> Or do you plan to change the glsl compiler or the module that transforms
> the glsl compiler's output to TGSI so that RET will only be emitted at
> the end of a function?
>
> ... or maybe I'm misinterpreting the spec?

The spec is wrong.  RET may appear anywhere in a subroutine.  Feel 
free to fix this in the spec.

-Brian



More information about the mesa-dev mailing list