[Mesa-dev] Splitting a texture between multiple samplers in Gallium

Konstantin P. ria.freelander at gmail.com
Mon May 21 12:15:28 UTC 2018


We are writing a driver for some proprietary hardware using Gallium. And
this hardware supports GL_ARB_texture_float, but requires to change texture
format from PIPE_FORMAT_R32G32B32A32_FLOAT to PIPE_FORMAT_R8G8B8A8_UNORM
and use four samplers (one R8G8B8A8_UNORM texture for each original color).
How we should do it in a Gallium properly? If we will create multiple
samplers in create_sampler_view - it can cause a crash, when we have a
PIPE_MAX_SAMPLERS num of "large" textures. We want to use something similar
to u_transfer_helper, but for this format. So, I have some questions
regarding Gallium architecture, which affects this situation:

1. Where we should write a splitter? In a pipe_resource, or in a
pipe_transfer, or in a sampler_view?
2. Do you have something related to this case in Gallium already to not to
reinvent a bicycle? (If you have, we will use internal functions and not
write our own).
3. Do you even support this kind of hardware which splits textures? Because
I cannot found any example except u_transfer_helper (but it is only for one
specific case, not for general).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180521/75368feb/attachment.html>


More information about the mesa-dev mailing list