aboutsummaryrefslogtreecommitdiffstats
path: root/src/vulkan/gen8_cmd_buffer.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-12-03 13:25:12 -0800
committerJason Ekstrand <[email protected]>2015-12-03 13:44:02 -0800
commit888744cabf8daaa463394d0cf10341ab00a5ecd5 (patch)
treede7bc97eae8015f4ec3e8cf06e69fffc01940207 /src/vulkan/gen8_cmd_buffer.c
parent924fbfc9a1fc46a3698fa23649e6dccc3e3e6782 (diff)
vk/0.210.0: Update queries to the new API
Diffstat (limited to 'src/vulkan/gen8_cmd_buffer.c')
-rw-r--r--src/vulkan/gen8_cmd_buffer.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/vulkan/gen8_cmd_buffer.c b/src/vulkan/gen8_cmd_buffer.c
index 23dc9ad5748..6d0ac25b6d8 100644
--- a/src/vulkan/gen8_cmd_buffer.c
+++ b/src/vulkan/gen8_cmd_buffer.c
@@ -854,33 +854,32 @@ void genX(CmdEndQuery)(
void genX(CmdWriteTimestamp)(
VkCommandBuffer commandBuffer,
- VkTimestampType timestampType,
- VkBuffer destBuffer,
- VkDeviceSize destOffset)
+ VkPipelineStageFlagBits pipelineStage,
+ VkQueryPool queryPool,
+ uint32_t entry)
{
ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
- ANV_FROM_HANDLE(anv_buffer, buffer, destBuffer);
- struct anv_bo *bo = buffer->bo;
+ ANV_FROM_HANDLE(anv_query_pool, pool, queryPool);
- switch (timestampType) {
- case VK_TIMESTAMP_TYPE_TOP:
+ assert(pool->type == VK_QUERY_TYPE_TIMESTAMP);
+
+ switch (pipelineStage) {
+ case VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT:
anv_batch_emit(&cmd_buffer->batch, GENX(MI_STORE_REGISTER_MEM),
.RegisterAddress = TIMESTAMP,
- .MemoryAddress = { bo, buffer->offset + destOffset });
+ .MemoryAddress = { &pool->bo, entry * 8 });
anv_batch_emit(&cmd_buffer->batch, GENX(MI_STORE_REGISTER_MEM),
.RegisterAddress = TIMESTAMP + 4,
- .MemoryAddress = { bo, buffer->offset + destOffset + 4 });
+ .MemoryAddress = { &pool->bo, entry * 8 + 4 });
break;
- case VK_TIMESTAMP_TYPE_BOTTOM:
+ default:
+ /* Everything else is bottom-of-pipe */
anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL),
.DestinationAddressType = DAT_PPGTT,
.PostSyncOperation = WriteTimestamp,
.Address = /* FIXME: This is only lower 32 bits */
- { bo, buffer->offset + destOffset });
- break;
-
- default:
+ { &pool->bo, entry * 8 });
break;
}
}