Open sebastinas opened 7 years ago
@sebastinas That is true there are no source codes for some shaders. it have been long time. Actually, for some reason, some source of shader are private and not allowed to upstream. Maybe you can understand this situation.
This is unfortunate and a very serious issue for Debian (see DFSG) and we need to resolve this issue somehow. The easiest solution for us - of course - would be the inclusion of the respective sources. But if this is impossible, as you say, Debian has some possible ways forward:
The last option is the least desirable one as it's a disservice to our users. 1. is probably the easiest one to implement for us provided that the shaders are not essential for decoding. 2. would be doable but would take some time.
So let's start with the easy questions: if we'd remove the affected shaders, what would break?
In any case, it'd be great if we could fix this issue somehow without too much inconvenience to our users. I'll also talk to the co-maintainers of the package in Debian. Maybe they have some other ideas on possible ways forward.
Looks like we also need to add src/gen9_avc_encoder_kernels.c
, src/gen9_hevc_enc_kernels_binary.c
and src/gen9_vpc9_encoder_kernels.c
to the list.
@sebastinas those shaders mainly affect the encoder,such as VP8/AVC/HEVC.
For solution 2,
I don't think there is a guide I can point you to. But what we basically need would be something like:
$datadir/i965-va-driver-shaders
(if the shaders are architecture independent) or $libdir/i965-va-driver-shaders
(if the the shaders are architecture dependent). The choice probably also depends on the format of the data.
$libdir/i964-va-driver-shaders
, dlopen
the file during initialization of the driver and get the shaders with dlsym
if available. Given the current representation of the shaders, this looks like a relatively easy solution to implement.fopen
and fread
them during startup.Users then need to install one extra package to get the encoders. The existing package can suggest the new package and we will document in Debian's release notes, that users how need support for hardware accelerated encoding need to install this extra package.
Is there any progress on this issue? Do you need help with implementing a solution?
We should get this fixed before the release of 2.0.0. This could become a major blocker otherwise.
You will be appreciated if you could help to implement it. BTW this is not an API/ABI compatibility issue, so I'd like to fix it in 2.x.x, not in 2.0.0.
You can follow the progress at https://github.com/sebastinas/intel-vaapi-driver/tree/external-kernels
FWIW, a build with that patch set is not available in the Debian archive. The extra shared library is still awaiting review by our FTP masters.
@xhaihao So what's the status of this issue? I see new shaders merged without source instead of this issue getting fixed.
Any news?
This is my current branch: https://github.com/sebastinas/intel-vaapi-driver/tree/2.2.0-remove-non-free-shaders. I'd love some feedback - especially with respect to the removed .has_XYZ
flags.
It appears as if the released tarball and the git repository do not contain sources for all (compiled) shaders. For the 1.8.3 tarballs the sources are missing for
(List taken from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867340)
Also, when looking at the current master branch, some sources are missing. If you one deletes all compiled shaders contained in the repository, at least some are not re-generated:
(Listen taken from
find -name "*.g*b" -delete; autoreconf -vfi; ./configure; make -i
).Please ensure that all sources are contained in the git repository and the released tarballs.