unify(ww3d2): Merge dx8fvf, dx8indexbuffer, dx8vertexbuffer#2690
unify(ww3d2): Merge dx8fvf, dx8indexbuffer, dx8vertexbuffer#2690xezon merged 9 commits intoTheSuperHackers:mainfrom
Conversation
|
| Filename | Overview |
|---|---|
| Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8fvf.cpp | Westwood archive header block added; $Archive path incorrectly reads dx8fvf.h instead of dx8fvf.cpp (copy-paste from the header file). |
| Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8indexbuffer.cpp | Added TnL software-processing guard, two-attempt index buffer creation with texture/mesh-cache release on first failure, and WWMEMLOG instrumentation in three allocation sites. |
| Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8vertexbuffer.cpp | Retry logic updated to release old textures before flushing mesh cache; WWMEMLOG added to constructors and dynamic-buffer allocators; minor debug-log string fixes. |
| Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8vertexbuffer.h | Header-block metadata updated to reflect the Kenny Mitchell revision; no functional changes. |
| GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8indexbuffer.cpp | One-line comment fix: 'Vertex buffer creation failed' corrected to 'Index buffer creation failed' in the retry block. |
| GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8vertexbuffer.cpp | Duplicate TnL software-processing guard removed; dynamic vertex-buffer debug logging re-enabled by removing surrounding block comments. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Create Index/Vertex Buffer] --> B{Support_TnL?}
B -- No --> C[Add D3DUSAGE_SOFTWAREPROCESSING]
B -- Yes --> D[Use current usage_flags]
C --> D
D --> E[First CreateBuffer attempt\nraw device call]
E --> F{SUCCEEDED?}
F -- Yes --> G[Return success]
F -- No --> H[WWDEBUG_SAY: creation failed]
H --> I[Invalidate_Old_Unused_Textures\n5000ms threshold]
I --> J[_Invalidate_Mesh_Cache]
J --> K[Second CreateBuffer attempt]
K --> L{SUCCEEDED?}
L -- Yes --> M[WWDEBUG_SAY: creation successful / Return]
L -- No --> N[DX8_ErrorCode - fatal]
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8fvf.cpp:25
The `$Archive` path in the newly added Westwood header block references `dx8fvf.h` instead of `dx8fvf.cpp`. This looks like a copy-paste from the header file's comment block. All other header blocks in this codebase correctly identify the source file.
```suggestion
* $Archive:: /Commando/Code/ww3d2/dx8fvf.cpp $*
```
Reviews (3): Last reviewed commit: "Revert createindexbuffer handling to how..." | Re-trigger Greptile
This merges the remaining files starting with dx8.