mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Feat] (DirectVulkan, MG_Impl): GPU transform feedback primitive queries
The TF primitive queries now ride VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT pools when the device reports transformFeedbackQueries: each captured draw is wrapped in a slot (shared between both GL targets when active together), and results sum the (written, needed) pairs - GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN from the first, GL_PRIMITIVES_GENERATED from the second. This is exact through geometry shaders, so KHR-GL33.transform_feedback.query_geometry_* pass; the CPU accounting delta remains the fallback for backends without the feature.
This commit is contained in:
@@ -225,6 +225,10 @@ namespace MobileGL {
|
||||
// GetQueryResult64 / DeleteBackendQuery like timer queries.
|
||||
BackendQueryHandle (*BeginOcclusionQuery)();
|
||||
void (*EndOcclusionQuery)(BackendQueryHandle query);
|
||||
// Transform feedback primitive queries backed by real GPU query pools
|
||||
// (optional; null = frontend falls back to CPU accounting).
|
||||
BackendQueryHandle (*BeginXfbPrimitivesQuery)(Bool generated);
|
||||
void (*EndXfbPrimitivesQuery)(BackendQueryHandle query);
|
||||
Int64 (*GetGpuTimestampNs)(); // glGetInteger64v(GL_TIMESTAMP); 0 if unsupported
|
||||
};
|
||||
struct GlobalBackendFunctionsTable {
|
||||
|
||||
Reference in New Issue
Block a user