Skip to content

[BUG] Vulkan issues #249

@alexytomi

Description

@alexytomi

Bug 1: Pre-rotation not applied

Rendering is sideways when using Vulkan to render. Turning off Alternate Surface Rendering works around this.
This is yet another bug from the vulkan driver. They should turn on pretransform upon vkGetPhysicalDeviceSurfaceCapabilitiesKHR but they don't.

Image

Planned fix

  • Override VK_ERROR_OUT_OF_DATE_KHR with VK_SUBOPTIMAL_KHR to trigger swapchain reconfiguration within mojang code
  • Override vkCreateSwapchainKHR with a new surface pointer we create and manage (we ignore surface pointers mojang gives us)
  • Trigger this mechanism and apply prerotation on device rotation. Android itself will also trigger this mechanism itself
  • We cannot create a surface without a valid ANativeWindow, this means we will have to stall the render thread during vkCreateSwapchainKHR until a valid ANativeWindow appears. This will happen when using SurfaceView/ASR and tabbing out or triggering floating mode for the first time since surface creation in TextureView

Bug 2: Invalid Extensions

VK_EXT_vertex_attribute_divisor

This extension has been superseded by VK_KHR_vertex_attribute_divisor in Vulkan 1.4 but Mojang only supports VK_EXT_vertex_attribute_divisor. We will need to emulate this since the functions have been renamed and supportsNonZeroFirstInstance was added.

feature: fillModeNonSolid

This is only used in a wireframe debug renderer. Just say we have it. Invert it instead. Minecraft has removed the requirement on later snapshots. We want to support everything so only fake it when necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions