[Mesa-dev] [Bug 109929] tgsi_to_nir.c:2111: undefined reference to `gl_nir_lower_samplers_as_deref'

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 1 16:51:23 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=109929

--- Comment #13 from Jan Vesely <jv356 at scarletmail.rutgers.edu> ---
(In reply to Timur Kristóf from comment #12)
> Jan, the commit you linked adds a dependency from the gallium auxiliary lib
> to the glsl compiler. This is required by tgsi_to_nir for calling
> gl_nir_lower_samplers and gl_nir_lower_samplers_as_deref, otherwise
> tgsi_to_nir cannot produce NIR that works on either radeonsi or iris.

I won't pretend to understand all the details between glsl/tgsi/nir
interactions.
are the gl_nir_lower_* passes pipe driver specific? Can't the mesa tracker
convert to NIR and run those passes before sending the code to the pipe driver
(based on a pipe flag or something)?
requiring all state trackers to provide symbols needed by libglsl bloats non-gl
state trackers (omx/vdpau/clover/xa). I tried to fix clover in a similar way to
xa patch in this bug, libglsl is not enough, and OCL ICD refused to load the
mesa OCL client driver.

At this time I see few ways out:
a) Either the respective pipe drivers need to pack everything (libglsl
including deps)
b) every state tracker needs to include necessary symbols
c) we provide dummy implementation of the necessary symbols for state trackers
that don't hit the gl_lower paths.

anyone feel free to correct me, my work on CL was mostly outside mesa, so I
might have misunderstood the state_tracker/pipe_driver split.


> I realize this may be unfortunate, but the good thing is that (as far as I
> see) mesa is linked with --gc-sections which means that the linker will
> remove the unnecessary code from all binaries where it is not actually used.

gc-sections didn't work as expected. I ran into this problem on pipe_r600 which
should not have been affected.

> Ideally though, only the drivers (and state trackers) that actually call
> tgsi_to_nir should need the dependency. If you have a suggestion on how to
> better organize the code to avoid this problem, please let me know.

I agree the most immediate (semi-)remedy would be to revert the changes to
src/gallium/targets/pipe-loader/Makefile.am and apply it only to the respective
pipe drivers that need it.

-- 
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/mesa-dev/attachments/20190401/36667e4e/attachment.html>


More information about the mesa-dev mailing list