mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
nvk/query: Pass an IS_TIMESTAMP flag explicitly to the CL kernel
This is more robust than looking at the report stride. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33959>
This commit is contained in:
parent
98b6b47599
commit
519c4c10f3
3 changed files with 6 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ nvk_copy_queries(uint64_t pool_addr, uint query_start, uint query_stride,
|
|||
uint64_t dst_offset = dst_stride * (uint64_t)i;
|
||||
uint num_reports = 1;
|
||||
|
||||
if (query_stride == sizeof(struct nvk_query_report)) {
|
||||
if (flags & NVK_QUERY_IS_TIMESTAMP) {
|
||||
/* Timestamp queries are the only ones use a single report */
|
||||
if (write_results) {
|
||||
vk_write_query(dst_addr + dst_offset, 0, flags, report->timestamp);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include "compiler/libcl/libcl.h"
|
||||
|
||||
#define NVK_QUERY_IS_TIMESTAMP 0x80000000u
|
||||
|
||||
struct nvk_query_report {
|
||||
uint64_t value;
|
||||
uint64_t timestamp;
|
||||
|
|
|
|||
|
|
@ -796,6 +796,9 @@ nvk_meta_copy_query_pool_results(struct nvk_cmd_buffer *cmd,
|
|||
return;
|
||||
}
|
||||
|
||||
if (pool->vk.query_type == VK_QUERY_TYPE_TIMESTAMP)
|
||||
flags |= NVK_QUERY_IS_TIMESTAMP;
|
||||
|
||||
const struct nvk_copy_query_push push = {
|
||||
.pool_addr = pool->mem->va->addr,
|
||||
.query_start = pool->query_start,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue