diff options
| author | Eskil Abrahamsen Blomfeldt <[email protected]> | 2024-05-22 09:27:07 +0200 |
|---|---|---|
| committer | Eskil Abrahamsen Blomfeldt <[email protected]> | 2024-05-23 13:28:15 +0200 |
| commit | 464587f4bd4b909a1231c27db63e3cf22dd501f5 (patch) | |
| tree | 59e7f47e47625ffe0b0e6ae493b34f6266ed98c1 | |
| parent | 03c1374e955ed5c1c50c2a9b4d16c9c3d32e9bde (diff) | |
curve renderer: Fix uniform offset with multiview
When QSHADER_VIEW_COUNT is > 1, then we need to offset the next
uniform by the actual view count, even if the projection matrix
count is smaller and we therefore do no initialize all matrices.
This is a theoretical issue, but makes sense for consistency with
how the generic renderer handles this error.
Change-Id: Iccda597dac50a6c249df771814958e5f3754a870
Reviewed-by: Laszlo Agocs <[email protected]>
| -rw-r--r-- | src/quick/scenegraph/qsgcurvefillnode_p.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgcurvefillnode_p.cpp b/src/quick/scenegraph/qsgcurvefillnode_p.cpp index d8d2a9bdcc..5b8fa7484a 100644 --- a/src/quick/scenegraph/qsgcurvefillnode_p.cpp +++ b/src/quick/scenegraph/qsgcurvefillnode_p.cpp @@ -76,11 +76,11 @@ namespace { } matrixScale = qSqrt(qAbs(state.determinant())); - memcpy(buf->data() + offset + matrixCount * 64, &matrixScale, 4); + memcpy(buf->data() + offset + newEffect->viewCount() * 64, &matrixScale, 4); changed = true; } - offset += matrixCount * 64 + 4; + offset += newEffect->viewCount() * 64 + 4; if (state.isOpacityDirty()) { const float opacity = state.opacity(); |
