Maniphest T55888

Blender 2.8 eevee crashes when I try to increase shadow cube size and hit render
Closed, Resolved

Assigned To
Clément Foucault (fclem)
Authored By
Monsour Leyco (monsourleyco)
Jul 10 2018, 2:14 PM
Tags
  • BF Blender: 2.8
Subscribers
Alexandre (Snowpz)
Brecht Van Lommel (brecht)
Monsour Leyco (monsourleyco)
s12a (s12a)
Wes (Radicant)

Description

System Information
Machine: Lenovo g40-60
OS: Windows 10 Single Language
Graphics: AMD Radeon R5 M230 / Intel(R) HD Graphics 5500
CPU: Intel(R) Core(TM) i7-5500U CPU @2.40GHz
Ram: 8GB

Blender Version
Branch: blender2.8
Hash: 1112f49
Date: 2018-07-09 22:47

Short description of error
Render engine: Eevee
Whenever I try to increase the Cube Size on the Shadow Panel higher than 512px and hit the Rendered Preview or Render Image blender crashes.

Exact steps for others to reproduce the error

  1. Open Blender
  2. Select Render Tab
  3. Open the Shadows Panel
  4. Click the dropdown for the Cube Size
  5. Choose a value higher than 512px
  6. Hit render/render preview

Revisions and Commits

rB Blender

Related Objects

Mentioned In
T56076: Crash when increasing shadow map resolution with EEVEE
Mentioned Here
rB1112f49a14ba: UI: Cleanup - Remove Show Panel Header and Background

Event Timeline

Monsour Leyco (monsourleyco) created this task.Jul 10 2018, 2:14 PM
Vuk Gardašević (lijenstina) edited projects, added BF Blender: 2.8; removed BF Blender.Jul 10 2018, 2:20 PM
Brecht Van Lommel (brecht) assigned this task to Clément Foucault (fclem).EditedJul 10 2018, 6:11 PM
Brecht Van Lommel (brecht) lowered the priority of this task from 90 to 50.
Brecht Van Lommel (brecht) added a subscriber: Brecht Van Lommel (brecht).

Confirmed on AMD RX Vega on Windows, GTX 1080 on Linux works fine.

Console shows:

GPUTexture: texture alloc failed. Not enough Video Memory. Error      : EXCEPTION_ACCESS_VIOLATION

It would be nice to not crash when running out of memory, but also probably it shouldn't be happening in the first place for such a simple change.

Alexandre (Snowpz) added a subscriber: Alexandre (Snowpz).Jul 12 2018, 10:05 PM
s12a (s12a) added a subscriber: s12a (s12a).Jul 16 2018, 4:00 PM
Brecht Van Lommel (brecht) added a subscriber: Wes (Radicant).
Clément Foucault (fclem) added a comment.Jul 27 2018, 12:01 PM

So a follow up to my investigation: The use of GL_PROXY_TEXTURE2D/3D must be buggy on the AMD driver on windows. So I'm tempted to remove the check entirely, or blacklist it for this driver.

Why is it buggy? Because any texture 2D array of size > 2048 in width & height (and 1 layer) is considered invalid even if it is actually supported (removing the check without any crash or error).

The proxy texture mechanism seems to be very old and not widely used.

This check does not even prevent Out Of Memory issue it just states that the OGL implementation can support this texture.

@Brecht Van Lommel (brecht) opengl can only run out of memory if both VRAM and RAM is full (because of virtual memory blabla). The only thing that can make a texture bug is when there is not enough device memory to have all the current drawcall's textures resident (in the VRAM). And this is out of our hand because it's the drivers responsability.

Brecht Van Lommel (brecht) added a comment.Jul 27 2018, 12:33 PM

Just remove the proxy checks I think, I agree it's not useful as a way to avoid out of memory errors.

We could keep the rescaling if the resolution exceeds GL_MAX_TEXTURE_SIZE, GL_MAX_3D_TEXTURE_SIZE, GL_MAX_CUBE_MAP_TEXTURE_SIZE perhaps.

Clément Foucault (fclem) added a comment.Jul 27 2018, 1:53 PM

Actually I think I found why this happen.

The driver must treat GL_PROXY_TEXTURE_2D_ARRAY as a GL_PROXY_TEXTURE_3D and apply the same limitation to it, so width, height and depth are checked against GL_MAX_3D_TEXTURE_SIZE.
But following the spec width and height should be checked against GL_MAX_TEXTURE_SIZE which is given to be much larger.

I'll commit a general fix.

Clément Foucault (fclem) changed the task status from Unknown Status to Resolved by committing rB141e94f87ff2: Fix T55888: Eevee: crash when shadow cube size is > 512px.Jul 27 2018, 1:58 PM
Clément Foucault (fclem) added a commit: rB141e94f87ff2: Fix T55888: Eevee: crash when shadow cube size is > 512px.