X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fvoglcommon%2Fvogl_gl_state_snapshot.h;h=664feb1284ae861f63903954fd085ee3244fb45c;hb=d73de670dade59a783990e5ac264bb3cfd9d45d9;hp=ad054dbdfd4d8001c188a5e0ac63d8f5dfaca7ad;hpb=763d64fee9bead9740b3cdcf4442d7c386aa3751;p=vogl diff --git a/src/voglcommon/vogl_gl_state_snapshot.h b/src/voglcommon/vogl_gl_state_snapshot.h index ad054db..664feb1 100644 --- a/src/voglcommon/vogl_gl_state_snapshot.h +++ b/src/voglcommon/vogl_gl_state_snapshot.h @@ -79,6 +79,33 @@ inline uint64_t vogl_sync_to_handle(GLsync sync) return handle; } +//---------------------------------------------------------------------------------------------------------------------- +// struct vogl_mapped_buffer_desc +//---------------------------------------------------------------------------------------------------------------------- +struct vogl_mapped_buffer_desc +{ + // Handles and ptrs here are in the replay/GL domain + GLuint m_buffer; + GLenum m_target; + vogl_trace_ptr_value m_offset; + vogl_trace_ptr_value m_length; + GLbitfield m_access; + bool m_range; + void *m_pPtr; + + vogl_mapped_buffer_desc() + { + clear(); + } + + void clear() + { + memset(this, 0, sizeof(*this)); + } +}; + +typedef vogl::vector vogl_mapped_buffer_desc_vec; + //---------------------------------------------------------------------------------------------------------------------- // class vogl_capture_context_params // TODO: Rename this to vogl_context_state_shadow? @@ -133,6 +160,7 @@ public: // During replay: replay domain vogl_linked_program_state m_linked_programs; + vogl_mapped_buffer_desc_vec m_mapped_buffers; // During replay: These objects map from trace (non-inv) to replay (inv). // TODO: Transition ALL the above hash sets/maps to instances of vogl_handle_tracker.