[Mesa-dev] [PATCH 0/3] radeonsi: handle unaligned vertex buffers in hardware
Nicolai Hähnle
nhaehnle at gmail.com
Fri May 3 10:39:29 UTC 2019
On 30.04.19 21:20, Marek Olšák wrote:
> Why can we not use tbuffer loads?
tbuffer_load_format has the exact same limitations as
buffer_load_format. They both use the same hardware path, the only
difference is that tbuffer_load_format gets the format information from
the instruction, while buffer_load_format gets it from the resource
descriptor.
Therefore, in all cases where we *can* use tbuffer_load_format, we may
as well use buffer_load_format (because we can just initialize the
descriptor for that vertex input / vertex element correctly).
The benefit that tbuffer_load_format could potentially give us in the
future is that when multiple vertex elements reference the same vertex
buffer, we could put a single buffer descriptor into the descriptor
table (or into USER_SGPRs) instead of having one buffer descriptor for
every element.
Cheers,
Nicolai
>
> Marek
>
> On Thu, Apr 25, 2019 at 7:18 AM Nicolai Hähnle <nhaehnle at gmail.com
> <mailto:nhaehnle at gmail.com>> wrote:
>
> Hi all,
>
> the following patches contain code to implement all vertex fetches
> using plain, non-format loads plus explicit shader arithmetic for
> format conversion.
>
> This allows us to remove the software workaround for unaligned vertex
> buffers on SI, because we can just load individual bytes on the GPU.
> CI+ will still use short/dword loads even in the unaligned case.
>
> The format conversion code was tested by running with
> radeonsi_vs_fetch_always_opencode=true on both Verde and Vega.
>
> Please review!
>
> Thanks,
> Nicolai
> --
> src/amd/common/ac_llvm_build.c | 313 +++++++++++++++++
> src/amd/common/ac_llvm_build.h | 30 ++
> .../drivers/radeonsi/si_debug_options.h | 1 +
> src/gallium/drivers/radeonsi/si_get.c | 2 +-
> src/gallium/drivers/radeonsi/si_pipe.h | 1 +
> src/gallium/drivers/radeonsi/si_shader.c | 249 +++++--------
> src/gallium/drivers/radeonsi/si_shader.h | 46 +--
> src/gallium/drivers/radeonsi/si_state.c | 233 +++++++-----
> src/gallium/drivers/radeonsi/si_state.h | 19 +
> .../drivers/radeonsi/si_state_shaders.c | 37 +-
> 10 files changed, 645 insertions(+), 286 deletions(-)
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org>
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list