gallium: add an api to retrieve pipe offsets
authorDave Airlie <airlied@redhat.com>
Tue, 8 Dec 2020 05:06:17 +0000 (15:06 +1000)
committerMarge Bot <eric+marge@anholt.net>
Mon, 21 Dec 2020 01:12:41 +0000 (01:12 +0000)
This is needed to implement the vulkan transform feedback pause
resume functionality

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

docs/gallium/context.rst
src/gallium/include/pipe/p_context.h

index 81a6da4..17e5af0 100644 (file)
@@ -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
index 74a3d49..7322bc5 100644 (file)
@@ -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);
+
    /*@}*/