On 9 November 2012 13:48, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 11/07/2012 01:05 PM, Paul Berry wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
In situations where an OpenGL function has several equivalent names,<br>
Mesa currently does not follow a consistent standard for which name is<br>
used. For example, the function glDisablei() (introduced in GL 3.0)<br>
is equivalent to glDisableIndexedEXT() (introduced in<br>
EXT_draw_buffers2). Mesa manages the dispatch table using functions<br>
names {SET,GET,CALL}_<u></u>DisableIndexedEXT, but it implements the call in<br>
a function called _mesa_DisableIndexed().<br>
<br>
This is only one of literally hundreds of inconsistencies. In some<br>
cases, the implementation matches the GET/SET/CALL functions, in some<br>
cases it doesn't. In some cases, the name used in Mesa matches the<br>
name defined in a GL spec; in others it matches the name defined in an<br>
extension. Finally, some Mesa implementation functions begin with the<br>
prefix "loopback_", "_es_", or "_check_" instead of the more usual<br>
"_mesa_".<br>
<br>
These inconsistencies can lead to a lot of frustration when grepping<br>
through source code, or setting breakpoints in the debugger, because a<br>
fair amount of sleuthing is sometimes necessary to figure out which<br>
function name to use. Also, it led me to have to do extra work when<br>
preparing my patch series "dispatch: code generate<br>
_mesa_create_exec_table". While reviewing that patch series, several<br>
folks asked if we could simply rename the mesa functions and adjust<br>
the XML to make everything consistent.<br>
<br>
With a bit of script-fu, I've made a patch that does all the<br>
renaming. I'm interested in getting some code review, as well as some<br>
impressions of whether this change sounds like a good idea.<br>
<br>
Because so many functions got renamed, the patch is way too big to<br>
send to the mailing list, so I've located it at<br>
git://<a href="http://github.com/stereotype441/mesa.git" target="_blank">github.com/<u></u>stereotype441/mesa.git</a><br></div></div>
<<a href="http://github.com/stereotype441/mesa.git" target="_blank">http://github.com/<u></u>stereotype441/mesa.git</a>>, in the branch<div class="im"><br>
"standardize-function-names". There are three small patches on top of<br>
it, to fix minor compiler warnings introduced by the change, and to<br>
get rid of the code generation logic that used to be necessary to<br>
account for the name anomalies.<br>
<br>
Thanks in advance for your consideration :)<br>
</div></blockquote>
<br>
Looks good to me. I only skimmed the changes, so<br>
Acked-by: Brian Paul <<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>><br>
<br>
</blockquote></div><br>Thanks, Brian. Ian's already given it a fairly thorough look in person, and in general discussion it seems like most people support the idea. So I'll plan on rebasing it and pushing it on Monday unless someone finds a problem with it.<br>
</div>