This repository has been archived by the owner on Dec 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
505fb02
commit 2bb02aa
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
#include "common.h" | ||
#include "device.h" | ||
#include "vk_alloc.h" | ||
#include "v3dvk_entrypoints.h" | ||
#include "v3dvk_error.h" | ||
#include "v3dvk_query.h" | ||
|
||
VkResult | ||
v3dvk_CreateQueryPool(VkDevice _device, | ||
const VkQueryPoolCreateInfo *pCreateInfo, | ||
const VkAllocationCallbacks *pAllocator, | ||
VkQueryPool *pQueryPool) | ||
{ | ||
V3DVK_FROM_HANDLE(v3dvk_device, device, _device); | ||
struct v3dvk_query_pool *pool = | ||
vk_alloc2(&device->alloc, pAllocator, sizeof(*pool), 8, | ||
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); | ||
|
||
if (!pool) | ||
return v3dvk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY); | ||
|
||
*pQueryPool = v3dvk_query_pool_to_handle(pool); | ||
return VK_SUCCESS; | ||
} | ||
|
||
void | ||
v3dvk_DestroyQueryPool(VkDevice _device, | ||
VkQueryPool _pool, | ||
const VkAllocationCallbacks *pAllocator) | ||
{ | ||
V3DVK_FROM_HANDLE(v3dvk_device, device, _device); | ||
V3DVK_FROM_HANDLE(v3dvk_query_pool, pool, _pool); | ||
|
||
if (!pool) | ||
return; | ||
|
||
vk_free2(&device->alloc, pAllocator, pool); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
#ifndef V3DVK_QUERY_H | ||
#define V3DVK_QUERY_H | ||
|
||
struct v3dvk_query_pool | ||
{ | ||
#if 0 | ||
uint32_t stride; | ||
uint32_t availability_offset; | ||
uint64_t size; | ||
char *ptr; | ||
VkQueryType type; | ||
uint32_t pipeline_stats_mask; | ||
#endif | ||
}; | ||
|
||
#endif |