Upload pools once per Gfx::Draw and FIX DX9

This commit is contained in:
2026-09-03 09:18:49 +02:00
parent f1540f0098
commit 2801b876e6
11 changed files with 103 additions and 69 deletions
+2
View File
@@ -63,6 +63,7 @@ class PD_API GfxDriver : public DriverInterface {
virtual void SysInit() {}
virtual void SysReset() {}
virtual void Submit(size_t count, size_t start) {}
virtual void UploadPools() {} // not every driver requires it
void RegisterTexture(const Li::Texture& tex);
void UnregisterTexture(const Li::Texture& tex);
@@ -110,6 +111,7 @@ class GfxDriverBase : public GfxDriver {
void Draw(const Pool<Li::Command>& commands) override {
pCountCommands += commands.size();
size_t index = 0;
UploadPools();
while (index < commands.size()) {
CurrentTex = commands[index].Tex;
if (!CurrentTex) {