[Mesa-dev] [PATCH 10/12] R600/SI: cleanup literal handling v2
Michel Dänzer
michel at daenzer.net
Thu Feb 14 06:14:28 PST 2013
On Don, 2013-02-14 at 14:35 +0100, Michel Dänzer wrote:
> On Don, 2013-02-14 at 11:43 +0100, Christian König wrote:
> >
> > + // Only one literal allowed
> > + break;
>
> The same literal could be used for several operands though. :)
Basically, it seems like we're pretty close to allowing VSrc for all
VOP* source operands, and doing something like the following
pseudo-code:
for (each VSrc operand) {
if (can be encoded as inline constant)
use inline constant;
if (is immediate &&
(no literal or SGPR yet || value matches literal))
use literal;
if (is VGPR || (is SGPR && no SGPR or literal yet))
use operand directly;
copy immediate/SGPR to VGPR and use the latter;
}
And the corresponding simpler logic for SSrc. But I'm not sure if all of
that can be done in this function.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
More information about the mesa-dev
mailing list