<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - In TGSI module, replace string arrays with functions"
href="https://bugs.freedesktop.org/show_bug.cgi?id=65513">65513</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>In TGSI module, replace string arrays with functions
</td>
</tr>
<tr>
<th>Severity</th>
<td>trivial
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>brianp@vmware.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Component</th>
<td>Mesa core
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr></table>
<p>
<div>
<pre>This is another relatively simple code clean-up project.
In the tgsi_string.[ch] files we have arrays such as tgsi_semantic_names[] and
tgsi_texture_names[] which are used to map TGSI enums to strings. In the .c
file we have static assertions to check that the number of strings in the array
matches the TGSI_x_COUNT values. But the assertions are useless since the
arrays are explicitly dimensioned. The point of the assertions is to make sure
that when we add a new TGSI enum that we also update the array of strings used
for TGSI parsing/printing.
In commit 14541dacab218cbe82310d999d44130ebc3f6526 we replaced the
tgsi_file_names[] array with a new tgsi_file_name() function. The static
assertion now works properly, and it's probably a better solution anyway. This
task is to do the same transformation for the other string arrays.
Please do one patch for each array->function transformation.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>