diff options
author | Samuel Pitoiset <[email protected]> | 2019-09-09 11:04:07 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-09-16 12:08:22 +0200 |
commit | b617156621ae46113766c6668fb717e06015c7a5 (patch) | |
tree | c3cc862e9a55cbc5f2a9b626ea23a6717c5d3027 /src/amd/vulkan/radv_cmd_buffer.c | |
parent | d81100d307f5520160924df9be0bd32a272030ff (diff) |
radv/gfx10: compute the correct buffer size for NGG streamout
It's used to determined the max emit per buffer.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_cmd_buffer.c')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 22b89760bbb..5b736c67ae8 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2495,9 +2495,18 @@ radv_flush_streamout_descriptors(struct radv_cmd_buffer *cmd_buffer) * the buffer will be considered not bound and store * instructions will be no-ops. */ + uint32_t size = 0xffffffff; + + /* Compute the correct buffer size for NGG streamout + * because it's used to determine the max emit per + * buffer. + */ + if (cmd_buffer->device->physical_device->use_ngg_streamout) + size = buffer->size - sb[i].offset; + desc[0] = va; desc[1] = S_008F04_BASE_ADDRESS_HI(va >> 32); - desc[2] = 0xffffffff; + desc[2] = size; desc[3] = S_008F0C_DST_SEL_X(V_008F0C_SQ_SEL_X) | S_008F0C_DST_SEL_Y(V_008F0C_SQ_SEL_Y) | S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) | |