Fails to compile OpenCL kernel on Mesa OpenCL in 2.72 #42813

Closed
opened 2014-12-06 00:10:33 +01:00 by Vitaliy Filippov · 13 comments

Hi!
After the recent Tom Stellard's commit to LLVM StructurizeCFG, the Blender kernel does not crash Mesa's R600 shader compiler anymore.
So it seems it should be possible to compile Blender kernel under it.
But first it complains about line 803 in kernel_shader.h
sd->flag = bsdf_diffuse_setup(&sd->closure);
which should be
sd->flag = bsdf_diffuse_setup(sd->closure);
(it's probably another part of what I reported in #41912...)

And after correcting this problem it fails with "unsupported call to function fabsf in kernel_ocl_path_trace" - one fabsf() call gets into the IR nevertheless fabsf() is a macro... somewhere near exit from kernel_path_integrate()... It's very strange because the IR looks like fabsf(fabsf(v.x)+fabsf(v.y)+fabsf(v.z)) != 0 and the "outer" fabsf in this expression is not substituted... O_o.

Hi! After the recent Tom Stellard's commit to LLVM StructurizeCFG, the Blender kernel does not crash Mesa's R600 shader compiler anymore. So it seems it should be possible to compile Blender kernel under it. But first it complains about line 803 in kernel_shader.h sd->flag = bsdf_diffuse_setup(&sd->closure); which should be sd->flag = bsdf_diffuse_setup(sd->closure); (it's probably another part of what I reported in #41912...) And after correcting this problem it fails with "unsupported call to function fabsf in kernel_ocl_path_trace" - one fabsf() call gets into the IR nevertheless fabsf() is a macro... somewhere near exit from kernel_path_integrate()... It's very strange because the IR looks like fabsf(fabsf(v.x)+fabsf(v.y)+fabsf(v.z)) != 0 and the "outer" fabsf in this expression is not substituted... O_o.

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @vitalif

Added subscriber: @vitalif

The kernel compiles if I replace that fabsf with normal llvm.fabs.f32 in the IR manually...

The kernel compiles if I replace that fabsf with normal llvm.fabs.f32 in the IR manually...
Thomas Dinges was assigned by Bastien Montagne 2014-12-06 00:18:22 +01:00

Added subscriber: @mont29

Added subscriber: @mont29

Thomas, I know you love OCL stuff… ;)

Thomas, I know you love OCL stuff… ;)

Ok, it seems fabsf is another bug of mesa opencl compiler.
But there is another problem, probably more fundamental:
You are using vstore_half4 which is missing in mesa...
As I understand it's about half-precision floats... is it really needed?

Ok, it seems fabsf is another bug of mesa opencl compiler. But there is another problem, probably more fundamental: You are using vstore_half4 which is missing in mesa... As I understand it's about half-precision floats... is it really needed?
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

This bug appears in a custom build with after code changes, right? So this isn't something that should be reported in our tracker. @mont29, I'll just remove #bf_blender for now, guess thats okay?

This bug appears in a custom build with after code changes, right? So this isn't something that should be reported in our tracker. @mont29, I'll just remove #bf_blender for now, guess thats okay?

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Let's archive this, we cannot support incomplete OCL implementations anyway…

Let's archive this, we cannot support incomplete OCL implementations anyway…

why do you say it's a custom build?! it's not a custom build, it's just 2.72 installed from debian repo.
please reopen it!

why do you say it's a custom build?! it's not a custom build, it's just 2.72 installed from debian repo. please reopen it!

Our OpenCL support is experimental, and we could only test it with common OpenCL compilers from Nvidia, AMD and Intel. We can also only support official builds from blender.org. Blender from any third party repo is not official.

Our OpenCL support is experimental, and we could only test it with common OpenCL compilers from Nvidia, AMD and Intel. We can also only support official builds from blender.org. Blender from *any* third party repo is not official.

I think the problem is just the same in the official builds...
Maybe you'll at least give some comments on whether the vstore_half4 is really mandatory?

I think the problem is just the same in the official builds... Maybe you'll at least give some comments on whether the vstore_half4 is really mandatory?
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
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
4 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#42813
No description provided.