windowSize / currentExtent vkGetPhysicalDeviceSurfaceCapabilitiesKHR

Aperta
#43 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp

Direzione di ricerca

The issue points to the tutorial’s “Swapchain” and “Recreate swapchain” sections and their source code, including the surfaceCaps.currentExtent check and windowSize update. Read those sections alongside the cited Vulkan swapchain reference and compare the extent handling across initial creation and resize. Done means resolving the apparent inconsistency in both tutorial text and source code, with the explanation matching the implementation.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Swapchain

This wording (emphasis added)

First step is getting the correct extent of the swapchain.

Is confusing.

docs.vulkan.org/VkSwapchainCreateInfoKHR says:

imageExtent [...] The behavior is platform-dependent if the image extent does not match the surface’s currentExtent as returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR.

However, later, in the if (updateSwapchain) block, imageExtent is changed to windowSize on a window resize.

Suggestion: do one of these things:

  • delete the if (surfaceCaps.currentExtent.width == 0xFFFFFFFF) block and set the value of swapchainExtent to the value of windowSize (both in the tutorial text and in the source code); remove the entire paragraph that starts with the sentence "First step is getting the correct extent of the swapchain."
  • improve the explanation in "Swapchain" and/or "Recreate swapchain" with more detail on the reason for apparent inconsistency in (not) comparing currentExtent as returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR with the window size as returned by SDL_GetWindowSize.
  • if the current "Recreate swapchain" implementation is incorrect, and it should indeed use the extent values from vkGetPhysicalDeviceSurfaceCapabilitiesKHR when possible, modify the "Recreate swapchain" implementation to do so (both in the tutorial text and in the source code).
Lingua principale
C++
Stelle
681
Fork
63
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SaschaWillems/HowToVulkan

Tutte le issue di SaschaWillems/HowToVulkan

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.