Freeze when initializing EEVEE on RX 580 #56789

Closed
opened 2018-09-13 06:27:23 +02:00 by Robert Hewitt · 7 comments

System Information
Windows 10 and RX 580 with Radeon Adrenalin driver 18.8.2 (latest "optional" driver at time of posting)

Blender Version
blender-2.80-f04ddd37ea3-win64

Short description of error
When switching to Rendered Mode (SHIFT + Z) in the EEVEE engine, the application becomes unresponsive while generating mipmaps for a depth texture.

Exact steps for others to reproduce the error

  • Switch to Rendered View

I built from source using the latest version, and I was able to stack-trace where the application busy-waits. The freeze occurs in the file gpu_texture.c in the method GPU_texture_generate_mipmap where it calls glGenerateMipmap. This may be because glGenerateMipmap on a GPU_DEPTH_COMPONENT24 texture is not officially supported on AMD drivers.

Note:
I saw a line in eevee_effects.c in the function EEVEE_effects_init that falls back to an R32F texture for intel gpus, and tried changing the code so that my GPU is also included in the workaround and this appears to fix the error. (However, as an OpenGL developer myself, I would recommend manually generating mipmaps for the depth texture instead of using glGenerateMipmaps as it makes no sense to linearly interpolate depth values.)

**System Information** Windows 10 and RX 580 with Radeon Adrenalin driver 18.8.2 (latest "optional" driver at time of posting) **Blender Version** blender-2.80-f04ddd37ea3-win64 **Short description of error** When switching to Rendered Mode (SHIFT + Z) in the EEVEE engine, the application becomes unresponsive while generating mipmaps for a depth texture. **Exact steps for others to reproduce the error** * Switch to Rendered View I built from source using the latest version, and I was able to stack-trace where the application busy-waits. The freeze occurs in the file `gpu_texture.c` in the method `GPU_texture_generate_mipmap` where it calls `glGenerateMipmap`. This may be because `glGenerateMipmap` on a `GPU_DEPTH_COMPONENT24` texture is not officially supported on AMD drivers. Note: I saw a line in `eevee_effects.c` in the function `EEVEE_effects_init` that falls back to an `R32F` texture for intel gpus, and tried changing the code so that my GPU is also included in the workaround and this appears to fix the error. (However, as an OpenGL developer myself, I would recommend manually generating mipmaps for the depth texture instead of using glGenerateMipmaps as it makes no sense to linearly interpolate depth values.)
Author

Added subscriber: @rhewitt

Added subscriber: @rhewitt

Added subscribers: @fclem, @mont29

Added subscribers: @fclem, @mont29
Clément Foucault was assigned by Bastien Montagne 2018-09-13 12:37:10 +02:00

@fclem another one for you to check ;)

@fclem another one for you to check ;)

This issue was referenced by b3a9069170

This issue was referenced by b3a90691703c85fdad9e205722ee061f9c9645e8

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

@rhewitt Much thanks for investigating the issue and finding glGenerateMipmap to be the root of the problem. I hope the fix does the job.

@rhewitt Much thanks for investigating the issue and finding glGenerateMipmap to be the root of the problem. I hope the fix does the job.
Author

I've grabbed the latest build (75980f4af2a-windows64) and it no longer freezes for me. Looks like it worked!

I've grabbed the latest build (75980f4af2a-windows64) and it no longer freezes for me. Looks like it worked!
Sign in to join this conversation.
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blender/blender#56789
No description provided.