[Mesa-dev] [PATCH] st/nine: Forbid POSITION0 and fix depth input for PS3.0

Emil Velikov emil.l.velikov at gmail.com
Fri Feb 12 23:12:50 UTC 2016


On 12 February 2016 at 22:10, Axel Davy <axel.davy at ens.fr> wrote:
> POSITION0 input is forbidden for PS3.0 apparently.
>
> Besides for depth input we weren't using the system value
> version if needed
>
> Signed-off-by: Axel Davy <axel.davy at ens.fr>
>
> ---
> Could be better having it separated into two patches perhaps.
Yes, pretty please. Lets leave the nine_get_position_input() helper out.

> It should get into Mesa 11.2, to prevent regression caused
> by the introduction of position as system value.
>
I'll keep an eye open, although feel free to slap the "Cc: mesa-stable..." tag.


> @@ -2048,9 +2052,22 @@ DECL_SPECIAL(DCL)
>              unsigned interp_location = 0;
>              /* SM3 only, SM2 input semantic determined by file */
>              assert(sem.reg.idx < Elements(tx->regs.v));
> +
> +            if (tgsi.Name == TGSI_SEMANTIC_POSITION) {
> +                /* Position0/PositionT0 are forbidden (likely because vPos already does that)
s/PositionT0/PositionT/ ?

> +                 *  is forbidden. */
Too much "forbidden" ? Just drop this line of the comment.

> +                if (sem.usage == D3DDECLUSAGE_POSITION && sem.usage_idx == 0 ||
> +                    sem.usage == D3DDECLUSAGE_POSITIONT)
> +                    return D3DERR_INVALIDCALL;
Throw an empty newline, to improve readability.

Thanks
Emil


More information about the mesa-dev mailing list