OpenGL Invalid Enum #95592
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#95592
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: macOS-12.1-arm64-arm-64bit 64 Bits
Graphics card: Apple M1 Apple 4.1 Metal - 76.3
Blender Version
Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-02-06 19:53, hash:
1d59a7aa77
Worked: 2.93.6, 3.0.1, 3.2.0 Alpha
Short description of error
Something in the Blender startup is causing an
Invalid Enum
OpenGL to occur.Exact steps for others to reproduce the error
Run the following in the Python Console after starting Blender with default scene and factory loaded settings.
Added subscriber: @gfxcoder
Added subscriber: @dodo-2
Changed status from 'Needs Triage' to: 'Confirmed'
Verified, i can reproduce the error.
Added subscriber: @JacobMerrill-1
apple does not have openGL
I think the gpu module needs to be used here (to use metal?)
Added subscriber: @LazyDodo
Yeah.... no... apple doeshave opengl and we use it, there is a metal backend for cycles, but everything else is good'ol openGL
@gfxcoder can you try starting blender with the
--factory-startup --debug-gpu --log gpu.* --log-level -1
flags and attaching the log?@LazyDodo, see attached.
log
Added subscribers: @fclem, @michael64
Thank you @gfxcoder for reporting this issue. There are a few things going here.
Let's start with the symptom of the 1280 error code.
Blender uses the the function
check_gl_error
ingl_debug.cc
to check and report OpenGL errors.Since
8be20fcc61
check_gl_error
does not even callglGetError()
if blender is not run with--debug-gpu
.So if you'd run run blender with
--debug-gpu
you should get error code 0 again because it was read bycheck_gl_error
.But there actually was an error 1280 that was not reported by
check_gl_error
.I think this missing error report is due to
0d1f65e516
where the logic if an error should be reported was always incorrectly inverted.The standard logging level for
gpu.debug
isCLG_SEVERITY_WARN
(=1) and the error that wasn't reported hadCLG_SEVERITY_ERROR
(=2) so more severe.In the
debug_callback
which is used bycheck_gl_error
we have the line:```
if (((LOG.type->flag & CLG_FLAG_USE) && (LOG.type->level >= clog_severity))) {
I actually ran into the same issue and just forgot to push the fix.
I guess the error comes from the
glGetIntegerv
we do to get the capabilities and limits of the context. But it is not obvious which one is not available on all systems. I'll see if I can reproduce on my intel Mac.probably unrelated, but i'll post here as an update: when I tried building with DEBUG and running blender in lldb, it stop with an invalid enum error when creating shaders at startup (
workbench_taa
,workbench_composite_matcap
, others?). I traced this issue to the default value for the final parameter ofsampler
function ingpu_shader_create_info.hh
. when I changed the default value from-1
(which is not a value ineGPUSamplerState
) toGPU_SAMPLER_DEFAULT
(see below), lldb no longer stops when creating shaders. however, the Invalid Enum error is still getting set, so this solution does not solve the original problem.This issue was referenced by
883326040e
Changed status from 'Confirmed' to: 'Resolved'