Skip to content
Merged
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
1 change: 0 additions & 1 deletion attachments/28_model_loading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
const std::string MODEL_PATH = "models/viking_room.obj";
const std::string TEXTURE_PATH = "textures/viking_room.png";
constexpr int MAX_FRAMES_IN_FLIGHT = 2;
Expand Down
1 change: 0 additions & 1 deletion attachments/29_mipmapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
const std::string MODEL_PATH = "models/viking_room.obj";
const std::string TEXTURE_PATH = "textures/viking_room.png";
constexpr int MAX_FRAMES_IN_FLIGHT = 2;
Expand Down
1 change: 0 additions & 1 deletion attachments/30_multisampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
const std::string MODEL_PATH = "models/viking_room.obj";
const std::string TEXTURE_PATH = "textures/viking_room.png";
constexpr int MAX_FRAMES_IN_FLIGHT = 2;
Expand Down
2 changes: 0 additions & 2 deletions attachments/31_compute_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
constexpr uint32_t PARTICLE_COUNT = 8192;

constexpr int MAX_FRAMES_IN_FLIGHT = 2;

const std::vector validationLayers = {
Expand Down
3 changes: 1 addition & 2 deletions attachments/32_ecosystem_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
const std::string MODEL_PATH = "models/viking_room.obj";
const std::string TEXTURE_PATH = "textures/viking_room.png";
constexpr int MAX_FRAMES_IN_FLIGHT = 2;
Expand Down Expand Up @@ -1521,7 +1520,7 @@ class HelloTriangleApplication {
}

void drawFrame() {
while (vk::Result::eTimeout == device.waitForFences(*inFlightFences[currentFrame], vk::True, FenceTimeout))
while (vk::Result::eTimeout == device.waitForFences(*inFlightFences[currentFrame], vk::True, UINT64_MAX))
;
auto [result, imageIndex] = swapChain.acquireNextImage(UINT64_MAX, *presentCompleteSemaphore[currentFrame], nullptr);

Expand Down
5 changes: 2 additions & 3 deletions attachments/33_vulkan_profiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
const std::string MODEL_PATH = "models/viking_room.obj";
const std::string TEXTURE_PATH = "textures/viking_room.png";
constexpr int MAX_FRAMES_IN_FLIGHT = 2;
Expand Down Expand Up @@ -1520,11 +1519,11 @@ class HelloTriangleApplication {
}

void drawFrame() {
static_cast<void>(device.waitForFences({*inFlightFences[currentFrame]}, VK_TRUE, FenceTimeout));
static_cast<void>(device.waitForFences({*inFlightFences[currentFrame]}, VK_TRUE, UINT64_MAX));

uint32_t imageIndex;
try {
auto [result, idx] = swapChain.acquireNextImage(FenceTimeout, *imageAvailableSemaphores[currentFrame]);
auto [result, idx] = swapChain.acquireNextImage(UINT64_MAX, *imageAvailableSemaphores[currentFrame]);
imageIndex = idx;
} catch (vk::OutOfDateKHRError&) {
recreateSwapChain();
Expand Down
5 changes: 2 additions & 3 deletions attachments/34_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
const std::string MODEL_PATH = "models/viking_room.obj";
const std::string TEXTURE_PATH = "textures/viking_room.png";
constexpr int MAX_FRAMES_IN_FLIGHT = 2;
Expand Down Expand Up @@ -1256,11 +1255,11 @@ class HelloTriangleApplication {

// Draw frame
void drawFrame() {
static_cast<void>(device.waitForFences({*inFlightFences[currentFrame]}, VK_TRUE, FenceTimeout));
static_cast<void>(device.waitForFences({*inFlightFences[currentFrame]}, VK_TRUE, UINT64_MAX));

uint32_t imageIndex;
try {
auto [result, idx] = swapChain.acquireNextImage(FenceTimeout, *imageAvailableSemaphores[currentFrame]);
auto [result, idx] = swapChain.acquireNextImage(UINT64_MAX, *imageAvailableSemaphores[currentFrame]);
imageIndex = idx;
} catch (vk::OutOfDateKHRError&) {
recreateSwapChain();
Expand Down
1 change: 0 additions & 1 deletion attachments/35_gltf_ktx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
// Update paths to use glTF model and KTX2 texture
const std::string MODEL_PATH = "models/viking_room.glb";
const std::string TEXTURE_PATH = "textures/viking_room.ktx2";
Expand Down
1 change: 0 additions & 1 deletion attachments/36_multiple_objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
// Update paths to use glTF model and KTX2 texture
const std::string MODEL_PATH = "models/viking_room.glb";
const std::string TEXTURE_PATH = "textures/viking_room.ktx2";
Expand Down
3 changes: 0 additions & 3 deletions attachments/37_multithreading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
constexpr uint32_t PARTICLE_COUNT = 8192;

constexpr int MAX_FRAMES_IN_FLIGHT = 2;


struct UniformBufferObject {
float deltaTime = 1.0f;
};
Expand Down
1 change: 0 additions & 1 deletion attachments/38_ray_tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import vulkan_hpp;

constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
const std::string MODEL_PATH = "models/plant_on_table.obj";
constexpr int MAX_FRAMES_IN_FLIGHT = 2;

Expand Down
1 change: 0 additions & 1 deletion en/08_Loading_models.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Put two new configuration variables in your program to define the model and text
----
constexpr uint32_t WIDTH = 800;
constexpr uint32_t HEIGHT = 600;
constexpr uint64_t FenceTimeout = 100000000;
const std::string MODEL_PATH = "models/viking_room.obj";
const std::string TEXTURE_PATH = "textures/viking_room.png";
----
Expand Down
4 changes: 2 additions & 2 deletions en/11_Compute_Shader.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ We then use these to synchronize the compute buffer submission with the graphics
----
{
// Compute submission
while ( vk::Result::eTimeout == device->waitForFences( **computeInFlightFences[currentFrame], vk::True, FenceTimeout ) )
while ( vk::Result::eTimeout == device->waitForFences(**computeInFlightFences[currentFrame], vk::True, UINT64_MAX) )
;
updateUniformBuffer(currentFrame);
Expand All @@ -636,7 +636,7 @@ We then use these to synchronize the compute buffer submission with the graphics
}
{
// Graphics submission
while ( vk::Result::eTimeout == device->waitForFences( **inFlightFences[currentFrame], vk::True, FenceTimeout ) )
while ( vk::Result::eTimeout == device->waitForFences(**inFlightFences[currentFrame], vk::True, UINT64_MAX))
...
device->resetFences( **inFlightFences[currentFrame] );
Expand Down
Loading