GL error GL_INVALID_OPERATION #49089

Closed
opened 2016-08-15 01:29:04 +02:00 by Aaron Carlisle · 17 comments
Member

System Information
Windows 10
Intel HD 4600

Blender Version
Broken: 2.77.3 040fa75
Worked: The past :)

Short description of error
Blender will segfault or with--debug-gpu I get:

GL: Error has been generated. GL error GL_INVALID_OPERATION in (null): (ID: 173538523) Generic error

Exact steps for others to reproduce the error
Open attached blend-file and switch to material view mode.

River Scene.blend

**System Information** Windows 10 Intel HD 4600 **Blender Version** Broken: 2.77.3 040fa75 Worked: The past :) **Short description of error** Blender will segfault or with`--debug-gpu` I get: `GL: Error has been generated. GL error GL_INVALID_OPERATION in (null): (ID: 173538523) Generic error ` **Exact steps for others to reproduce the error** Open attached blend-file and switch to material view mode. [River Scene.blend](https://archive.blender.org/developer/F337093/River_Scene.blend)
Mike Erwin was assigned by Aaron Carlisle 2016-08-15 01:29:04 +02:00
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Using your file I get an error inside GPU_shader_uniform_texture, might originate further up.

GL API error: glEnable parameter <active texture> has an invalid value '12': must be less than 8 (GL_INVALID_VALUE)
29: BLI_system_backtrace - 0xA0656B60
28: gpu_debug_proc - 0x9FC99670
27: DrvPresentBuffers - 0x6D11C870
...
22: GPU_shader_uniform_texture - 0x9FCB27A0
21: GPU_pass_bind - 0x9FCB7990
20: GPU_material_bind - 0x9FC9B2B0
19: GPU_object_material_bind - 0x9FC83C20
18: cdDM_drawMappedFacesGLSL - 0xA00B3C10
17: cdDM_drawFacesGLSL - 0xA00B5590
16: draw_mesh_fancy - 0x9F036B40
15: draw_mesh_object - 0x9F037AE0

The invalid values range from 8 to 14.

void GPU_shader_uniform_texture(GPUShader *UNUSED(shader), int location, GPUTexture *tex)
{

...
int target = GPU_texture_target(tex);
...
glEnable(target);

I'm running Windows 10, Radeon HD 6970. I can put my Intel HD 4600 system back together if that helps.

Using your file I get an error inside GPU_shader_uniform_texture, might originate further up. ``` GL API error: glEnable parameter <active texture> has an invalid value '12': must be less than 8 (GL_INVALID_VALUE) 29: BLI_system_backtrace - 0xA0656B60 28: gpu_debug_proc - 0x9FC99670 27: DrvPresentBuffers - 0x6D11C870 ... 22: GPU_shader_uniform_texture - 0x9FCB27A0 21: GPU_pass_bind - 0x9FCB7990 20: GPU_material_bind - 0x9FC9B2B0 19: GPU_object_material_bind - 0x9FC83C20 18: cdDM_drawMappedFacesGLSL - 0xA00B3C10 17: cdDM_drawFacesGLSL - 0xA00B5590 16: draw_mesh_fancy - 0x9F036B40 15: draw_mesh_object - 0x9F037AE0 ``` The invalid values range from 8 to 14. ```lang=c void GPU_shader_uniform_texture(GPUShader *UNUSED(shader), int location, GPUTexture *tex) { ``` ... int target = GPU_texture_target(tex); ... glEnable(target); ``` ``` I'm running Windows 10, Radeon HD 6970. I can put my Intel HD 4600 system back together if that helps.
Member

Actual problem is with glActiveTexture(GL_TEXTURE0 + number), not glEnable.

On my system we're exceeding the GL_MAX_TEXTURE_IMAGE_UNITS limit, which varies depending on GPU & driver. 8 textures seems stupid low for my GPU, but that's what it reports...

OpenGL 2.1 guarantees the limit is at least 2.
On Mac (any GPU) the limit is 16.

GPU_shader_uniform_texture does not check GL_MAX_TEXTURE_IMAGE_UNITS, causing an error.

@Blendify please report your "Maximum Fixed Function Texture Units" from system-info.txt.

Also run the latest debug build with --debug-gpu. I just added better error reporting. You seem to be getting a different GL error than me.

Do you build your own from source? If not I can upload a build.

Actual problem is with glActiveTexture(GL_TEXTURE0 + number), not glEnable. On my system we're exceeding the GL_MAX_TEXTURE_IMAGE_UNITS limit, which varies depending on GPU & driver. 8 textures seems stupid low for my GPU, but that's what it reports... OpenGL 2.1 guarantees the limit is at least 2. On Mac (any GPU) the limit is 16. GPU_shader_uniform_texture does not check GL_MAX_TEXTURE_IMAGE_UNITS, causing an error. @Blendify please report your "Maximum Fixed Function Texture Units" from system-info.txt. Also run the latest **debug** build with --debug-gpu. I just added better error reporting. You seem to be getting a different GL error than me. Do you build your own from source? If not I can upload a build.
Member

Additional info:

In OpenGL 3.2 the GL_MAX_TEXTURE_IMAGE_UNITS limit should be at least 16.

GG.maxtextures stores the limit we need.

My system info reports GL 4.5 with 8 fixed function texture units.

sys_info.py reports GL_MAX_TEXTURE_UNITS, not GL_MAX_TEXTURE_IMAGE_UNITS. This is for fixed function multi-texture, not for shader-based drawing.

glActiveTexture(n > 8) does cause an error on my system.

Additional info: In OpenGL 3.2 the GL_MAX_TEXTURE_IMAGE_UNITS limit should be at least 16. GG.maxtextures stores the limit we need. My system info reports GL 4.5 with 8 fixed function texture units. sys_info.py reports GL_MAX_TEXTURE_UNITS, not GL_MAX_TEXTURE_IMAGE_UNITS. This is for fixed function multi-texture, not for shader-based drawing. glActiveTexture(n > 8) does cause an error on my system.
Member

nVidia has a good FAQ about these limits. Reading carefully now...

nVidia has a [good FAQ ](http://www.nvidia.com/object/General_FAQ.html#t6) about these limits. Reading carefully now...
Member

Here's my system-info.txt GLSL section

Maximum Vertex Image Units: 18
Maximum Fragment Image Units: 18
Maximum Pipeline Image Units: 108

The Fragment limit is the one we are interested in.

Still don't understand why mine is crapping out starting with GL_TEXTURE0 + 8 since the reported limit is GL_TEXTURE0 + 17.

Here's my system-info.txt GLSL section Maximum Vertex Image Units: 18 Maximum Fragment Image Units: 18 Maximum Pipeline Image Units: 108 The Fragment limit is the one we are interested in. Still don't understand why mine is crapping out starting with GL_TEXTURE0 + 8 since the reported limit is GL_TEXTURE0 + 17.
Member

On Intel HD 4600 I'm seeing the same bad behavior @Blendify described in IRC. Crash in driver, no GL error reported.

driver stuff
...
20: GPU_shader_create_ex - 0xDBC721C0
19: GPU_generate_pass - 0xDBC77EE0
18: GPU_material_construct_end - 0xDBC5FF50
17: GPU_material_from_blender - 0xDBC5B360
16: GPU_begin_object_materials - 0xDBC43A70
15: draw_mesh_object - 0xDAFF82A0
14: draw_object - 0xDAFE5880
13: view3d_draw_objects - 0xDAFCB890
...

Still need to fix the separate error I see on AMD with the same file. But the Intel one first!

On Intel HD 4600 I'm seeing the same bad behavior @Blendify described in IRC. Crash in driver, no GL error reported. ``` driver stuff ... 20: GPU_shader_create_ex - 0xDBC721C0 19: GPU_generate_pass - 0xDBC77EE0 18: GPU_material_construct_end - 0xDBC5FF50 17: GPU_material_from_blender - 0xDBC5B360 16: GPU_begin_object_materials - 0xDBC43A70 15: draw_mesh_object - 0xDAFF82A0 14: draw_object - 0xDAFE5880 13: view3d_draw_objects - 0xDAFCB890 ... ``` Still need to fix the separate error I see on AMD with the same file. But the Intel one first!
Member

Crash is inside glLinkProgram, called from GPU_shader_create_ex. The vertex & fragment shaders compiled successfully with nothing in their info logs. Intel driver bug??

Materials on many objects in the scene seem to be fine. When an offending one is brought into view, BAM! Crash.

Crash is inside glLinkProgram, called from GPU_shader_create_ex. The vertex & fragment shaders compiled successfully with nothing in their info logs. Intel driver bug?? Materials on many objects in the scene seem to be fine. When an offending one is brought into view, BAM! Crash.
Member

Reported bug to Intel graphics folks.

Until we hear back I'm going to focus on the AMD texture unit issue -- suspect we're using GL wrong in that case.

Reported bug to Intel graphics folks. Until we hear back I'm going to focus on the AMD texture unit issue -- suspect we're using GL wrong in that case.

Added subscriber: @Sergey

Added subscriber: @Sergey

Since it's OpenGL error removing BF project. We can't fix driver itself anyway.

Since it's OpenGL error removing BF project. We can't fix driver itself anyway.
Author
Member

poke

poke
Aaron Carlisle changed title from GL error to GL error GL_INVALID_OPERATION 2017-04-17 05:40:38 +02:00

Added subscriber: @intrigus-3

Added subscriber: @intrigus-3

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

This specific code no longer exists in 2.8, archiving.

This specific code no longer exists in 2.8, archiving.
Sign in to join this conversation.
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
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#49089
No description provided.