diff options
author | Samuel Pitoiset <[email protected]> | 2018-07-09 11:12:25 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-07-18 13:44:01 +0200 |
commit | 1e83f6567342e652880d8678d2dade834766e2ee (patch) | |
tree | a506f0dd6870e3d44f15ed0dce8421c611cf5f39 /src | |
parent | 83427acc87730d2fab2eddffbb19fc9d85863407 (diff) |
radv: set the predicate for dispatch commands
VK_EXT_conditional_rendering allows to discard dispatch commands.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 041ebf0ca3f..c88302b3e21 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -3699,6 +3699,7 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer, struct radv_shader_variant *compute_shader = pipeline->shaders[MESA_SHADER_COMPUTE]; unsigned dispatch_initiator = cmd_buffer->device->dispatch_initiator; struct radeon_winsys *ws = cmd_buffer->device->ws; + bool predicating = cmd_buffer->state.predicating; struct radeon_cmdbuf *cs = cmd_buffer->cs; struct radv_userdata_info *loc; @@ -3728,7 +3729,7 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer, } if (radv_cmd_buffer_uses_mec(cmd_buffer)) { - radeon_emit(cs, PKT3(PKT3_DISPATCH_INDIRECT, 2, 0) | + radeon_emit(cs, PKT3(PKT3_DISPATCH_INDIRECT, 2, predicating) | PKT3_SHADER_TYPE_S(1)); radeon_emit(cs, va); radeon_emit(cs, va >> 32); @@ -3740,7 +3741,7 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer, radeon_emit(cs, va); radeon_emit(cs, va >> 32); - radeon_emit(cs, PKT3(PKT3_DISPATCH_INDIRECT, 1, 0) | + radeon_emit(cs, PKT3(PKT3_DISPATCH_INDIRECT, 1, predicating) | PKT3_SHADER_TYPE_S(1)); radeon_emit(cs, 0); radeon_emit(cs, dispatch_initiator); @@ -3810,7 +3811,7 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer, dispatch_initiator |= S_00B800_FORCE_START_AT_000(1); } - radeon_emit(cs, PKT3(PKT3_DISPATCH_DIRECT, 3, 0) | + radeon_emit(cs, PKT3(PKT3_DISPATCH_DIRECT, 3, predicating) | PKT3_SHADER_TYPE_S(1)); radeon_emit(cs, blocks[0]); radeon_emit(cs, blocks[1]); |