Fix shadows, colour writes and present pacing on drivers that read Vulkan's undefined cases differently.

A depth-compare read through a sampler whose compare is off now gets the slot's comparing sampler, as the Switch
compares there and only NVIDIA's driver did so on its own. Colour components a fragment shader does not write are
masked out, as Maxwell leaves them alone. Without mailbox presentation the swapchain takes relaxed FIFO, or
immediate, so a late frame no longer halves the frame rate. NX2NAVI_VK_NOOPT=1 builds pipelines without the
driver's optimiser, for a driver whose compiler fails on one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-07 10:56:46 -05:00
parent edce57ce5d
commit 1d7bc90848
9 changed files with 79 additions and 15 deletions

View File

@@ -407,6 +407,9 @@ VkSampler vk_sampler_by_id_locked(int id);
// on the Switch although the game binds a linear sampler. VK_NULL_HANDLE
// for an empty slot.
VkSampler vk_sampler_point_by_id_locked(int id);
// The slot's sampler with its compare on, for a depth-compare read (vk_texture.c, at the definition); the slot's own
// sampler when it compares already. VK_NULL_HANDLE for an empty slot.
VkSampler vk_sampler_compare_by_id_locked(int id);
uint32_t vk_texture_slots_gen(void);
int vk_texture_slot_count_locked(void);
void vk_texture_create_budget_locked(int n); // slot lookups create at most n entries (mapped storage only); -1 any