From 759bdeb936ea95e4ac13d1ba8d4ce2e91c5c17d2 Mon Sep 17 00:00:00 2001 From: "Sergio R. Z. Masson" <97050577+SergioRZMasson@users.noreply.github.com> Date: Wed, 15 Jul 2026 11:11:59 -0300 Subject: [PATCH] D3D11: align binding limit types (#3833) * D3D11: widen binding stage indices Keep binding iteration and texture commits aligned with the renderer limit types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bd442137-1560-4dd6-ae9d-0fac55012d46 * D3D11: narrow binding limits Keep the runtime binding limits aligned with the stage index type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bd442137-1560-4dd6-ae9d-0fac55012d46 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/renderer_d3d11.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 9923208f0..10be8e10b 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -5874,8 +5874,8 @@ namespace bgfx { namespace d3d11 Rect viewScissorRect; viewScissorRect.clear(); - const uint32_t maxComputeBindings = g_caps.limits.maxComputeBindings; - const uint32_t maxTextureSamplers = g_caps.limits.maxTextureSamplers; + const uint8_t maxComputeBindings = bx::narrowCast(g_caps.limits.maxComputeBindings); + const uint8_t maxTextureSamplers = bx::narrowCast(g_caps.limits.maxTextureSamplers); uint32_t statsNumPrimsSubmitted[BX_COUNTOF(s_primInfo)] = {}; uint32_t statsNumPrimsRendered[BX_COUNTOF(s_primInfo)] = {};