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

Rendering-related fixes, clean-up and DEBUG_LINES support #412

Merged
merged 15 commits into from
May 15, 2024

Conversation

VisualEhrmanntraut
Copy link
Contributor

@VisualEhrmanntraut VisualEhrmanntraut commented May 3, 2024

This fixes mods the likes of Ad Astra amongst other problems.

image

image

@thr3343
Copy link
Contributor

thr3343 commented May 4, 2024

TBH I was also going to open a PR on this issue
But this adds more draw modes, while my version only added Lines, so this is the better PR imho

Will link my branch anyway, just in case it is useful as a reference: https://github.com/thr3343/VulkanMod/tree/DrawMode

@VisualEhrmanntraut VisualEhrmanntraut marked this pull request as draft May 4, 2024 14:09
thr3343

This comment was marked as resolved.

@VisualEhrmanntraut
Copy link
Contributor Author

2024-05-04_20 58 10
MiniHUD works fine now

@VisualEhrmanntraut VisualEhrmanntraut marked this pull request as ready for review May 4, 2024 18:08
src/main/java/net/vulkanmod/vulkan/VRenderSystem.java Outdated Show resolved Hide resolved
@@ -161,7 +156,7 @@ private long createGraphicsPipeline(PipelineState state) {

VkPipelineDynamicStateCreateInfo dynamicStates = VkPipelineDynamicStateCreateInfo.calloc(stack);
dynamicStates.sType(VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO);
dynamicStates.pDynamicStates(stack.ints(VK_DYNAMIC_STATE_DEPTH_BIAS, VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR));
dynamicStates.pDynamicStates(stack.ints(VK_DYNAMIC_STATE_DEPTH_BIAS, VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR, VK_DYNAMIC_STATE_LINE_WIDTH));
Copy link
Owner

Choose a reason for hiding this comment

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

I suppose VK_DYNAMIC_STATE_LINE_WIDTH should only be added when using VK_PRIMITIVE_TOPOLOGY_LINE_*

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the docs, the only restriction with the wide line feature not being supported is that the line width cannot be anything other than 1.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(So I did it for simplicity)

@xCollateral
Copy link
Owner

I wanted to thank you for your work, I'm interested in merging this PR as it resolves a compatibility issue I haven't got around to fix yet.

@VisualEhrmanntraut VisualEhrmanntraut changed the title Drawing mode fixes and DEBUG_LINES support Rendering-related fixes, clean-up and DEBUG_LINES support May 13, 2024
@VisualEhrmanntraut
Copy link
Contributor Author

LINES mode is still a bit fishy so don't merge it yet until we figure it out :-)

@thr3343
Copy link
Contributor

thr3343 commented May 13, 2024

LINES mode is still a bit fishy so don't merge it yet until we figure it out :-)

That's OK, just closed my review as it was outdated

For LINES you can try quadsIndexBuffer instead of linesIndexBuffer, but oytl tested two mods with that thus far, so haven't tested that very thoroughly

@VisualEhrmanntraut
Copy link
Contributor Author

@thr3343 using that only helps with the F3 cursor for me, MiniHUD still has some quirks

VisualEhrmanntraut and others added 4 commits May 14, 2024 10:53
# Conflicts:
#	src/main/java/net/vulkanmod/vulkan/Drawer.java
#	src/main/java/net/vulkanmod/vulkan/memory/AutoIndexBuffer.java
@xCollateral xCollateral merged commit 2d81376 into xCollateral:1.20.x May 15, 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.

None yet

3 participants