mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 07:46:01 +00:00
feat(vkbridge): vertex attribute divisor emulation; host regression suite; dispatch/version fixes
- divisor != 1 bindings get stride 0 and are rebound per draw; d > 1 splits draws, with a BaseInstance-as-0 vertex shader variant so DXVK's SV_InstanceID stays exact - device-level dispatch never falls back to a loader trampoline (crashed in vkCmdSetLineStipple) - core commands newer than the device's version are not handed out; the app's instance version is passed through as asked (Zink 26.2 aborted on a 1.4 entry point) - run_tests.sh: smoke, bcn_check, DXVK d3d11_check, vkcube x3, gamescope+Zink, in plain and Mali-imitation modes - 14/14 pass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
This commit is contained in:
1 parent
92c94c5c15
commit
02a06bec3f
18 files changed
+1289
-734
No files matched your search
@@ -50,6 +50,8 @@ PFN_vkVoidFunction vkb_lookup_proc(const char *name, int level_max, vkb_device *
|
||||
if (level_max == VKB_LEVEL_DEVICE) {
|
||||
if (p->level != VKB_LEVEL_DEVICE) return NULL;
|
||||
if (dev && p->ext && !vkb_device_ext_enabled(dev, p->ext)) return NULL;
|
||||
/* Core commands newer than the device's Vulkan version do not exist for it. */
|
||||
if (dev && p->core && p->core > dev->api_version) return NULL;
|
||||
}
|
||||
return p->fn;
|
||||
}
|
||||
@@ -288,13 +290,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkb_ep_vkCreateInstance(const VkInstanceCreateInf
|
||||
ci.ppEnabledExtensionNames = exts;
|
||||
ci.enabledLayerCount = 0;
|
||||
ci.ppEnabledLayerNames = NULL;
|
||||
VkApplicationInfo app;
|
||||
uint32_t api = server_instance_version();
|
||||
/* The app's version goes through as asked: the device's effective version is the lower of it
|
||||
* and the GPU's, which is what a driver does (and what apps compute for themselves). */
|
||||
if (ci.pApplicationInfo) {
|
||||
app = *ci.pApplicationInfo;
|
||||
if (app.apiVersion > api) app.apiVersion = api;
|
||||
ci.pApplicationInfo = &app;
|
||||
inst->api_version = app.apiVersion ? app.apiVersion : VK_API_VERSION_1_0;
|
||||
inst->api_version = ci.pApplicationInfo->apiVersion ? ci.pApplicationInfo->apiVersion : VK_API_VERSION_1_0;
|
||||
} else {
|
||||
inst->api_version = VK_API_VERSION_1_0;
|
||||
}
|
||||
@@ -472,6 +471,11 @@ VKAPI_ATTR VkResult VKAPI_CALL vkb_ep_vkCreateDevice(VkPhysicalDevice physicalDe
|
||||
free(dev);
|
||||
return r;
|
||||
}
|
||||
{
|
||||
extern uint32_t vkb_max_api(void);
|
||||
uint32_t v = pd->props.apiVersion < vkb_max_api() ? pd->props.apiVersion : vkb_max_api();
|
||||
dev->api_version = v < pd->instance->api_version ? v : pd->instance->api_version;
|
||||
}
|
||||
vkb_map_init(&dev->memories);
|
||||
vkb_map_init(&dev->templates);
|
||||
vkb_map_init(&dev->pools);
|
||||
|
||||
@@ -95,6 +95,7 @@ typedef struct vkb_device {
|
||||
const char **enabled_exts;
|
||||
uint32_t enabled_ext_count;
|
||||
uint8_t ext_swapchain;
|
||||
uint32_t api_version;
|
||||
} vkb_device;
|
||||
|
||||
typedef struct vkb_queue {
|
||||
|
||||
Reference in new issue
Block a user