<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Fixed function programs generated multiple times per draw call"
href="https://bugs.freedesktop.org/show_bug.cgi?id=92758">92758</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Fixed function programs generated multiple times per draw call
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Mesa core
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>imirkin@alum.mit.edu
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=119318" name="attach_119318" title="trace that demonstrates 2 FS and 2 VS programs generated in a single draw call">attachment 119318</a> <a href="attachment.cgi?id=119318&action=edit" title="trace that demonstrates 2 FS and 2 VS programs generated in a single draw call">[details]</a></span>
trace that demonstrates 2 FS and 2 VS programs generated in a single draw call
FF programs are affected by various state. It seems it's possible to do things
"just right" to cause them to be regenerated twice in a single draw. The
attached trace produces the following for me:
48: message: shader compiler issue 1: type: 1,
48: message: shader compiler issue 1: type: 0,
53: message: shader compiler issue 1: type: 1,
53: message: shader compiler issue 1: type: 0,
172: message: shader compiler issue 1: type: 1,
172: message: shader compiler issue 1: type: 0,
172: message: shader compiler issue 1: type: 1,
172: message: shader compiler issue 1: type: 0,
275: message: shader compiler issue 1: type: 1,
275: message: shader compiler issue 1: type: 0,
275: message: shader compiler issue 1: type: 0,
2172: message: shader compiler issue 1: type: 1
2172: message: shader compiler issue 1: type: 0
2172: message: shader compiler issue 1: type: 0
2239: message: shader compiler issue 1: type: 1
2239: message: shader compiler issue 1: type: 0
2328: message: shader compiler issue 1: type: 1
2328: message: shader compiler issue 1: type: 0
2328: message: shader compiler issue 1: type: 1
2328: message: shader compiler issue 1: type: 0
Type 0/1 are VS and FS (id corresponds to PIPE_SHADER_*). Note that the draw
calls at 172 and 2328 both generate 2 programs each, while draw calls 275 and
2172 generate 2 programs for one of the types.
One set is generated via the path
vbo_exec_DrawRangeElementsBaseVertex -> validate_DrawElements_common ->
check_valid_to_render -> _mesa_valid_to_render -> _mesa_update_state ->
update_program
while the second is generated via
vbo_exec_DrawRangeElementsBaseVertex -> vbo_validated_drawrangeelements ->
vbo_bind_arrays -> _mesa_update_state -> update_program.
I guess in between the _NEW_PROGRAM bit manages to set itself.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>