Skip to content

layers: Rework finding next stage - #13070

Merged
spencer-lunarg merged 1 commit into
KhronosGroup:mainfrom
ziga-lunarg:ziga-rework-find-next-stage
Sep 11, 2026
Merged

layers: Rework finding next stage#13070
spencer-lunarg merged 1 commit into
KhronosGroup:mainfrom
ziga-lunarg:ziga-rework-find-next-stage

Conversation

@ziga-lunarg

Copy link
Copy Markdown
Contributor

No description provided.

@ziga-lunarg
ziga-lunarg requested a review from a team as a code owner September 11, 2026 16:02
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 115400.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24444 running.

Comment thread layers/utils/shader_utils.h Outdated
constexpr uint32_t kShaderObjectStageCount = 8u;

// In order of how stages are linked together
constexpr std::array kGraphicsStages = {VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. "graphics" is misleading, mesh is very much graphics, maybe kVertexGraphicsStages and kMeshGraphicsStages

  2. I realize these

// It is very rare to have more than 3 stages (really only geo/tess) and better to save memory/time for the 99% use cases
static const uint32_t kCommonMaxGraphicsShaderStages = 3;

static const VkShaderStageFlags kShaderStageAllGraphics =
    VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT |
    VK_SHADER_STAGE_GEOMETRY_BIT | VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_TASK_BIT_EXT | VK_SHADER_STAGE_MESH_BIT_EXT;

static const VkShaderStageFlags kShaderStageAllRayTracing =
    VK_SHADER_STAGE_ANY_HIT_BIT_KHR | VK_SHADER_STAGE_CALLABLE_BIT_KHR | VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR |
    VK_SHADER_STAGE_INTERSECTION_BIT_KHR | VK_SHADER_STAGE_MISS_BIT_KHR | VK_SHADER_STAGE_RAYGEN_BIT_KHR;

static bool inline IsStageInPipelineBindPoint(VkShaderStageFlags stages, VkPipelineBindPoint bind_point) {
    switch (bind_point) {
        case VK_PIPELINE_BIND_POINT_GRAPHICS:
            return (stages & kShaderStageAllGraphics) != 0;
        case VK_PIPELINE_BIND_POINT_COMPUTE:
            return (stages & VK_SHADER_STAGE_COMPUTE_BIT) != 0;
        case VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR:
            return (stages & kShaderStageAllRayTracing) != 0;
        default:
            return false;
    }
}

are in vk_api_utils.h ... if we are going to redo all of this, lets move those here as well so they isn't 2 spots holding shader stage lists now

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24444 passed.

@ziga-lunarg
ziga-lunarg force-pushed the ziga-rework-find-next-stage branch from 3440961 to 7fee405 Compare September 11, 2026 17:04
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 115559.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24445 running.

@ziga-lunarg
ziga-lunarg force-pushed the ziga-rework-find-next-stage branch from 7fee405 to d8249b3 Compare September 11, 2026 17:11
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 115616.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24446 running.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24446 failed.

@ziga-lunarg
ziga-lunarg force-pushed the ziga-rework-find-next-stage branch from d8249b3 to 7a5854a Compare September 11, 2026 17:28
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 115647.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24448 running.

@ziga-lunarg
ziga-lunarg force-pushed the ziga-rework-find-next-stage branch from 7a5854a to a5661b8 Compare September 11, 2026 17:44
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 115664.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24449 running.

@ziga-lunarg
ziga-lunarg force-pushed the ziga-rework-find-next-stage branch from a5661b8 to 8f443bd Compare September 11, 2026 18:05
@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 115703.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24450 running.

@ci-tester-lunarg

Copy link
Copy Markdown
Collaborator

CI Vulkan-ValidationLayers build # 24450 passed.

@spencer-lunarg spencer-lunarg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for all the fun header include fixes, but yes, this feels much better for a helper in your other internal change

@spencer-lunarg
spencer-lunarg merged commit 7b4a220 into KhronosGroup:main Sep 11, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants