summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhigles2_p_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-10-09 21:31:33 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-10-11 10:58:47 +0200
commitb540c783557808f778f8afd332b33aa81f7e5ec6 (patch)
treeeee26950a67782c3bc740db8d5f43adc61bfb978 /src/gui/rhi/qrhigles2_p_p.h
parentf26e329c473fb0e9357bdbc4329a36d1204c40c5 (diff)
rhi: gl: d3d: Reduce the size of the Command struct
Copied by value so the size matters. Change-Id: I17eae99212801a4fb390a0e298b361123644d17d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhigles2_p_p.h')
-rw-r--r--src/gui/rhi/qrhigles2_p_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/rhi/qrhigles2_p_p.h b/src/gui/rhi/qrhigles2_p_p.h
index 2023585b6b..d037bbc4f6 100644
--- a/src/gui/rhi/qrhigles2_p_p.h
+++ b/src/gui/rhi/qrhigles2_p_p.h
@@ -345,7 +345,8 @@ struct QGles2CommandBuffer : public QRhiCommandBuffer
};
Cmd cmd;
- static const int MAX_UBUF_BINDINGS = 32; // should be more than enough
+ // keep at a reasonably low value otherwise sizeof Command explodes
+ static const int MAX_DYNAMIC_OFFSET_COUNT = 8;
// QRhi*/QGles2* references should be kept at minimum (so no
// QRhiTexture/Buffer/etc. pointers).
@@ -398,7 +399,7 @@ struct QGles2CommandBuffer : public QRhiCommandBuffer
QRhiComputePipeline *maybeComputePs;
QRhiShaderResourceBindings *srb;
int dynamicOffsetCount;
- uint dynamicOffsetPairs[MAX_UBUF_BINDINGS * 2]; // binding, offset
+ uint dynamicOffsetPairs[MAX_DYNAMIC_OFFSET_COUNT * 2]; // binding, offset
} bindShaderResources;
struct {
GLbitfield mask;