Merge pull request #22064 from hrydgard/fix-gpu-render-audit-bugs

Common audit: Fix GPU-related bugs
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2026-08-10 00:04:33 +02:00
commit 8e40e811c2
2 files changed
+7 -6

No files matched your search

+5
View File
@@ -89,6 +89,11 @@ public:
void V(float x, float y, float z, uint32_t color, float u, float v) {
_dbg_assert_msg_(count_ < MAX_VERTS, "Overflowed the DrawBuffer");
if (count_ >= MAX_VERTS) {
// _dbg_assert_msg_ above is compiled out in release builds - don't write
// past the end of verts_ there either, just drop the vertex.
return;
}
#ifdef _DEBUG
if (my_isnanorinf(x) || my_isnanorinf(y) || my_isnanorinf(z)) {
+2 -6
View File
@@ -40,13 +40,9 @@ public:
return;
}
if (!tempImage_->LoadTextureLevelsFromFileData(buffer, fileSize, type_)) {
*state_ = ManagedTexture::LoadState::FAILED;
waitable_->Notify();
return;
}
bool success = tempImage_->LoadTextureLevelsFromFileData(buffer, fileSize, type_);
delete[] buffer;
*state_ = ManagedTexture::LoadState::SUCCESS;
*state_ = success ? ManagedTexture::LoadState::SUCCESS : ManagedTexture::LoadState::FAILED;
waitable_->Notify();
}