<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 - [hsw bisected][PATCH] atomic counters doesn't work for a binding point different to zero"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90175">90175</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[hsw bisected][PATCH] atomic counters doesn't work for a binding point different to zero
</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>glsl-compiler
</td>
</tr>
<tr>
<th>Assignee</th>
<td>idr@freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>apinheiro@igalia.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=115325" name="attach_115325" title="Simple program to test the bug">attachment 115325</a> <a href="attachment.cgi?id=115325&action=edit" title="Simple program to test the bug">[details]</a></span>
Simple program to test the bug
When using atomic counters on a shader, the spec [1] says that the binding
point may be bound using BindBufferBase or BindBufferRange. The binding point
will be referenced on the shader. Even if you use the default 0, you should
call this method.
At this moment, only zero works. Im attaching a small test showing this. The
example is using 1 for the binding. If the number is both replaced on the code
and on the shader to zero, it works properly.
It fails with current master, but works with mesa installed on my system
(10.3.2). After bisecting, this is the commit that caused the issue:
commit c0cd5bedf66887e958e140c047afc5bc26160000
Author: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>>
Date: Mon Jul 14 15:48:36 2014 -0700
glsl: Eliminate ir_variable::data.atomic.buffer_index
Just use ir_variable::data.binding... because that's the where the
binding is stored for everything else that can use layout(binding=).
Valgrind massif results for a trimmed apitrace of dota2:
n time(i) total(B) useful-heap(B)
extra-heap(B) stacks(B)
Before (32-bit): 50 40,564,927,443 69,185,408 63,683,871
5,501,537 0
After (32-bit): 74 40,580,119,657 69,186,544 63,506,327
5,680,217 0
Before (64-bit): 59 36,822,048,449 96,526,888 89,113,000
7,413,888 0
After (64-bit): 89 36,822,971,897 96,526,616 88,735,296
7,791,320 0
A real savings of 173KiB on 32-bit and 368KiB on 64-bit.
Signed-off-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>>
Reviewed-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>>
[1] <a href="https://www.opengl.org/registry/specs/ARB/shader_atomic_counters.txt">https://www.opengl.org/registry/specs/ARB/shader_atomic_counters.txt</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>