[Mesa-dev] [PATCH 08/13] anv: Implement the basic form of VK_EXT_transform_feedback
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Mon Oct 15 12:03:41 UTC 2018
On 13/10/2018 14:09, Jason Ekstrand wrote:
> ---
> src/intel/vulkan/anv_cmd_buffer.c | 29 +++++++
> src/intel/vulkan/anv_device.c | 24 ++++++
> src/intel/vulkan/anv_extensions.py | 2 +-
> src/intel/vulkan/anv_pipeline.c | 10 ++-
> src/intel/vulkan/anv_private.h | 13 +++
> src/intel/vulkan/genX_cmd_buffer.c | 125 +++++++++++++++++++++++++++++
> src/intel/vulkan/genX_pipeline.c | 122 ++++++++++++++++++++++++++++
> 7 files changed, 323 insertions(+), 2 deletions(-)
>
...
> +
> + int max_decls = 0;
> + for (unsigned s = 0; s < MAX_XFB_STREAMS; s++)
> + max_decls = MAX2(max_decls, decls[s]);
> +
> + uint8_t sbs[MAX_XFB_STREAMS] = { };
> + for (unsigned b = 0; b < MAX_XFB_BUFFERS; b++) {
> + if (xfb_info->buffers_written & (1 << b))
> + sbs[xfb_info->buffer_to_stream[b]] |= 1 << b;
> + }
> +
> + uint32_t *dw = anv_batch_emitn(&pipeline->batch, 3 + 2 * max_decls,
> + GENX(3DSTATE_SO_DECL_LIST),
> + .StreamtoBufferSelects0 = sbs[0],
> + .StreamtoBufferSelects1 = sbs[1],
> + .StreamtoBufferSelects2 = sbs[2],
> + .StreamtoBufferSelects3 = sbs[3],
> + .NumEntries0 = decls[0],
> + .NumEntries1 = decls[1],
> + .NumEntries2 = decls[2],
> + .NumEntries3 = decls[3]);
> +
> + for (int i = 0; i < max_decls; i++) {
> + GENX(SO_DECL_ENTRY_pack)(NULL, dw + 3 + i * 2,
> + &(struct GENX(SO_DECL_ENTRY)) {
> + .Stream0Decl = so_decl[0][i],
> + .Stream1Decl = so_decl[1][i],
> + .Stream2Decl = so_decl[2][i],
> + .Stream3Decl = so_decl[3][i],
> + });
> + }
Documentation of 3DSTATE_SO_DECL_LIST Gen10+ says :
"
This command must be followed by a PIPE_CONTROL with CS Stall bit set.,
"
> }
> +#endif /* GEN_GEN >= 8 */
> }
>
> static uint32_t
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181015/0db01e99/attachment.html>
More information about the mesa-dev
mailing list