# New CTS failures in 1.3.5.0
dEQP-VK.api.buffer_view.access.uniform_texel_buffer.b8g8r8a8_unorm,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_32_wait_query_without_availability_draw_points_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_32_wait_query_without_availability_draw_points_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_32_wait_query_without_availability_draw_triangles_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_32_wait_query_without_availability_draw_triangles_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_32_wait_queue_without_availability_draw_points_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_32_wait_queue_without_availability_draw_points_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_32_wait_queue_without_availability_draw_triangles_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_32_wait_queue_without_availability_draw_triangles_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_64_wait_query_without_availability_draw_points_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_64_wait_query_without_availability_draw_points_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_64_wait_query_without_availability_draw_triangles_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_64_wait_query_without_availability_draw_triangles_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_64_wait_queue_without_availability_draw_points_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_64_wait_queue_without_availability_draw_points_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_64_wait_queue_without_availability_draw_triangles_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_conservative_size_64_wait_queue_without_availability_draw_triangles_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_32_wait_query_without_availability_draw_points_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_32_wait_query_without_availability_draw_points_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_32_wait_query_without_availability_draw_triangles_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_32_wait_query_without_availability_draw_triangles_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_32_wait_queue_without_availability_draw_points_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_32_wait_queue_without_availability_draw_points_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_32_wait_queue_without_availability_draw_triangles_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_32_wait_queue_without_availability_draw_triangles_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_64_wait_query_without_availability_draw_points_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_64_wait_query_without_availability_draw_points_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_64_wait_query_without_availability_draw_triangles_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_64_wait_query_without_availability_draw_triangles_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_64_wait_queue_without_availability_draw_points_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_64_wait_queue_without_availability_draw_points_clear_depth,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_64_wait_queue_without_availability_draw_triangles_clear_color,Fail
-dEQP-VK.query_pool.occlusion_query.get_results_precise_size_64_wait_queue_without_availability_draw_triangles_clear_depth,Fail
}
}
+void
+v3dv_cmd_buffer_pause_occlusion_query(struct v3dv_cmd_buffer *cmd_buffer)
+{
+ struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
+ struct v3dv_bo *occlusion_query_bo = state->query.active_query.bo;
+ if (occlusion_query_bo) {
+ assert(!state->query.active_query.paused_bo);
+ state->query.active_query.paused_bo = occlusion_query_bo;
+ state->query.active_query.bo = NULL;
+ state->dirty |= V3DV_CMD_DIRTY_OCCLUSION_QUERY;
+ }
+}
+
+void
+v3dv_cmd_buffer_resume_occlusion_query(struct v3dv_cmd_buffer *cmd_buffer)
+{
+ struct v3dv_cmd_buffer_state *state = &cmd_buffer->state;
+ struct v3dv_bo *occlusion_query_bo = state->query.active_query.paused_bo;
+ if (occlusion_query_bo) {
+ assert(!state->query.active_query.bo);
+ state->query.active_query.bo = occlusion_query_bo;
+ state->query.active_query.paused_bo = NULL;
+ state->dirty |= V3DV_CMD_DIRTY_OCCLUSION_QUERY;
+ }
+}
+
static void
v3dv_cmd_buffer_schedule_end_query(struct v3dv_cmd_buffer *cmd_buffer,
struct v3dv_query_pool *pool,
*/
struct v3dv_bo *bo;
uint32_t offset;
+ /* When the driver emits draw calls to implement other operations in
+ * the middle of a render pass (such as an attachment clear), we need
+ * to pause occlusion query recording and resume it later so that
+ * these draw calls don't register in occlussion counters. We use
+ * this to store the BO reference in which we should resume occlusion
+ * query counters after the driver is done emitting its draw calls.
+ */
+ struct v3dv_bo *paused_bo;
/* This pointer is not NULL if we have an active performance query */
struct v3dv_perf_query *perf;
uint32_t query,
VkQueryControlFlags flags);
+void v3dv_cmd_buffer_pause_occlusion_query(struct v3dv_cmd_buffer *cmd_buffer);
+void v3dv_cmd_buffer_resume_occlusion_query(struct v3dv_cmd_buffer *cmd_buffer);
+
void v3dv_cmd_buffer_end_query(struct v3dv_cmd_buffer *cmd_buffer,
struct v3dv_query_pool *pool,
uint32_t query);