Mesa (master): gallium: add an api to retrieve pipe offsets

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 21 01:30:43 UTC 2020


Module: Mesa
Branch: master
Commit: 46734a02fc916c46156262c3a47a92796ed59934
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=46734a02fc916c46156262c3a47a92796ed59934

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Dec  8 15:06:17 2020 +1000

gallium: add an api to retrieve pipe offsets

This is needed to implement the vulkan transform feedback pause
resume functionality

Acked-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7981>

---

 docs/gallium/context.rst             | 4 ++++
 src/gallium/include/pipe/p_context.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/docs/gallium/context.rst b/docs/gallium/context.rst
index 81a6da4fb88..17e5af0a74b 100644
--- a/docs/gallium/context.rst
+++ b/docs/gallium/context.rst
@@ -251,6 +251,10 @@ discussed above.
   for the purposes of the draw_auto stage. -1 means the buffer should
   be appended to, and everything else sets the internal offset.
 
+* ``stream_output_target_offset`` Retrieve the internal stream offset from
+  an streamout target. This is used to implement Vulkan pause/resume support
+  which needs to pass the internal offset to the API.
+
 NOTE: The currently-bound vertex or geometry shader must be compiled with
 the properly-filled-in structure pipe_stream_output_info describing which
 outputs should be written to buffers and how. The structure is part of
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 74a3d49d2dd..7322bc5f5c1 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -517,6 +517,8 @@ struct pipe_context {
                               struct pipe_stream_output_target **targets,
                               const unsigned *offsets);
 
+   uint32_t (*stream_output_target_offset)(struct pipe_stream_output_target *target);
+
    /*@}*/
 
 



More information about the mesa-commit mailing list