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 <giuseppe.dangelo@kdab.com>
(cherry picked from commit c5e0c2e3f869b53fa4e53e1c4deb401d79db08de)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Laszlo Agocs 2023-05-02 11:53:52 +02:00 committed by Qt Cherry-pick Bot
parent f30d72365c
commit a3d6a53322

View File

@ -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.