Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
05e2249
Fix rename feature
Erfan-Ahmadi Jun 10, 2022
ff6b6b9
revert change because it's going to get removed anyways [avoiding con…
Erfan-Ahmadi Jun 10, 2022
3b39f2e
InitArgs stub
deprilula28 Jul 11, 2022
e48bd77
Start with CommonAPI changes for resize maintenance
deprilula28 Jul 11, 2022
d11b758
Refactoring CommonAPI
deprilula28 Jul 12, 2022
200d680
Fix build with CommonAPI changes
deprilula28 Jul 12, 2022
f23a440
Check for presentMode & surfaceTransform
deprilula28 Jul 12, 2022
802b426
Move logger over
deprilula28 Jul 13, 2022
a633b92
Merge branch 'master' into erfan_examples_fix
Erfan-Ahmadi Jul 14, 2022
cd9fa19
Merge branch 'master' into erfan_examples_fix
Erfan-Ahmadi Jul 14, 2022
a88070f
Apply some PR reviews
deprilula28 Jul 14, 2022
3749ad2
Use logLevel from params
deprilula28 Jul 14, 2022
4acadfd
Fixes for example 02 to work
deprilula28 Jul 14, 2022
19f00c5
Revive InitWithDefaultExt & RaytracingExt
deprilula28 Jul 14, 2022
71c1f60
Get rid of vectors in InitParams
deprilula28 Jul 18, 2022
ce10231
Return smart refctd dynamic array
deprilula28 Jul 18, 2022
ed5378e
Merge branch 'master' into resizing_maintenance
deprilula28 Jul 18, 2022
1c8f4ea
Update main.cpp
deprilula28 Jul 18, 2022
5acc1e5
Merge branch 'master' into resizing_maintenance
deprilula28 Jul 18, 2022
c5d5287
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla-…
deprilula28 Jul 18, 2022
3fe574a
Merge branch 'resizing_maintenance' of github.com:Devsh-Graphics-Prog…
deprilula28 Jul 18, 2022
588b282
Merge branch 'master' into erfan_examples_fix
Erfan-Ahmadi Jul 19, 2022
cfed4fa
Fix example 02
deprilula28 Jul 19, 2022
89faa92
Move non-templated functions from header to CommonAPI.cpp
deprilula28 Jul 19, 2022
bec08dc
Add acceptable surface format check
deprilula28 Jul 19, 2022
1b8a2c4
Add handling of IRetiredSwapchainResources
deprilula28 Jul 19, 2022
4c7b55e
Fix issues with deque
deprilula28 Jul 19, 2022
494ee9c
Apply reviews
deprilula28 Jul 21, 2022
3046000
Apply review
deprilula28 Jul 21, 2022
f0c7737
Use new swapchain API
deprilula28 Jul 21, 2022
e7667cd
Fix release build
deprilula28 Jul 21, 2022
14cea5c
Add CommonAPI header guard
deprilula28 Jul 22, 2022
232013d
Move GPU init code to cpp file
deprilula28 Jul 22, 2022
a1b0267
Use rvalue ref
deprilula28 Jul 22, 2022
e2d58e7
Remove CVulkanSwapchain include
deprilula28 Jul 25, 2022
96b08e1
Creating GL swapchains
deprilula28 Jul 25, 2022
5dfeb3d
Use swapchain image create API
deprilula28 Jul 26, 2022
069528a
"fixed" example 5 to compile, still doesn't work on Vulkan due to mis…
devshgraphicsprogramming Jul 28, 2022
a1e0cf4
fix up a few examples to work with my proposed API changes
devshgraphicsprogramming Jul 28, 2022
66542ad
Fix example 09
Erfan-Ahmadi Jul 29, 2022
ebb08b0
Changes for resizing in example 02
deprilula28 Jul 29, 2022
1c860ee
Merge remote-tracking branch 'origin/importing_images_and_buffers' in…
deprilula28 Jul 29, 2022
c7c4840
Fix issues with resizing & event handling
deprilula28 Aug 1, 2022
582e164
Apply fixes to several examples
deprilula28 Aug 1, 2022
4b3fe9a
Change scImageCount to swapchainImageCount, fix more examples
deprilula28 Aug 2, 2022
bc01b0b
WIP resizing on example 02
deprilula28 Aug 2, 2022
2c0c449
Improve resizing callback
deprilula28 Aug 3, 2022
76e7bc7
Patches for flickering & refs using condvar & pool resetting
deprilula28 Aug 3, 2022
b749aa5
Update command buffer todos
deprilula28 Aug 3, 2022
11748d0
Reset again
deprilula28 Aug 3, 2022
5c91720
Revert descriptor set creation on resize to fix issue
deprilula28 Aug 3, 2022
0d12ac8
Move over onResize to IGraphicalApplicationFramewor
deprilula28 Aug 4, 2022
f105def
IEventHandler use IGraphicalApplication and move GraphicalApp back to…
Erfan-Ahmadi Aug 5, 2022
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
13 changes: 6 additions & 7 deletions 01.HelloWorld/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ Choose Graphics API:
uint32_t minSwapchainImageCount(~0u);
video::ISurface::SFormat surfaceFormat;
video::ISurface::E_PRESENT_MODE presentMode;
asset::E_SHARING_MODE imageSharingMode;
VkExtent2D swapchainExtent;

// Todo(achal): Look at this:
Expand Down Expand Up @@ -372,12 +371,10 @@ Choose Graphics API:
if (graphicsFamilyIndex == presentFamilyIndex)
{
deviceCreationParams.queueParamsCount = 1u;
imageSharingMode = asset::ESM_EXCLUSIVE;
}
else
{
deviceCreationParams.queueParamsCount = 2u;
imageSharingMode = asset::ESM_CONCURRENT;
}

std::vector<uint32_t> queueFamilyIndices(deviceCreationParams.queueParamsCount);
Expand All @@ -402,6 +399,9 @@ Choose Graphics API:
deviceCreationParams.requiredFeatures = requiredFeatures_Device;

device = gpu->createLogicalDevice(std::move(deviceCreationParams));
// no point concurrent sharing mode if only using one queue
if (queueFamilyIndices.size()<2)
queueFamilyIndices.clear();

graphicsQueue = device->getQueue(graphicsFamilyIndex, 0u);
presentQueue = device->getQueue(presentFamilyIndex, 0u);
Expand All @@ -415,7 +415,6 @@ Choose Graphics API:
sc_params.height = WIN_H;
sc_params.queueFamilyIndexCount = static_cast<uint32_t>(queueFamilyIndices.size());
sc_params.queueFamilyIndices = queueFamilyIndices.data();
sc_params.imageSharingMode = imageSharingMode;
sc_params.preTransform = video::ISurface::EST_IDENTITY_BIT;
sc_params.compositeAlpha = video::ISurface::ECA_OPAQUE_BIT;
sc_params.imageUsage = asset::IImage::EUF_COLOR_ATTACHMENT_BIT;
Expand All @@ -429,8 +428,8 @@ Choose Graphics API:
attachmentDescription.samples = asset::IImage::ESCF_1_BIT;
attachmentDescription.loadOp = video::IGPURenderpass::ELO_CLEAR; // when the first subpass begins with this attachment, clear its color and depth components
attachmentDescription.storeOp = video::IGPURenderpass::ESO_STORE; // when the last subpass ends with this attachment, store its results
attachmentDescription.initialLayout = asset::EIL_UNDEFINED;
attachmentDescription.finalLayout = asset::EIL_PRESENT_SRC;
attachmentDescription.initialLayout = asset::IImage::EL_UNDEFINED;
attachmentDescription.finalLayout = asset::IImage::EL_PRESENT_SRC;

video::IGPURenderpass::SCreationParams::SSubpassDescription subpassDescription = {};
subpassDescription.flags = video::IGPURenderpass::ESDF_NONE;
Expand All @@ -441,7 +440,7 @@ Choose Graphics API:
video::IGPURenderpass::SCreationParams::SSubpassDescription::SAttachmentRef colorAttRef;
{
colorAttRef.attachment = 0u;
colorAttRef.layout = asset::EIL_COLOR_ATTACHMENT_OPTIMAL;
colorAttRef.layout = asset::IImage::EL_COLOR_ATTACHMENT_OPTIMAL;
}
subpassDescription.colorAttachmentCount = 1u;
subpassDescription.colorAttachments = &colorAttRef;
Expand Down
Loading