Tilman Sauerbeck wrote:
> Roland Scheidegger [2006-05-30 22:33]:
>> Tilman Sauerbeck wrote:
>>> I finally ran glean today, and noticed that SWZ wasn't implemented
>>> properly for r300 ARB vertex programs.
>>>
>>> So far I didn't handle per-component negation flags, the attached patch
>>> adds that.
>>>
>>> Question: is it okay to assume that "NegateBase" in
>>> struct prog_src_register will always be filled the way it's filled
>>> currently? ie that the sign for the x component is at bit 0 etc.
>> I'd guess that's ok. Whoever wants to change it needs to make sure that 
>> the code wherever it's used still works. Such things can get forgotten 
>> though, but in that case someone will notice and fix it up then :-).
> 
> Mmh, alright :)
> 
>>> If it doesn't, the patch I attached obviously wouldn't work...
>>>
>>> If there are no objections, I'll commit this in a few days.
>> Wouldn't it be simpler to just change t_src to always apply 
>> src->NegateBase? I can't see a need for that "src->NegateBase ? 
>> VSF_FLAG_ALL : VSF_FLAG_NONE", as the mesa parser sets all 4 bits anyway 
>> when "normal" instructions are parsed. The code would both be smaller 
>> and faster :-). (t_src_scalar OTOH cannot be changed.)
> 
> That won't work for NV vertex programs. nvvertparse.c sets NegateBase to
> either GL_TRUE or GL_FALSE.

That's a bug, probably relating to (fairly) recent merge of vertex, 
fragment, NV and ARB programs all into a single representation.  Feel 
free to fix it to match the other usages.

Keith


--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to