Skip to content
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

gpu: Remove passthrough to run a Pass #9202

Merged

Conversation

spencer-lunarg
Copy link
Contributor

We use to add this

bool Module::RunPassDescriptorIndexingOOB() {
    DescriptorIndexingOOBPass pass(*this);
    const bool changed = pass.Run();
    if (print_debug_info_) {
        pass.PrintDebugInfo();
    }
    return changed;
}

type logic for every pass we added, removed it (and just passed in enabled_features) so it is more streamline to quickly/easily add a new SPIR-V pass

@spencer-lunarg spencer-lunarg requested a review from a team as a code owner January 10, 2025 18:23
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 342384.

@spencer-lunarg spencer-lunarg force-pushed the spencer-lunarg-gpu-clean-4499 branch from 7615a59 to 02fb1a0 Compare January 10, 2025 18:23
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 342399.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18609 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18609 passed.

@spencer-lunarg spencer-lunarg force-pushed the spencer-lunarg-gpu-clean-4499 branch from 02fb1a0 to 928e3e6 Compare January 11, 2025 02:30
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 342649.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18615 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18615 passed.

@@ -113,8 +103,7 @@ class Module {
const uint32_t output_buffer_descriptor_set_;

const bool support_non_semantic_info_;
Copy link
Contributor

Choose a reason for hiding this comment

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

should support_non_semantic_info_ be removed too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is from an extension, was debating to do it, but doubt other passes care about extension, but 100% will care about feature bits

layers/gpuav/spirv/pass.h Outdated Show resolved Hide resolved
// Require passes to print info as extremely helpful for debugging
virtual void PrintDebugInfo() const = 0;
// Wrapper that each pass can use to start
bool Start();
Copy link
Contributor

Choose a reason for hiding this comment

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

a Start calls for a End or a Finish, so IMO inappropriate here.
If I follow things correctly, Run is now only called within Start.
So I would expect calls now looking like modified |= texel_buffer_pass.Start(); to stay similar to how they were, by going modified |= texel_buffer_pass.Run();
And here Run would look like your Start:

bool Pass::Run() {
    // I too would like to have "Instrument" be called `Run`, but since we can't I guess we can only cope 
    // Also "Instrument" should probably be a `protected` method
    const bool modified = Instrument();
    if (module_.print_debug_info_) {
        PrintDebugInfo();
    }
    return modified;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the Run() is what spirv-opt uses to "run a pass"

honestly Run and Instrument are better... I just picked Start because I needed a name

@spencer-lunarg spencer-lunarg force-pushed the spencer-lunarg-gpu-clean-4499 branch from 928e3e6 to 1a8bfda Compare January 14, 2025 13:07
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 344603.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18645 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18645 failed.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 344715.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18649 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 18649 passed.

@spencer-lunarg spencer-lunarg merged commit d87fb07 into KhronosGroup:main Jan 14, 2025
21 checks passed
@spencer-lunarg spencer-lunarg deleted the spencer-lunarg-gpu-clean-4499 branch January 14, 2025 15:11
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