[Feat] (Diligent, MG_Impl): add indirect draw CPU fallbacks

- Wire DrawArraysIndirect/DrawElementsIndirect
- Wire MultiDraw*Indirect and *IndirectCount using client memory or GL_DRAW_INDIRECT_BUFFER/GL_PARAMETER_BUFFER CPU reads
- Update handoff; 13 Diligent tests pass
This commit is contained in:
BZLZHH
2026-08-23 09:45:34 +08:00
parent 9f79a88af5
commit e3f44e8da1
2 changed files with 183 additions and 2 deletions
+3 -2
View File
@@ -149,6 +149,7 @@ Verified locally on Turnip Adreno 750:
- `DrawRangeElements` / `DrawRangeElementsBaseVertex`
- `MultiDrawArrays` / `MultiDrawElements` / `MultiDrawElementsBaseVertex`
- `DrawArraysInstanced` / `DrawElementsInstanced` family
- Indirect draw CPU fallback: `DrawArraysIndirect`, `DrawElementsIndirect`, `MultiDraw*Indirect`, `*IndirectCount`
- `ClearBufferfv` / `ClearBufferiv` / `ClearBufferuiv`
- `BlitFramebuffer` (same-size color copy between current read/draw FBOs)
- `CopyTexImage2D` / `CopyTexSubImage2D` (whole-color copy fallback)
@@ -212,7 +213,7 @@ Notes:
- Global UBO (default-block `glUniform*`) and named application UBO blocks (through `glBindBufferBase`/`glUniformBlockBinding`) now upload and bind; SSBOs are still not fed from frontend buffer bindings.
- No swapchain / EGL window surface presentation yet; `Present()` only flushes.
- No transform feedback / queries / sync / readback of non-color resources.
- Draw range, multi-draw, instanced-draw wrappers, clear-buffer, blit, read-pixels, CopyTexImage* and GetTexImage/GetTextureImage are now wired; indirect draws and buffer subdata paths still remain.
- Draw range, multi-draw, instanced-draw wrappers, clear-buffer, blit, read-pixels, CopyTexImage*, GetTexImage/GetTextureImage and indirect draws are now wired; buffer subdata paths still remain.
- A last-PSO cache now avoids recreating the pipeline when program/render-state/topology/VAO layout is unchanged; texture/UBO resources are still rebound dynamically per draw.
- The `GLFunctionsTable` is only partially populated.
@@ -246,7 +247,7 @@ Notes:
- [x] `ReadPixels` from non-default framebuffer
- [x] `CopyTexImage*` wired as whole-color copy
- [x] `GetTexImage` / `GetTextureImage` (RGBA8)
- [ ] Indirect draws
- [x] Indirect draws (CPU fallback)
6. **Expand local test suite**
- [x] Scissor test