diff options
author | Jiang, Sonny <[email protected]> | 2019-01-08 19:47:07 +0000 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-01-22 12:22:46 -0500 |
commit | 8daf5bb209b0838fc970c68b99a3f53a78982def (patch) | |
tree | 5374016be4d24bcafd8067b0678b0d72ceae136f /src/gallium/drivers/radeonsi/si_pipe.h | |
parent | b443465fb966218fd81c119d4d6e449ab7ffc0a5 (diff) |
radeonsi: add compute_last_block to configure the partial block fields
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 89a93182ed3..37eb15f539e 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -896,6 +896,28 @@ struct si_context { uint32_t vs_blit_sh_data[SI_VS_BLIT_SGPRS_POS_TEXCOORD]; uint32_t cs_user_data[4]; + /** + * last_block allows disabling threads at the farthermost grid boundary. + * Full blocks as specified by "block" are launched, but the threads + * outside of "last_block" dimensions are disabled. + * + * If a block touches the grid boundary in the i-th axis, threads with + * THREAD_ID[i] >= last_block[i] are disabled. + * + * If last_block[i] is 0, it has the same behavior as last_block[i] = block[i], + * meaning no effect. + * + * It's equivalent to doing this at the beginning of the compute shader: + * + * for (i = 0; i < 3; i++) { + * if (block_id[i] == grid[i] - 1 && + * last_block[i] && last_block[i] >= thread_id[i]) + * return; + * } + * (this could be moved into pipe_grid_info) + */ + uint compute_last_block[3]; + /* Vertex and index buffers. */ bool vertex_buffers_dirty; bool vertex_buffer_pointer_dirty; |