Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/glfw/glfw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ vk::SurfaceKHR Window::createWindowSurface(GLFWwindow* window, const vk::Instanc
VkSurfaceKHR rawSurface;
vk::Result result =
static_cast<vk::Result>(glfwCreateWindowSurface((VkInstance)instance, window, reinterpret_cast<const VkAllocationCallbacks*>(pAllocator), &rawSurface));
return vk::createResultValue(result, rawSurface, "vk::CommandBuffer::begin");
return {vk::ResultValue<VkSurfaceKHR>(result, rawSurface).value};
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/pipelinestatistics/pipelinestatistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class VulkanExample : public vkx::ExampleBase {
// Retrieves the results of the pipeline statistics query submitted to the command buffer
void getQueryResults() {
uint32_t count = static_cast<uint32_t>(pipelineStats.size());
device.getQueryPoolResults<uint64_t>(queryPool, 0, 1, pipelineStats, sizeof(uint64_t), vk::QueryResultFlagBits::e64);
device.getQueryPoolResults(queryPool, 0, 1, count * sizeof(uint64_t), pipelineStats.data(), sizeof(uint64_t), vk::QueryResultFlagBits::e64);
}

void updateCommandBufferPreDraw(const vk::CommandBuffer& drawCmdBuffer) override {
Expand Down
3 changes: 2 additions & 1 deletion examples/terraintessellation/terraintessellation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ class VulkanExample : public vkx::ExampleBase {
// Retrieves the results of the pipeline statistics query submitted to the command buffer
void getQueryResults() {
// We use vkGetQueryResults to copy the results into a host visible buffer
device.getQueryPoolResults<uint64_t>(queryPool, 0, 1, pipelineStats, sizeof(uint64_t), vk::QueryResultFlagBits::e64);
uint32_t count = static_cast<uint32_t>(pipelineStats.size());
device.getQueryPoolResults(queryPool, 0, 1, count * sizeof(uint64_t), pipelineStats.data(), sizeof(uint64_t), vk::QueryResultFlagBits::e64);
}

void loadAssets() override {
Expand Down