forked from pupbrained/vulkan-test
weh
This commit is contained in:
parent
61a2e9367b
commit
79fdc8c38a
|
@ -126,7 +126,7 @@
|
||||||
vulkanDir = "${mesa.drivers}/share/vulkan/icd.d";
|
vulkanDir = "${mesa.drivers}/share/vulkan/icd.d";
|
||||||
vulkanFiles = builtins.filter (file: builtins.match ".*\\.json$" file != null) (builtins.attrNames (builtins.readDir vulkanDir));
|
vulkanFiles = builtins.filter (file: builtins.match ".*\\.json$" file != null) (builtins.attrNames (builtins.readDir vulkanDir));
|
||||||
vulkanPaths = lib.concatStringsSep ":" (map (file: "${vulkanDir}/${file}") vulkanFiles);
|
vulkanPaths = lib.concatStringsSep ":" (map (file: "${vulkanDir}/${file}") vulkanFiles);
|
||||||
in "${linuxPackages_latest.nvidia_x11}/share/vulkan/icd.d/nvidia_icd.x86_64.json:${vulkanPaths}";
|
in "${linuxPackages_latest.nvidia_x11_vulkan_beta}/share/vulkan/icd.d/nvidia_icd.x86_64.json:${vulkanPaths}";
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export PATH="${llvmPackages_18.clang-tools.override {enableLibcxx = true;}}/bin:$PATH"
|
export PATH="${llvmPackages_18.clang-tools.override {enableLibcxx = true;}}/bin:$PATH"
|
||||||
|
|
|
@ -604,6 +604,7 @@ class VulkanApp {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn drawFrame() -> void {
|
fn drawFrame() -> void {
|
||||||
|
try {
|
||||||
vk::Result result =
|
vk::Result result =
|
||||||
mDevice->waitForFences(mInFlightFences[mCurrentFrame].get(), vk::Bool32(vk::True), UINT64_MAX);
|
mDevice->waitForFences(mInFlightFences[mCurrentFrame].get(), vk::Bool32(vk::True), UINT64_MAX);
|
||||||
|
|
||||||
|
@ -630,7 +631,9 @@ class VulkanApp {
|
||||||
mCommandBuffers[mCurrentFrame]->reset(vk::CommandBufferResetFlagBits::eReleaseResources);
|
mCommandBuffers[mCurrentFrame]->reset(vk::CommandBufferResetFlagBits::eReleaseResources);
|
||||||
recordCommandBuffer(mCommandBuffers[mCurrentFrame].get(), imageIndexValue);
|
recordCommandBuffer(mCommandBuffers[mCurrentFrame].get(), imageIndexValue);
|
||||||
|
|
||||||
std::array<vk::PipelineStageFlags, 1> waitStages = { vk::PipelineStageFlagBits::eColorAttachmentOutput };
|
std::array<vk::PipelineStageFlags, 1> waitStages = {
|
||||||
|
vk::PipelineStageFlagBits::eColorAttachmentOutput
|
||||||
|
};
|
||||||
|
|
||||||
vk::SubmitInfo submitInfo {
|
vk::SubmitInfo submitInfo {
|
||||||
.waitSemaphoreCount = 1,
|
.waitSemaphoreCount = 1,
|
||||||
|
@ -652,7 +655,6 @@ class VulkanApp {
|
||||||
.pImageIndices = &imageIndexValue,
|
.pImageIndices = &imageIndexValue,
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
|
||||||
vk::Result presentResult = mPresentQueue.presentKHR(presentInfo);
|
vk::Result presentResult = mPresentQueue.presentKHR(presentInfo);
|
||||||
|
|
||||||
fmt::println("Present result: {}", vk::to_string(presentResult));
|
fmt::println("Present result: {}", vk::to_string(presentResult));
|
||||||
|
@ -667,7 +669,6 @@ class VulkanApp {
|
||||||
|
|
||||||
mCurrentFrame = (mCurrentFrame + 1) % MAX_FRAMES_IN_FLIGHT;
|
mCurrentFrame = (mCurrentFrame + 1) % MAX_FRAMES_IN_FLIGHT;
|
||||||
} catch (vk::OutOfDateKHRError& err) {
|
} catch (vk::OutOfDateKHRError& err) {
|
||||||
fmt::println("Caught OutOfDateKHRError: {}", err.what());
|
|
||||||
mFramebufferResized = false;
|
mFramebufferResized = false;
|
||||||
recreateSwapChain();
|
recreateSwapChain();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue