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

sync: Refactor clear attachment code #9478

Conversation

artem-lunarg
Copy link
Contributor

@artem-lunarg artem-lunarg commented Feb 19, 2025

Some improvements of how clear attachment code is structured before updating corresponding error messages.

DrawAttachmentError does not provide additional information compared
to generic Error. We can revisit later if dedicated error message is
needed (need to improve ValidateDrawDynamicRenderingAttachment testing
at first).
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 375040.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 19107 running.

@@ -75,30 +74,6 @@ struct BeginRenderingCmdState {
void InitSubpassContexts(VkQueueFlags queue_flags, const vvl::RenderPass &rp_state, const AccessContext *external_context,
std::vector<AccessContext> &subpass_contexts);

struct ClearAttachmentInfo {
Copy link
Contributor Author

@artem-lunarg artem-lunarg Feb 19, 2025

Choose a reason for hiding this comment

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

One change is that this structure was updated (and moved to sync_commandbuffer.h) and now is a simple 5 LOC type. Also code reorganization allowed to replace some pointer with references.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 19107 passed.

@artem-lunarg artem-lunarg marked this pull request as ready for review February 19, 2025 11:18
@artem-lunarg artem-lunarg requested a review from a team as a code owner February 19, 2025 11:18
@@ -675,6 +675,8 @@ bool CommandBufferAccessContext::ValidateDrawAttachment(const Location &loc) con
}

bool CommandBufferAccessContext::ValidateDrawDynamicRenderingAttachment(const Location &location) const {
// TODO: Add tests. This is never called by existing tests.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe create a corresponding issue?

Copy link
Contributor Author

@artem-lunarg artem-lunarg Feb 19, 2025

Choose a reason for hiding this comment

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

yes
#9480

@artem-lunarg artem-lunarg merged commit 5a1bdf3 into KhronosGroup:main Feb 19, 2025
21 checks passed
@artem-lunarg artem-lunarg deleted the artem-sync-refactor-clear-attachments branch February 19, 2025 14:01
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