[idd] lgmp: pointer motion data doesn't require 1MB buffers
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled

This commit is contained in:
Geoffrey McRae
2026-08-13 15:54:54 +10:00
parent 5b9d4923a7
commit 34835dd1af
2 changed files with 14 additions and 11 deletions

View File

@@ -13,16 +13,17 @@ is strongly recommended, but the IDD can start in software mode without one.
Determining memory Determining memory
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
Calculate the base IVSHMEM requirement as: Calculate the IVSHMEM requirement as:
.. math:: .. math::
\text{BASE SIZE} = \text{REQUIRED BYTES} =
\left(\left\lceil\frac{\text{WIDTH} \times 4}{256}\right\rceil \left(\left\lceil\frac{\text{WIDTH} \times 4}{256}\right\rceil
\times 256\right) \times \text{HEIGHT} \times 3 \times 256\right) \times \text{HEIGHT} \times 3
+ (4 \times 1024 \times 1024)
Additional shared memory is required for protocol metadata and alignment. The Convert the result to MiB and round it up to the next power of two. The common
values below include that requirement and are rounded up to a power of two. values below have already been rounded.
If a configured mode does not fit, the IDD omits it from the Windows mode list. If a configured mode does not fit, the IDD omits it from the Windows mode list.
If a client-requested dynamic resolution does not fit, the helper refuses it If a client-requested dynamic resolution does not fit, the helper refuses it
@@ -40,15 +41,15 @@ not publish a truncated frame.
* - Maximum resolution * - Maximum resolution
- Total IVSHMEM size (MiB) - Total IVSHMEM size (MiB)
* - 1920x1080 (1080p) * - 1920x1080 (1080p)
- 64 - 32
* - 1920x1200 * - 1920x1200
- 64 - 32
* - 2560x1440 (1440p) * - 2560x1440 (1440p)
- 128 - 64
* - 3440x1440 * - 3440x1440
- 128 - 64
* - 3840x2160 (4K) * - 3840x2160 (4K)
- 256 - 128
* - 5120x1440 * - 5120x1440
- 128 - 128
* - 5120x2880 (5K) * - 5120x2880 (5K)

View File

@@ -28,6 +28,8 @@
static const uint32_t MAX_POINTER_SIZE = static const uint32_t MAX_POINTER_SIZE =
(uint32_t)(sizeof(KVMFRCursor) + (512 * 512 * 4)); (uint32_t)(sizeof(KVMFRCursor) + (512 * 512 * 4));
static const uint32_t POINTER_POSITION_SIZE =
(uint32_t)sizeof(KVMFRCursor);
static const struct LGMPQueueConfig POINTER_QUEUE_CONFIG = static const struct LGMPQueueConfig POINTER_QUEUE_CONFIG =
{ {
@@ -58,13 +60,13 @@ bool CLGMPControl::Initialize()
for (int i = 0; i < LGMP_Q_POINTER_LEN; ++i) for (int i = 0; i < LGMP_Q_POINTER_LEN; ++i)
{ {
if ((status = m_host.Allocate( if ((status = m_host.Allocate(
MAX_POINTER_SIZE, &m_pointerMemory[i])) != LGMP_OK) POINTER_POSITION_SIZE, &m_pointerMemory[i])) != LGMP_OK)
{ {
DEBUG_ERROR("lgmpHostMemAlloc Failed (Pointer): %s", DEBUG_ERROR("lgmpHostMemAlloc Failed (Pointer): %s",
lgmpStatusString(status)); lgmpStatusString(status));
return false; return false;
} }
memset(lgmpHostMemPtr(m_pointerMemory[i]), 0, MAX_POINTER_SIZE); memset(lgmpHostMemPtr(m_pointerMemory[i]), 0, POINTER_POSITION_SIZE);
} }
for (int i = 0; i < POINTER_SHAPE_BUFFERS; ++i) for (int i = 0; i < POINTER_SHAPE_BUFFERS; ++i)