[Mesa-dev] [PATCH 10/12] R600/SI: cleanup literal handling v2
Christian König
deathsimple at vodafone.de
Thu Feb 14 07:20:20 PST 2013
Am 14.02.2013 15:14, schrieb Michel Dänzer:
> 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.
Yeah, I'm already nearly there (and it also includes folding
ABS/NEG/CLAMP/OMOD). But first things first, I encountered some hangs
with the current code and those need to be fixed first.
Christian.
More information about the mesa-dev
mailing list