#3511·bgfx

setUniform and BGFX_CONFIG_DEBUG_UNIFORM after recent update.

Author: unravel-devCreated Dec 6, 2025Updated Dec 13, 2025
Labelsbug

Hello after a recent update you introduced uniform frequency, per frame, per view, per draw. and in the per draw. There was a commented out line

m_uniformSet.insert(_handle.idx);

which allowed reuse of uniforms between draw calls. as long as they were not discarded.

For example

Mesh with 2 submeshes having all the same uniforms but one. Before we were able to do the following:

set common uniforms for both draw calls.

set specific unfirom for draw call 1 draw and preserve state

override the specific unfiorm for draw call 2 draw and discard state

Now unless i disable the BGFX_CONFIG_DEBUG_UNIFORM i am forced to set all uniforms for both draw calls each time. Is this the intended design decision or am i missing something? If this is the design and its fine to disable the BGFX_CONFIG_DEBUG_UNIFORM close this issue.