From a3d6a53322d40fe5bae444bae5bdab062a3c95f6 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 2 May 2023 11:53:52 +0200 Subject: [PATCH] rhi: gl: Skip useless glEnable for point sprites in core profiles Might fail with invalid enum in core profile contexts. The behavior is the same regardless. Fixes: QTBUG-113289 Change-Id: I5e5764494be3c5f37537f5f9b3b5311d9c49def4 Reviewed-by: Giuseppe D'Angelo (cherry picked from commit c5e0c2e3f869b53fa4e53e1c4deb401d79db08de) Reviewed-by: Qt Cherry-pick Bot --- src/gui/rhi/qrhigles2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index 8856095b3f9..dfdb070bd27 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -949,7 +949,8 @@ bool QRhiGles2::create(QRhi::Flags flags) if (!caps.gles) { f->glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); - f->glEnable(GL_POINT_SPRITE); + if (!caps.coreProfile) + f->glEnable(GL_POINT_SPRITE); } // else (with gles) these are always on // Match D3D and others when it comes to seamless cubemap filtering.