{"record":{"id":"6282d6574376d0ef","repo":"gfx-rs/wgpu","slug":"this-vulkan-device-is-affected-by-8333-https","errorCode":null,"errorMessage":"This vulkan device is affected by [#8333](https://github.com/gfx-rs/wgpu/issues/8333)","messagePattern":"This vulkan device is affected by \\[#8333\\]\\(https://github\\.com/gfx-rs/wgpu/issues/8333\\)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-hal/src/vulkan/command.rs","lineNumber":1117,"sourceCode":"            )\n        };\n    }\n    unsafe fn set_blend_constants(&mut self, color: &[f32; 4]) {\n        unsafe { self.device.raw.cmd_set_blend_constants(self.active, color) };\n    }\n\n    unsafe fn draw(\n        &mut self,\n        first_vertex: u32,\n        vertex_count: u32,\n        first_instance: u32,\n        instance_count: u32,\n    ) {\n        if self.current_pipeline_is_multiview\n            && (first_instance as u64 + instance_count as u64 - 1)\n                > self.device.private_caps.multiview_instance_index_limit as u64\n        {\n            panic!(\"This vulkan device is affected by [#8333](https://github.com/gfx-rs/wgpu/issues/8333)\");\n        }\n        unsafe {\n            self.device.raw.cmd_draw(\n                self.active,\n                vertex_count,\n                instance_count,\n                first_vertex,\n                first_instance,\n            )\n        };\n    }\n    unsafe fn draw_indexed(\n        &mut self,\n        first_index: u32,\n        index_count: u32,\n        base_vertex: i32,\n        first_instance: u32,\n        instance_count: u32,","sourceCodeStart":1099,"sourceCodeEnd":1135,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-hal/src/vulkan/command.rs#L1099-L1135","documentation":"Certain Vulkan devices (issue gfx-rs/wgpu#8333) corrupt draws when a multiview pipeline is used and the instance range extends beyond a device-specific limit (`multiview_instance_index_limit`). Before `cmd_draw`, wgpu-hal checks `first_instance + instance_count - 1` against that limit and panics rather than emit a broken GPU command. It is a deliberate guard against a hardware/driver defect, not a validation error in the normal sense.","triggerScenarios":"Recording a draw (`draw(vertex_count, instance_count, first_instance)`) on a Vulkan encoder whose active render pipeline is multiview, on an affected device, when `first_instance + instance_count - 1` exceeds `private_caps.multiview_instance_index_limit` (e.g. instanced rendering with large instance counts into a multiview pass).","commonSituations":"VR/XR rendering using multiview (VRAM TODO: e.g. Quest/Adreno devices) with heavy instancing; batching many instances into a single multiview pass; apps that changed instance counts after switching to multiview pipelines.","solutions":["Reduce instance counts and/or first_instance so the last instance index stays within the device limit","Split the draw into multiple draws each fitting the limit (chunk instance ranges)","Avoid multiview pipelines for those draws (render without multiview) if the device is affected","Query the limit and clamp batching logic accordingly in your renderer"],"exampleFix":"// before\nencoder.draw(0, verts, 0, 100_000); // exceeds multiview_instance_index_limit\n// after\nlet limit = multiview_instance_index_limit;\nfor chunk in (0..100_000).step_by(limit) {\n    encoder.draw(0, verts, 0, ((100_000 - chunk).min(limit)) as u32);\n}","handlingStrategy":"validation","validationCode":"if pipeline.is_multiview && (first_instance as u64 + instance_count as u64 - 1) > multiview_instance_index_limit as u64 {\n    return Err(\"instance range exceeds multiview limit; chunk the draw\");\n}","typeGuard":null,"tryCatchPattern":"std::panic::catch_unwind(|| encoder.draw(verts, instances))","preventionTips":["Chunk instanced draws under multiview on affected Vulkan devices","Track the device's multiview_instance_index_limit","Disable multiview on devices known to hit issue #8333"],"tags":["panic","vulkan","multiview","driver-bug","draw"],"backgroundTag":"driver-workaround-limit-exceeded","analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}