<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Performance: extra&costly SSBO validation even when SSBO aren't used"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96355#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Performance: extra&costly SSBO validation even when SSBO aren't used"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96355">bug 96355</a>
from <span class="vcard"><a class="email" href="mailto:gregory.hainaut@gmail.com" title="gregory.hainaut@gmail.com">gregory.hainaut@gmail.com</a>
</span></b>
<pre>Hi Samuel,
<span class="quote">> Thanks for profiling Nouveau with perf, that's very nice. :-)</span >
Well it is nice that I can do profiling :)
<span class="quote">> Well, if your application doesn't use SSBO's, nvc0_validate_buffers()
> should not be called yeah. But this might happen when we switch between
> different contexts. Anyway, improving the validation path is on our todolist. :)</span >
Yes, I'm sure. I don't know how to use SSBO.
<span class="quote">> I wonder why it's called if you are sure that your application doesn't use
> any SSBO's...</span >
src/mesa/state_tracker/st_atom_storagebuf.c
st_bind_*_ssbos struct contains the ST_NEW_*_PROGRAM flags.
So every time, you call glUseProgram (or the 4.1 pipeline equivalent), flags
will be asserted and a validation will be triggered. It is the same for the
image in st_bind_*_images struct in st_atom_image.c. It is nice for the
performance.
<span class="quote">> Can you extract some shaders from your application to make sure no SSBO's
> are used? You can use NV50_PROG_DEBUG=1 for example (this will dump the TGSI code).</span >
All my shader could be found in glsl format (bit a mess of ifdef but no SSBO
;))
<a href="https://github.com/PCSX2/pcsx2/tree/master/plugins/GSdx/res/glsl">https://github.com/PCSX2/pcsx2/tree/master/plugins/GSdx/res/glsl</a>
Here an example (I'm not sure if it is the TGSI format).
FRAG
DCL IN[0], GENERIC[0], PERSPECTIVE
DCL IN[1], GENERIC[3], PERSPECTIVE
DCL OUT[0], COLOR
DCL OUT[1], COLOR[1]
DCL SAMP[0]
DCL SAMP[1]
DCL SVIEW[0], 2D, FLOAT
DCL SVIEW[1], 2D, FLOAT
DCL CONST[1][0]
DCL CONST[2][0..1]
DCL CONST[3][0..1]
DCL CONST[4][0]
DCL CONST[5][0..1]
DCL CONST[6][0..7]
DCL CONST[7][0]
DCL TEMP[0..1], LOCAL
IMM[0] FLT32 { 0.0000, 255.0000, 0.0500, 0.0078}
IMM[1] FLT32 { 0.0039, 0.0000, 0.0000, 0.0000}
0: MOV TEMP[0].xy, IN[1].xyyy
1: TEX TEMP[0].w, TEMP[0], SAMP[0], 2D
2: MOV TEMP[1].y, IMM[0].xxxx
3: MOV TEMP[1].x, TEMP[0].wwww
4: TRUNC TEMP[0], IN[0]
5: MOV TEMP[1].xy, TEMP[1].xyyy
6: TEX TEMP[1], TEMP[1], SAMP[1], 2D
7: MAD TEMP[1], TEMP[1], IMM[0].yyyy, IMM[0].zzzz
8: TRUNC TEMP[1], TEMP[1]
9: MUL TEMP[0], TEMP[0], TEMP[1]
10: MUL TEMP[0], TEMP[0], IMM[0].wwww
11: TRUNC TEMP[0], TEMP[0]
12: MIN TEMP[0], TEMP[0], IMM[0].yyyy
13: MUL TEMP[1], TEMP[0], IMM[1].xxxx
14: MUL TEMP[0].x, TEMP[0].wwww, IMM[0].wwww
15: MOV OUT[0], TEMP[1]
16: MOV OUT[1], TEMP[0].xxxx
17: END</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>