diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-02-26 18:21:01 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-04-11 09:33:17 +0200 |
commit | ce0c8cf941e38b9d8b4d3284514feb36453d5e83 (patch) | |
tree | af1de24b98306a75e4343f743c95eff81df09593 /src/amd/vulkan/radv_meta.c | |
parent | 50b987c0f022d7297b3c97a3f8ec0b51c83e4454 (diff) |
radv: Add occlusion query shader.
Adds a shader for writing occlusion query results to a buffer, as the
CP packet isn't support on SI or secondary buffers, and doesn't handle
the availability bit (or partial results) nor truncation to 32-bit.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta.c')
-rw-r--r-- | src/amd/vulkan/radv_meta.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c index 04fa247dd36..0098e0844c1 100644 --- a/src/amd/vulkan/radv_meta.c +++ b/src/amd/vulkan/radv_meta.c @@ -324,6 +324,10 @@ radv_device_init_meta(struct radv_device *device) if (result != VK_SUCCESS) goto fail_buffer; + result = radv_device_init_meta_query_state(device); + if (result != VK_SUCCESS) + goto fail_query; + result = radv_device_init_meta_fast_clear_flush_state(device); if (result != VK_SUCCESS) goto fail_fast_clear; @@ -337,6 +341,8 @@ fail_resolve_compute: radv_device_finish_meta_fast_clear_flush_state(device); fail_fast_clear: radv_device_finish_meta_buffer_state(device); +fail_query: + radv_device_finish_meta_query_state(device); fail_buffer: radv_device_finish_meta_depth_decomp_state(device); fail_depth_decomp: @@ -363,6 +369,7 @@ radv_device_finish_meta(struct radv_device *device) radv_device_finish_meta_blit2d_state(device); radv_device_finish_meta_bufimage_state(device); radv_device_finish_meta_depth_decomp_state(device); + radv_device_finish_meta_query_state(device); radv_device_finish_meta_buffer_state(device); radv_device_finish_meta_fast_clear_flush_state(device); radv_device_finish_meta_resolve_compute_state(device); |