On 6 December 2011 23:31, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 12/05/2011 09:40 AM, Paul Berry wrote:<br>
> R02_PRIM_END and R02_PRIM_START don't actually refer to bits in DWORD<br>
> 2 of R0 (as the name, and comments in the code, would seem to<br>
> indicate). Actually they refer to bits in DWORD 2 of the header for<br>
> URB_WRITE messages.<br>
><br>
> This patch renames the defines to reflect what they actually mean. It<br>
> also addes a define URB_WRITE_M02_PRIM_TYPE_SHIFT, which previously<br>
> was just hardcoded in .c files.<br>
<br>
</div>I'm all for renaming these. But I might drop the "_M02_" altogether,<br>
and simply go with:<br>
URB_WRITE_PRIM_START<br>
URB_WRITE_PRIM_END<br>
URB_WRITE_PRIM_TYPE_SHIFT<br>
Those names seem clear enough, and are a bit more concise. We don't<br>
usually put the DWord number in most of our #defines. Also, I<br>
personally find both "R02" and "M02" confusing...usually "R<n>" means<br>
GRF n and "M<n>" means MRF n. Yes, the leading 0 suggests it probably<br>
means something else...but will people figure out what? :)<br>
<br>
I might instead expand the comment in brw_defines.h slightly to mention<br>
that these bits go in DW2 of the URB_WRITE message header.<br></blockquote><div><br>Yeah, I can go along with that. I wasn't thrilled with the "M02" business either.<br></div></div>