Creating texture with canvas menu (sculpt mode, paint tool) leading to shader fail (fuchsia) #97519

Closed
opened 2022-04-21 19:47:51 +02:00 by Vyacheslav Kobozev · 17 comments

System Information
Operating system: Windows-8.1-6.3.9600-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 473.04

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-04-20 19:32, hash: b67ccc333a

Short description of error
Select cube,
go to sculpt mode
select paint tool
open canvas menu
изображение.png
create new material slot.
for me it produces fucsia usually but sometimes work properly

Even saving and reverting file sometimes produces fuchsia (wrong shader cached?)
This never happen, if I create image node manually.
2022-04-21_20-37-29.mp4
2022-04-21_20-45-37.mp4

**System Information** Operating system: Windows-8.1-6.3.9600-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 473.04 **Blender Version** Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-04-20 19:32, hash: `b67ccc333a` **Short description of error** Select cube, go to sculpt mode select paint tool open canvas menu ![изображение.png](https://archive.blender.org/developer/F13014722/изображение.png) create new material slot. for me it produces fucsia usually but sometimes work properly Even saving and reverting file sometimes produces fuchsia (wrong shader cached?) This never happen, if I create image node manually. [2022-04-21_20-37-29.mp4](https://archive.blender.org/developer/F13014716/2022-04-21_20-37-29.mp4) [2022-04-21_20-45-37.mp4](https://archive.blender.org/developer/F13014728/2022-04-21_20-45-37.mp4)

Added subscriber: @Vyach

Added subscriber: @Vyach
Member

Added subscribers: @JosephEagar, @PratikPB2123

Added subscribers: @JosephEagar, @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Hi, thanks for the report. I can confirm.
This is still an experimental feature (Canvas panel doesn't show up without Sculpt texture paint feature).

Hi, thanks for the report. I can confirm. This is still an experimental feature (Canvas panel doesn't show up without `Sculpt texture paint` feature).
Member
Added subscribers: @JulienKaspar, @Jeroen-Bakker, @brecht, @lichtwerk
Member
CC @JulienKaspar CC @Jeroen-Bakker CC @brecht
Member

Will raise prio since this is basically unusable (even it does not happen 100% of the time, the chance is pretty high on my side -- it is > 50% I would say)

This is what I get then:

ERROR (gpu.shader): GPU_material_compile VertShader: 
      | 
  203 | layout(location = 15) in vec4 a;
      | 
      | Error: C0000: syntax error, unexpected reserved word "layout", expecting ';' at token "layout"
      | 
 2258 | var_attrs.v0 = attr_load_vec4(a);
      | 
      | Error: C1503: undefined variable "a"

ERROR (gpu.shader): GPU_material_compile FragShader: 
      | 
  203 | in codegen_iface{
      | 
      | Error: C7537: OpenGL does not allow 'inout' after a type specifier
      | Error: C1014: "codegen_iface" is not a function
      | Error: C1004: in and out only apply to formal parameters "codegen_iface"
      | 
  205 | }
      | 
      | Error: C1016: expression type incompatible with function return type
      | 
  203 | in codegen_iface{
      | 
      | Error: C1108: function "codegen_iface" has no statements
      | 
  205 | }
      | 
      | Error: C3009: layout qualifier 'binding', incompatible with 'codegen_iface'
      | 
  206 | var_attrs;
      | 
      | Error: C0000: syntax error, unexpected ';', expecting "::" at token ";"
      | 
 7792 | differentiate_texco(var_attrs.v0, tmp2);
      | 
      | Error: C1503: undefined variable "var_attrs"
      | 
 7795 | mapping_mat4(tmp2, node_tree.u4, node_tree.u5, node_tree.u6, node_tree.u7, node_tree.u8, node_tree.u9, tmp10);
      | 
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | 
 7799 | node_tex_image_linear(tmp10, samp0, tmp13, tmp14);
      | 
      | Error: C1503: undefined variable "samp0"
      | 
 7816 | node_bsdf_principled(tmp16, node_tree.u20, node_tree.u21, node_tree.u22, node_tree.u23, node_tree.u24, node_tree.u25, node_tree.u26, node_tree.u27, node_tree.u28, node_tree.u29, node_tree.u30, node_tree.u31, node_tree.u32, node_tree.u33, node_tree.u34, node_tree.u35, node_tree.u36, node_tree.u37, node_tree.u38, node_tree.u39, node_tree.u40, tmp17, tmp18, cons43, node_tree.u44, cons45, cons46, cons47, cons48, node_tree.u49, tmp50);
      | 
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
      | Error: C1503: undefined variable "node_tree"
Will raise prio since this is basically unusable (even it does not happen 100% of the time, the chance is pretty high on my side -- it is > 50% I would say) This is what I get then: ``` ERROR (gpu.shader): GPU_material_compile VertShader: | 203 | layout(location = 15) in vec4 a; | | Error: C0000: syntax error, unexpected reserved word "layout", expecting ';' at token "layout" | 2258 | var_attrs.v0 = attr_load_vec4(a); | | Error: C1503: undefined variable "a" ERROR (gpu.shader): GPU_material_compile FragShader: | 203 | in codegen_iface{ | | Error: C7537: OpenGL does not allow 'inout' after a type specifier | Error: C1014: "codegen_iface" is not a function | Error: C1004: in and out only apply to formal parameters "codegen_iface" | 205 | } | | Error: C1016: expression type incompatible with function return type | 203 | in codegen_iface{ | | Error: C1108: function "codegen_iface" has no statements | 205 | } | | Error: C3009: layout qualifier 'binding', incompatible with 'codegen_iface' | 206 | var_attrs; | | Error: C0000: syntax error, unexpected ';', expecting "::" at token ";" | 7792 | differentiate_texco(var_attrs.v0, tmp2); | | Error: C1503: undefined variable "var_attrs" | 7795 | mapping_mat4(tmp2, node_tree.u4, node_tree.u5, node_tree.u6, node_tree.u7, node_tree.u8, node_tree.u9, tmp10); | | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | 7799 | node_tex_image_linear(tmp10, samp0, tmp13, tmp14); | | Error: C1503: undefined variable "samp0" | 7816 | node_bsdf_principled(tmp16, node_tree.u20, node_tree.u21, node_tree.u22, node_tree.u23, node_tree.u24, node_tree.u25, node_tree.u26, node_tree.u27, node_tree.u28, node_tree.u29, node_tree.u30, node_tree.u31, node_tree.u32, node_tree.u33, node_tree.u34, node_tree.u35, node_tree.u36, node_tree.u37, node_tree.u38, node_tree.u39, node_tree.u40, tmp17, tmp18, cons43, node_tree.u44, cons45, cons46, cons47, cons48, node_tree.u49, tmp50); | | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" | Error: C1503: undefined variable "node_tree" ```

Added subscriber: @fclem

Added subscriber: @fclem

@lichtwerk Can you try to reproduce with this small patch and paste the resulting output here?

index 83fc34a3278..772053b9e9f 100644
    - a/source/blender/gpu/intern/gpu_shader_log.cc
+++ b/source/blender/gpu/intern/gpu_shader_log.cc
@@ -28,7 +28,7 @@ namespace blender::gpu {
  * \{ */
 
 /* Number of lines before and after the error line to print for compilation errors. */
- #define DEBUG_CONTEXT_LINES 0
+#define DEBUG_CONTEXT_LINES 2
 /**
  * Print dependencies sources list before the shader report.
  * Useful to debug include order or missing dependencies.```
@lichtwerk Can you try to reproduce with this small patch and paste the resulting output here? ```diff --git a/source/blender/gpu/intern/gpu_shader_log.cc b/source/blender/gpu/intern/gpu_shader_log.cc index 83fc34a3278..772053b9e9f 100644 - a/source/blender/gpu/intern/gpu_shader_log.cc +++ b/source/blender/gpu/intern/gpu_shader_log.cc @@ -28,7 +28,7 @@ namespace blender::gpu { * \{ */ /* Number of lines before and after the error line to print for compilation errors. */ - #define DEBUG_CONTEXT_LINES 0 +#define DEBUG_CONTEXT_LINES 2 /** * Print dependencies sources list before the shader report. * Useful to debug include order or missing dependencies.```
Member

As of 3893ba5d67, this might have gotten a bit better, but now we dont have an immediate update? "Compiling Shaders 1" is stalled in the statistics top left and you only see the texture update in the viewport after some interaction in the viewport (rotating, zooming, doing an actual paint stroke)

As of 3893ba5d67, this might have gotten a bit better, but now we dont have an immediate update? "Compiling Shaders 1" is stalled in the statistics top left and you only see the texture update in the viewport after some interaction in the viewport (rotating, zooming, doing an actual paint stroke)
Member

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'
Member

In #97519#1355906, @lichtwerk wrote:
As of 3893ba5d67, this might have gotten a bit better, but now we dont have an immediate update? "Compiling Shaders 1" is stalled in the statistics top left and you only see the texture update in the viewport after some interaction in the viewport (rotating, zooming, doing an actual paint stroke)

Made a new report, see #98018 (Missing viewport update after creating texture with canvas menu (sculpt mode, paint tool))

@JulienKaspar , @Vyach can you confirm the original problem is gone?

> In #97519#1355906, @lichtwerk wrote: > As of 3893ba5d67, this might have gotten a bit better, but now we dont have an immediate update? "Compiling Shaders 1" is stalled in the statistics top left and you only see the texture update in the viewport after some interaction in the viewport (rotating, zooming, doing an actual paint stroke) Made a new report, see #98018 (Missing viewport update after creating texture with canvas menu (sculpt mode, paint tool)) @JulienKaspar , @Vyach can you confirm the original problem is gone?
Member

0f7da9a72f or 6e2b0a38f0 might have fixed this

0f7da9a72f or 6e2b0a38f0 might have fixed this
Member

@lichtwerk I cannot reproduce the original issue anymore.

@lichtwerk I cannot reproduce the original issue anymore.
Member

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'
Philipp Oeser self-assigned this 2022-05-10 15:09:51 +02:00
Member

OKi, thx getting back, will close then.
@Vyach : if you still have this, please comment again (we can always reopen in such case).

OKi, thx getting back, will close then. @Vyach : if you still have this, please comment again (we can always reopen in such case).

@lichtwerk I can confirm that bug fixed in my test with 3.3.0 Alpha, 08a39d32a988, 2022-05-10 06:30

@lichtwerk I can confirm that bug fixed in my test with 3.3.0 Alpha, `08a39d32a988`, 2022-05-10 06:30
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#97519
No description provided.