From 37c4c881382643e2a84a654fc0c572ff8381ee55 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Sat, 23 Aug 2025 15:09:25 -0400 Subject: [PATCH] Fix RT validation error (#8132) --- wgpu-hal/src/vulkan/command.rs | 2 +- wgpu-hal/src/vulkan/device.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wgpu-hal/src/vulkan/command.rs b/wgpu-hal/src/vulkan/command.rs index ec9e44f2e..93c6b652a 100644 --- a/wgpu-hal/src/vulkan/command.rs +++ b/wgpu-hal/src/vulkan/command.rs @@ -630,7 +630,7 @@ impl crate::CommandEncoder for super::CommandEncoder { .first_vertex(triangles.first_vertex); } else { range = range - .primitive_count(triangles.vertex_count) + .primitive_count(triangles.vertex_count / 3) .first_vertex(triangles.first_vertex); } diff --git a/wgpu-hal/src/vulkan/device.rs b/wgpu-hal/src/vulkan/device.rs index 42771f5c5..580c1cb19 100644 --- a/wgpu-hal/src/vulkan/device.rs +++ b/wgpu-hal/src/vulkan/device.rs @@ -2557,7 +2557,7 @@ impl crate::Device for super::Device { triangle_data.index_type(conv::map_index_format(indices.format)); indices.count / 3 } else { - triangles.vertex_count + triangles.vertex_count / 3 }; let geometry = vk::AccelerationStructureGeometryKHR::default()