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

Add discarded fragment callback for D3D12 pixel history #3136

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

skarolewics
Copy link
Contributor

No description provided.

Copy link
Collaborator

@Zorro666 Zorro666 left a comment

Choose a reason for hiding this comment

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

Apologies for the long delay for reviewing (have been away travelling).

Thank you again for the D3D12 pixel history work.
Made some small comments/thoughts which do not need to be actioned.

Looking forward to the end result of your D3D12 pixel history work being in RenderDoc so it can be continued forward and then included in the product

struct D3D12PixelHistoryDiscardedFragmentsCallback : D3D12PixelHistoryCallback
{
// Key is event ID and value is a list of primitive IDs
std::map<uint32_t, rdcarray<int32_t>> m_Events;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pure thought/comment and no need to change anything
In principal this could be const but would need to change the access to it i.e. use at or use the result of the find

if(m_Events.find(eid) == m_Events.end())
return;

const rdcarray<int32_t> &primIds = m_Events[eid];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pure comment and no need to change anything.

Nice optimisation to use a reference and not copy the array (like Vulkan does).
This could be optimized slightly further by using the result from the find

@Zorro666 Zorro666 merged commit 6da0901 into baldurk:v1.x Dec 5, 2023
16 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.

2 participants