Some more suspicious swapchain rfc keyword usage#1680
Some more suspicious swapchain rfc keyword usage#1680stonesthrow wants to merge 10 commits intoKhronosGroup:mainfrom
Conversation
Change "should be interpreted as follows" to " indicates the following"
"may" change to "must"
"may" change to "must"
|
Looks good. |
|
lgtm |
|
|
||
| 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.
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.
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.
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.
@cubanismo - lets see if we can craft some text that will work here.
There was a problem hiding this comment.
Not sure if resolved per @cubanismo comment, but I certainly am happy with "must"...
There was a problem hiding this comment.
Discussed in working group today: No objection to proceeding with "must:"
chapters/VK_KHR_swapchain/wsi.txt
Outdated
| 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.
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
oldSwapchainmay: 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.
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.
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
|
|
||
| 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.
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.
This seems wrong, and contrary to the original text.
There was a problem hiding this comment.
Agreed. This should probably stay as-is. Was there concern about the informal nature of the language used here or something? It seems fine for the context (A note, not normative content). Arguably all the normative terms (must:, can:, etc.) should be removed from the note, but I think there are several other examples of those leaking into spec notes.
The intent is that when a non-out-of-date swapchain is retired, applications are allowed to continue presenting its images if they were already acquired. This enables smooth transitions from retired->new swapchains. If implementations can not implement that, they are of course allowed to return OUT_OF_DATE when applications attempt it. CTS now contains coverage for this usage.
…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. |
cubanismo
left a comment
There was a problem hiding this comment.
@stonesthrow Did you still want to proceed with this PR? If so, please address the feedback.
|
|
||
| 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.
Discussed in working group today: No objection to proceeding 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.
Agreed. This should probably stay as-is. Was there concern about the informal nature of the language used here or something? It seems fine for the context (A note, not normative content). Arguably all the normative terms (must:, can:, etc.) should be removed from the note, but I think there are several other examples of those leaking into spec notes.
The intent is that when a non-out-of-date swapchain is retired, applications are allowed to continue presenting its images if they were already acquired. This enables smooth transitions from retired->new swapchains. If implementations can not implement that, they are of course allowed to return OUT_OF_DATE when applications attempt it. CTS now contains coverage for this usage.
Closes #1586