[Nouveau] [Bug 96355] Performance: extra&costly SSBO validation even when SSBO aren't used
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jun 3 15:15:23 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=96355
--- Comment #3 from gregory.hainaut at gmail.com ---
Hi Samuel,
> Thanks for profiling Nouveau with perf, that's very nice. :-)
Well it is nice that I can do profiling :)
> 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. :)
Yes, I'm sure. I don't know how to use SSBO.
> I wonder why it's called if you are sure that your application doesn't use
> any SSBO's...
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.
> 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).
All my shader could be found in glsl format (bit a mess of ifdef but no SSBO
;))
https://github.com/PCSX2/pcsx2/tree/master/plugins/GSdx/res/glsl
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
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20160603/5deb5df4/attachment.html>
More information about the Nouveau
mailing list