-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some more suspicious swapchain rfc keyword usage #1680
base: main
Are you sure you want to change the base?
Some more suspicious swapchain rfc keyword usage #1680
Conversation
Change "should be interpreted as follows" to " indicates the following"
"may" change to "must"
"may" change to "must"
Looks good. |
lgtm |
@@ -43,7 +43,7 @@ include::{generated}/api/protos/vkGetSwapchainCounterEXT.txt[] | |||
* pname:pCounterValue will return the current value of the counter. | |||
|
|||
If a counter is not available because the swapchain is out of date, the | |||
implementation may: return ename:VK_ERROR_OUT_OF_DATE_KHR. | |||
implementation must: return ename:VK_ERROR_OUT_OF_DATE_KHR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we drafted the OUT_OF_DATE language, some IHVs were uncomfortable with requiring errors in states that are defined as OUT_OF_DATE, and carry on as if things are fine instead. This language is fine with me, but other driver vendors may still object to such requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Good history. The issue by is KrO0ze identifying non-exact language. Do we know who objected? see if they reaffirm stance or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lot of code relies on mustiness of this. So if you preserve "may", it needs some serious acompanying note explaining what exactly that implies as well as what is the correct way to deal with swapchain state.
I can imagine though the failure could be allowed to be deferred. E.g. acquire
pretends success, and then it fails at present
. Still needs to be copiously noted in spec if that can happen and explicitly how far the driver can push that leeway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cubanismo - lets see if we can craft some text that will work here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if resolved per @cubanismo comment, but I certainly am happy with "must"...
chapters/VK_KHR_swapchain/wsi.txt
Outdated
@@ -258,7 +258,7 @@ flink:vkQueuePresentKHR any images it had already acquired from | |||
pname:oldSwapchain. | |||
E.g., an application may present an image from the old swapchain before an | |||
image from the new swapchain is ready to be presented. | |||
As usual, flink:vkQueuePresentKHR may: fail if pname:oldSwapchain has | |||
flink:vkQueuePresentKHR must: fail if pname:oldSwapchain has | |||
entered a state that causes ename:VK_ERROR_OUT_OF_DATE_KHR to be returned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not fix the full extent of the complaint in the original Issue.
The problem is also the sentence is tautological. If VK_ERROR_OUT_OF_DATE_KHR
was returned, then by definition it did fail (no may or must about it).
I think the intention of the sentence is the following (and so should the wording match that)
Retired
oldSwapchain
may: still become unusable as much as non-retired swapchain. When that happens, it is treated identically byvkQueuePresentKHR
; the command must returnVK_ERROR_OUT_OF_DATE_KHR
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworded.
chapters/VK_KHR_swapchain/wsi.txt
Outdated
@@ -258,7 +258,7 @@ flink:vkQueuePresentKHR any images it had already acquired from | |||
pname:oldSwapchain. | |||
E.g., an application may present an image from the old swapchain before an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is "just" a note, though I would still avoid unmarkupped RFC terminology. Should be "can:".
Change to read better
Try a little better wording
…RFC-keyword-usage
@@ -43,7 +43,7 @@ include::{generated}/api/protos/vkGetSwapchainCounterEXT.txt[] | |||
* pname:pCounterValue will return the current value of the counter. | |||
|
|||
If a counter is not available because the swapchain is out of date, the | |||
implementation may: return ename:VK_ERROR_OUT_OF_DATE_KHR. | |||
implementation must: return ename:VK_ERROR_OUT_OF_DATE_KHR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if resolved per @cubanismo comment, but I certainly am happy with "must"...
image from the new swapchain is ready to be presented. | ||
As usual, flink:vkQueuePresentKHR may: fail if pname:oldSwapchain has | ||
entered a state that causes ename:VK_ERROR_OUT_OF_DATE_KHR to be returned. | ||
pname:oldSwapchain. flink:vkQueuePresentKHR must: return ename:VK_ERROR_OUT_OF_DATE_KHR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems wrong, and contrary to the original text.
…RFC-keyword-usage
@stonesthrow Is this MR still alive? It appears that everything is resolved except one comment by krooze. |
@stonesthrow pinging on this PR again - would be nice to get it off the queue. |
@oddhack Sorry, I just haven't had any bandwidth to look into this again. At this time I am swamped. |
Closes #1586