Browse Source

Revert "Fix: Fix Uniform buffer doing too many iterations when updating rende…" (#3391)

This reverts commit 4bc652939ff400e424e17185d23b229a37d269e1.
Бранимир Караџић 11 months ago
parent
commit
7b3e1ebf62
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/bgfx.cpp

+ 4 - 2
src/bgfx.cpp

@@ -1325,8 +1325,10 @@ namespace bgfx
 
 
 		m_draw.clear(_flags);
 		m_draw.clear(_flags);
 		m_bind.clear(_flags);
 		m_bind.clear(_flags);
-
-		m_uniformBegin = m_uniformEnd;
+		if (_flags & BGFX_DISCARD_STATE)
+		{
+			m_uniformBegin = m_uniformEnd;
+		}
 	}
 	}
 
 
 	void EncoderImpl::dispatch(ViewId _id, ProgramHandle _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ, uint8_t _flags)
 	void EncoderImpl::dispatch(ViewId _id, ProgramHandle _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ, uint8_t _flags)