Skip to content

Express "ALL_*" pipeline stages as including _valid_ bits #2219

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
16 changes: 9 additions & 7 deletions chapters/synchronization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,11 @@ ifdef::VK_KHR_ray_tracing_maintenance1[]
endif::VK_KHR_ray_tracing_maintenance1[]
endif::VK_KHR_acceleration_structure,VK_NV_ray_tracing[]
* ename:VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT specifies the execution of
all graphics pipeline stages, and is equivalent to the logical OR of:
all graphics pipeline stages, that would be valid in the context that
Copy link
Contributor

@krOoze krOoze Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"graphics pipeline stages" is somewhat misleading, since it seems to include Bits from e.g. subpass shading pipeline.

this bitflag is provided, from the following list of stages:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. "specifies the execution" is weirdly too specific. ALL_COMMANDS says just "specifies all pipeline stages that". Should probably at least be consistent. So perhaps "specifies all applicable graphics pipeline stages, that is valid stages from this list:

  2. I think styleguide prescribes bitmask over "bitflag".

  3. I think a good rule of thumb is that "which" is with comma, while "that" is wihout. "that" part usually contains information that should not be separated from rest of the sentence.

  4. 👍removal of incorrect "logical OR"

  5. There's probably more elegant way to word it. Pehaps:

VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT specifies all applicable graphics pipeline stages, i.e. functionally it is a substitute for specifying those stages from the following list that would be valid to use:

include::{generated}/sync/flagDefinitions/VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT.adoc[]
* ename:VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT specifies all operations
performed by all commands supported on the queue it is used with.
* ename:VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT specifies all pipeline stages
that would be valid in the context that this bitflag is provided.
ifdef::VK_EXT_conditional_rendering[]
* ename:VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT specifies the
stage of the pipeline where the predicate of conditional rendering is
Expand Down Expand Up @@ -660,8 +661,9 @@ ifdef::VK_NV_ray_tracing[flink:vkCmdTraceRaysNV]
ifdef::VK_NV_ray_tracing+VK_KHR_ray_tracing_pipeline[,]
ifdef::VK_KHR_ray_tracing_pipeline[flink:vkCmdTraceRaysKHR, or flink:vkCmdTraceRaysIndirectKHR]
endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[]
* ename:VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT specifies the execution of all
graphics pipeline stages, and is equivalent to the logical OR of:
* ename:VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT specifies the execution of
all graphics pipeline stages, that would be valid in the context that
this bitflag is provided, from the following list of stages:
** ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT
ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[]
** ename:VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT
Expand All @@ -688,8 +690,8 @@ endif::VK_KHR_fragment_shading_rate,VK_NV_shading_rate_image[]
ifdef::VK_EXT_fragment_density_map[]
** ename:VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT
endif::VK_EXT_fragment_density_map[]
* ename:VK_PIPELINE_STAGE_ALL_COMMANDS_BIT specifies all operations
performed by all commands supported on the queue it is used with.
* ename:VK_PIPELINE_STAGE_ALL_COMMANDS_BIT specifies all pipeline stages that
would be valid in the context that this bitflag is provided.
Copy link
Contributor

@krOoze krOoze Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly ambiguous whether it includes STAGE_2 stages, or only those defined in this bitmask.

PS: Exported to #2235.

ifdef::VK_EXT_conditional_rendering[]
* ename:VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT specifies the
stage of the pipeline where the predicate of conditional rendering is
Expand Down