diff options
author | Hyunjun Ko <[email protected]> | 2020-02-20 14:54:35 +0900 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-12 03:10:16 +0000 |
commit | 82fdb13c25648de2fc4d381699f5bbbd2d8768f4 (patch) | |
tree | 69393d3bf19748b6510eaa3435b78e70e0f15628 /src/freedreno | |
parent | 2a1d6b81ed54971d33e83b7f5545da096b13b043 (diff) |
turnip: Define structs for transform feedback
Define new structures for streamout buffers and state.
Most members of the state struct are taken from freedreno driver.
v2. Use IR3_MAX_SO_* and avoid using magic values.
v3. Remove the state of stream-output in tu_cmd_state and use one in
tu_pipeline and split out reset and enabled fields.
Signed-off-by: Hyunjun Ko <[email protected]>
Reviewed-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3942>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/vulkan/tu_private.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index dd0107bb6f5..d04fe99aad1 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -841,6 +841,7 @@ enum tu_cmd_dirty_bits TU_CMD_DIRTY_VERTEX_BUFFERS = 1 << 2, TU_CMD_DIRTY_DESCRIPTOR_SETS = 1 << 3, TU_CMD_DIRTY_PUSH_CONSTANTS = 1 << 4, + TU_CMD_DIRTY_STREAMOUT_BUFFERS = 1 << 5, TU_CMD_DIRTY_DYNAMIC_LINE_WIDTH = 1 << 16, TU_CMD_DIRTY_DYNAMIC_STENCIL_COMPARE_MASK = 1 << 17, @@ -848,6 +849,14 @@ enum tu_cmd_dirty_bits TU_CMD_DIRTY_DYNAMIC_STENCIL_REFERENCE = 1 << 19, }; +struct tu_streamout_state { + uint16_t stride[IR3_MAX_SO_BUFFERS]; + uint32_t ncomp[IR3_MAX_SO_BUFFERS]; + uint32_t prog[IR3_MAX_SO_OUTPUTS * 2]; + uint32_t prog_count; + uint32_t vpc_so_buf_cntl; +}; + struct tu_cmd_state { uint32_t dirty; @@ -864,6 +873,17 @@ struct tu_cmd_state struct tu_dynamic_state dynamic; + /* Stream output buffers */ + struct + { + struct tu_buffer *buffers[IR3_MAX_SO_BUFFERS]; + VkDeviceSize offsets[IR3_MAX_SO_BUFFERS]; + VkDeviceSize sizes[IR3_MAX_SO_BUFFERS]; + } streamout_buf; + + uint8_t streamout_reset; + uint8_t streamout_enabled; + /* Index buffer */ struct tu_buffer *index_buffer; uint64_t index_offset; @@ -1152,6 +1172,8 @@ struct tu_pipeline bool need_indirect_descriptor_sets; VkShaderStageFlags active_stages; + struct tu_streamout_state streamout; + struct { struct tu_bo binary_bo; |