From 8fe16fef283d281454d575829c2411ec923a5c8b Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 17 Sep 2020 15:38:40 +0200 Subject: rhi: Expose compute threadgroup limits in ResourceLimits As OpenGL ES and Vulkan ruin the day with the spec mandated minimum value for max threads per threadgroup being only 128, clients need a way to decide if their compute shader (local_size_*) is suitable for use at run time. Change-Id: I72b4fc97032406340623add82ea4d9544ebe9fdc Reviewed-by: Andy Nichols --- src/gui/rhi/qrhigles2_p_p.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gui/rhi/qrhigles2_p_p.h') diff --git a/src/gui/rhi/qrhigles2_p_p.h b/src/gui/rhi/qrhigles2_p_p.h index 9392254a78..1410e6ac38 100644 --- a/src/gui/rhi/qrhigles2_p_p.h +++ b/src/gui/rhi/qrhigles2_p_p.h @@ -848,6 +848,12 @@ public: ctxMinor(0), maxTextureSize(2048), maxDrawBuffers(4), + maxSamples(16), + maxThreadGroupsPerDimension(0), + maxThreadsPerThreadGroup(0), + maxThreadGroupsX(0), + maxThreadGroupsY(0), + maxThreadGroupsZ(0), msaaRenderBuffer(false), multisampledTexture(false), npotTextureFull(true), @@ -882,6 +888,11 @@ public: int maxTextureSize; int maxDrawBuffers; int maxSamples; + int maxThreadGroupsPerDimension; + int maxThreadsPerThreadGroup; + int maxThreadGroupsX; + int maxThreadGroupsY; + int maxThreadGroupsZ; // Multisample fb and blit are supported (GLES 3.0 or OpenGL 3.x). Not // the same as multisample textures! uint msaaRenderBuffer : 1; -- cgit v1.2.3