From ba2ee2875aadc5e5c84e4dd6dec3dbb106a275ce Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Tue, 22 Oct 2019 11:32:58 +0200 Subject: Fix computegles31 example crashing on Pi4 Due to work group size configured for desktop GL. Change-Id: Id62cf297e280e04aecba748cf41b62c64ed9a0b2 Done-with: Andrey Yaromenok Fixes: QTBUG-79374 Reviewed-by: Laszlo Agocs --- examples/opengl/computegles31/glwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/opengl/computegles31/glwindow.cpp b/examples/opengl/computegles31/glwindow.cpp index 7a14cba66d..29ec9fcff7 100644 --- a/examples/opengl/computegles31/glwindow.cpp +++ b/examples/opengl/computegles31/glwindow.cpp @@ -180,7 +180,7 @@ static const char *fsDisplaySource = "}\n"; static const char *csComputeSourceV = - "#define COMPUTEPATCHSIZE 32 \n" + "#define COMPUTEPATCHSIZE 10 // Setting this to 10 to comply with MAX_COMPUTE_WORK_GROUP_INVOCATIONS for both OpenGL and OpenGLES - see QTBUG-79374 \n" "#define IMGFMT rgba8 \n" "layout (local_size_x = COMPUTEPATCHSIZE, local_size_y = COMPUTEPATCHSIZE) in;\n" "layout(binding=0, IMGFMT) uniform readonly highp image2D inputImage; // Use a sampler to improve performance \n" @@ -221,7 +221,7 @@ static const char *csComputeSourceV = "}\n"; static const char *csComputeSourceH = - "#define COMPUTEPATCHSIZE 32 \n" + "#define COMPUTEPATCHSIZE 10 \n" "#define IMGFMT rgba8 \n" "layout (local_size_x = COMPUTEPATCHSIZE, local_size_y = COMPUTEPATCHSIZE) in;\n" "layout(binding=0, IMGFMT) uniform readonly highp image2D inputImage; // Use a sampler to improve performance \n" @@ -408,7 +408,7 @@ void GLWindow::paintGL() // Process input image - QSize workGroups = getWorkGroups( 32, QSize(m_texImageInput->width(), m_texImageInput->height())); + QSize workGroups = getWorkGroups(10, QSize(m_texImageInput->width(), m_texImageInput->height())); // Pass 1 f->glBindImageTexture(0, m_texImageInput->textureId(), 0, 0, 0, GL_READ_WRITE, GL_RGBA8); f->glBindImageTexture(1, m_texImageTmp->textureId(), 0, 0, 0, GL_READ_WRITE, GL_RGBA8); -- cgit v1.2.3