Henri Verbeet pushed to branch master at wine / vkd3d
Commits: 35d3161f by Giovanni Mascellani at 2024-09-20T17:04:31+02:00 vkd3d-shader/spirv: Propagate errors from vkd3d_spirv_stream_append().
- - - - - 9777c8bc by Giovanni Mascellani at 2024-09-20T17:14:49+02:00 vkd3d-shader/spirv: Do not reallocate the SPIR-V program.
I ran the compilation of ~1000 DXBC-TPF shaders randomly taken from my collection and measured the performance using callgrind and the kcachegrind "cycle count" estimation.
BEFORE: * 1,846,641,596 cycles * 1,845,635,336 cycles * 1,841,335,225 cycles
AFTER: * 1,764,035,136 cycles * 1,767,948,767 cycles * 1,773,927,734 cycles
So callgrind would estimate a 3.6% improvement at least.
The counterpoint is that the caller might get an allocation that is potentially bigger than necessary. I would expect that allocation to be rather short-lived anyway, so that's probably not a problem.
- - - - -
1 changed file:
- libs/vkd3d-shader/spirv.c
View it on GitLab: https://gitlab.winehq.org/wine/vkd3d/-/compare/637a3cabe7ea73f8d6d1581214161...