From fed3b7cce418f43ca3b4a8781fe7bb1eac622d09 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 11 Mar 2025 00:34:38 +0100 Subject: [PATCH] [dxvk] Add method to access a specific CS chunk data element --- src/dxvk/dxvk_cs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/dxvk/dxvk_cs.h b/src/dxvk/dxvk_cs.h index df684db81..2fff2f77b 100644 --- a/src/dxvk/dxvk_cs.h +++ b/src/dxvk/dxvk_cs.h @@ -114,6 +114,16 @@ namespace dxvk { return reinterpret_cast(this) + m_dataOffset; } + /** + * \brief Retrieves pointer to given structure + * + * \param [in] idx Structure index + * \returns Untyped pointer to given structure + */ + void* at(uint32_t idx) { + return reinterpret_cast(this) + m_dataOffset + idx * uint32_t(m_structSize); + } + private: uint32_t m_dataOffset = 0u;