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

Apply manual cleanups/refactorings and fixes #47

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

smoogipoo
Copy link

I went through every file in the Veldrid project and looked at where the IDE was hinting me to look. Applied the easier fixes, but left the harder stuff (e.g. VK suffers from synchronisation issues all over the place) for a later point in time.

I'll document each important change as a review.

if (bind) DeviceContext.PSSetShaderResource(slot, srv);
if (bind) DeviceContext.PSSetShaderResource(slot, srv!);
Copy link
Author

Choose a reason for hiding this comment

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

This looks to be an incorrect NRT in Vortice.Windows. null is actually valid here, and the other cases below.

Comment on lines -1240 to +1221
Box? subregion = new Box((int)bufferOffsetInBytes, 0, 0, (int)(sizeInBytes + bufferOffsetInBytes), 1, 1);
if (isUniformBuffer) subregion = null;
Box subregion = new Box((int)bufferOffsetInBytes, 0, 0, (int)(sizeInBytes + bufferOffsetInBytes), 1, 1);

if (isUniformBuffer)
subregion = default;
Copy link
Author

Choose a reason for hiding this comment

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

null implies default internal to Vortice.

Comment on lines +118 to +119
Compiler.Compile(description.ShaderBytes, null!, null!,
description.EntryPoint, null!,
Copy link
Author

Choose a reason for hiding this comment

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

null is valid for D3DCompiler. It's not properly annotated.

Comment on lines -259 to +267
buffer0.mutability = MTLMutability.Mutable;
buffer1.mutability = MTLMutability.Mutable;
Copy link
Author

Choose a reason for hiding this comment

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

This was an actual issue. See surrounding code.

@smoogipoo smoogipoo merged commit 08c5021 into ppy:master Apr 30, 2024
2 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.

1 participant