Texture Coordinates Node output crash in blender 2.8 in Lookdev Mode even with Cycles renderer. #63524

Closed
opened 2019-04-12 09:40:44 +02:00 by Jerr Soundripper · 36 comments

System Information
Operating system: Darwin-17.7.0-x86_64-i386-64bit 64 Bits
Graphics card: NVIDIA GeForce GTX 780 OpenGL Engine NVIDIA Corporation 4.1 NVIDIA-10.33.0 387.10.10.10.40.113

Blender Version
Broken: version: 2.80 (sub 55), branch: blender2.7, commit date: 2019-04-11 17:43, hash: d1cda823e0
Worked: (optional)

Short description of error
Texture Coordinates Node output crashes blender 2.8 in Lookdev Mode even with Cycles renderer.
Forced to use cycles render preview and never swap back to lookdev, making the texture coordinates node unusable.

Exact steps for others to reproduce the error

  • Select Cycles renderer and cycles preview mode
  • Keep default cube
  • Edit cube shading
  • Add Image Texture, Ctrl+T, select object in the Object dropdown on the Texture Coordinates node.
  • Switch to Lookdev or Eevee rendering mode
  • Crash

**System Information** Operating system: Darwin-17.7.0-x86_64-i386-64bit 64 Bits Graphics card: NVIDIA GeForce GTX 780 OpenGL Engine NVIDIA Corporation 4.1 NVIDIA-10.33.0 387.10.10.10.40.113 **Blender Version** Broken: version: 2.80 (sub 55), branch: blender2.7, commit date: 2019-04-11 17:43, hash: `d1cda823e0` Worked: (optional) **Short description of error** Texture Coordinates Node output crashes blender 2.8 in Lookdev Mode even with Cycles renderer. Forced to use cycles render preview and never swap back to lookdev, making the texture coordinates node unusable. **Exact steps for others to reproduce the error** - Select Cycles renderer and cycles preview mode - Keep default cube - Edit cube shading - Add Image Texture, Ctrl+T, select object in the Object dropdown on the Texture Coordinates node. - Switch to Lookdev or Eevee rendering mode - > Crash

#63425 was marked as duplicate of this issue

#63425 was marked as duplicate of this issue

#63826 was marked as duplicate of this issue

#63826 was marked as duplicate of this issue

#63858 was marked as duplicate of this issue

#63858 was marked as duplicate of this issue

Added subscriber: @jerrsoundripper

Added subscriber: @jerrsoundripper
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Cannot reproduce here. [fedora29, 970m, 418.56 drivers]

Cannot reproduce here. [fedora29, 970m, 418.56 drivers]

Added subscribers: @WilliamReynish, @ZedDB

Added subscribers: @WilliamReynish, @ZedDB

@WilliamReynish can you reproduce this?

@WilliamReynish can you reproduce this?

I can reproduce this on every Mac OSX High sierra Blender 2.8 (Mac pros and MacBooks) with factory settings. Haven't tried on Linux or Windows.

I can reproduce this on every Mac OSX High sierra Blender 2.8 (Mac pros and MacBooks) with factory settings. Haven't tried on Linux or Windows.

I tested on windows and there is no crash ! I can only reproduce this on OSX High sierra 10.13.6.

I tested on windows and there is no crash ! I can only reproduce this on OSX High sierra 10.13.6.

Cannot reproduce in macOS 10.14 Mojave.

Cannot reproduce in macOS 10.14 Mojave.

I updated Cuda from 410.130 to 418.105 and I have the same issue. Could this be Nvidia related ?
I (and many 3d artists) won't update to Mojave because of Nvidia compatibility issues ...?
I hope it can be solved or at least reproduced by someone.
I also unchecked Cuda in Blender preferences but it doesn't change anything

I updated Cuda from 410.130 to 418.105 and I have the same issue. Could this be Nvidia related ? I (and many 3d artists) won't update to Mojave because of Nvidia compatibility issues ...? I hope it can be solved or at least reproduced by someone. I also unchecked Cuda in Blender preferences but it doesn't change anything

Added subscriber: @brecht

Added subscriber: @brecht

LookDev mode is using Eevee regardless of the render engine, so this would not be related to CUDA drivers.

I guess Ctrl+T means you are using the Node Wrangler add-on?

Does it still happen with the latest builds? There were some recent fixes related to this.

LookDev mode is using Eevee regardless of the render engine, so this would not be related to CUDA drivers. I guess Ctrl+T means you are using the Node Wrangler add-on? Does it still happen with the latest builds? There were some recent fixes related to this.

Yes Ctrl+T is node wrangler. Deactivating it won't solve the problem.
I always download the most recent build. (Every morning ;)
I am reproducing the crash with blender 2.8 beta build of April the 16th.

Off topic but : Keep up the good work you have a truly fantastic developper team and community. (I have been using blender for more than decades)
You are the open source heroes... I hope blender will continue to exist on Mac ;)

Yes Ctrl+T is node wrangler. Deactivating it won't solve the problem. I always download the most recent build. (Every morning ;) I am reproducing the crash with blender 2.8 beta build of April the 16th. Off topic but : Keep up the good work you have a truly fantastic developper team and community. (I have been using blender for more than decades) You are the open source heroes... I hope blender will continue to exist on Mac ;)

Same crash with today's 2.8 beta build.

Same crash with today's 2.8 beta build.

It crashes in lookdev preview mode and Eevee renderer mode. No problem with wireframe, solid or cycles preview modes. So I agree it is eevee related.

It crashes in lookdev preview mode and Eevee renderer mode. No problem with wireframe, solid or cycles preview modes. So I agree it is eevee related.

This comment was removed by @jerrsoundripper

*This comment was removed by @jerrsoundripper*

Same crash with today's 2.8 beta build on High Sierra Macpro and macbook pro.
Tell me if I have to report this crash every 2.8 daily build or if I should stay quiet and not bother you with that.

Same crash with today's 2.8 beta build on High Sierra Macpro and macbook pro. Tell me if I have to report this crash every 2.8 daily build or if I should stay quiet and not bother you with that.
[CrashReport.rtf](https://archive.blender.org/developer/F6959158/CrashReport.rtf)

The "crash report" file is from osx if it can help

The "crash report" file is from osx if it can help

Thanks for the crash report. It's not needed to test the build every day.

Thanks for the crash report. It's not needed to test the build every day.

It seems to be the same bug in "#63826: Crashing file."

It seems to be the same bug in "#63826: Crashing file."

I can't make it crash on Linux but valgrind does show me errors.

==13253== Invalid read of size 8
==13253==    at 0x24EDAD9: codegen_call_functions (blender/source/blender/gpu/intern/gpu_codegen.c:0)
==13253==    by 0x24EDAD9: code_generate_fragment (blender/source/blender/gpu/intern/gpu_codegen.c:903)
==13253==    by 0x24EDAD9: GPU_generate_pass (blender/source/blender/gpu/intern/gpu_codegen.c:1949)
==13253==    by 0x24FB0D9: GPU_material_from_nodetree (blender/source/blender/gpu/intern/gpu_material.c:695)
==13253==    by 0x184D54F: DRW_shader_create_from_material (blender/source/blender/draw/intern/draw_manager_shader.c:429)
==13253==    by 0x180E438: EEVEE_material_mesh_get (blender/source/blender/draw/engines/eevee/eevee_materials.c:781)
==13253==    by 0x180F5B4: material_opaque (blender/source/blender/draw/engines/eevee/eevee_materials.c:1278)
==13253==    by 0x180F5B4: EEVEE_materials_cache_populate (blender/source/blender/draw/engines/eevee/eevee_materials.c:1670)
==13253==    by 0x1803121: EEVEE_cache_populate (blender/source/blender/draw/engines/eevee/eevee_engine.c:130)
==13253==    by 0x17E6F3F: drw_engines_cache_populate (blender/source/blender/draw/intern/draw_manager.c:1095)
==13253==    by 0x17E6F3F: DRW_draw_render_loop_ex (blender/source/blender/draw/intern/draw_manager.c:1569)
==13253==    by 0x1AA98B7: view3d_draw_view (blender/source/blender/editors/space_view3d/view3d_draw.c:1431)
==13253==    by 0x1AA98B7: view3d_main_region_draw (blender/source/blender/editors/space_view3d/view3d_draw.c:1452)
==13253==    by 0x1B14611: ED_region_do_draw (blender/source/blender/editors/screen/area.c:558)
==13253==    by 0x10A64A5: wm_draw_window_offscreen (blender/source/blender/windowmanager/intern/wm_draw.c:596)
==13253==    by 0x10A64A5: wm_draw_window (blender/source/blender/windowmanager/intern/wm_draw.c:732)
==13253==    by 0x10A64A5: wm_draw_update (blender/source/blender/windowmanager/intern/wm_draw.c:895)
==13253==    by 0x10A426F: WM_main (blender/source/blender/windowmanager/intern/wm.c:424)
==13253==    by 0xC62A9A: main (blender/source/creator/creator.c:500)
==13253==  Address 0xc5ad1e8 is 8 bytes inside a block of size 32 free'd
==13253==    at 0x7835CB0: free (vg_replace_malloc.c:530)
==13253==    by 0xE35DD5: BLI_freelistN (blender/source/blender/blenlib/intern/listbase.c:533)
==13253==    by 0x24ED82E: codegen_process_uniforms_functions (blender/source/blender/gpu/intern/gpu_codegen.c:717)
==13253==    by 0x24ED82E: code_generate_fragment (blender/source/blender/gpu/intern/gpu_codegen.c:847)
==13253==    by 0x24ED82E: GPU_generate_pass (blender/source/blender/gpu/intern/gpu_codegen.c:1949)
==13253==    by 0x24FB0D9: GPU_material_from_nodetree (blender/source/blender/gpu/intern/gpu_material.c:695)
==13253==    by 0x184D54F: DRW_shader_create_from_material (blender/source/blender/draw/intern/draw_manager_shader.c:429)
==13253==    by 0x180E438: EEVEE_material_mesh_get (blender/source/blender/draw/engines/eevee/eevee_materials.c:781)
==13253==    by 0x180F5B4: material_opaque (blender/source/blender/draw/engines/eevee/eevee_materials.c:1278)
==13253==    by 0x180F5B4: EEVEE_materials_cache_populate (blender/source/blender/draw/engines/eevee/eevee_materials.c:1670)
==13253==    by 0x1803121: EEVEE_cache_populate (blender/source/blender/draw/engines/eevee/eevee_engine.c:130)
==13253==    by 0x17E6F3F: drw_engines_cache_populate (blender/source/blender/draw/intern/draw_manager.c:1095)
==13253==    by 0x17E6F3F: DRW_draw_render_loop_ex (blender/source/blender/draw/intern/draw_manager.c:1569)
==13253==    by 0x1AA98B7: view3d_draw_view (blender/source/blender/editors/space_view3d/view3d_draw.c:1431)
==13253==    by 0x1AA98B7: view3d_main_region_draw (blender/source/blender/editors/space_view3d/view3d_draw.c:1452)
==13253==    by 0x1B14611: ED_region_do_draw (blender/source/blender/editors/screen/area.c:558)
==13253==    by 0x10A64A5: wm_draw_window_offscreen (blender/source/blender/windowmanager/intern/wm_draw.c:596)
==13253==    by 0x10A64A5: wm_draw_window (blender/source/blender/windowmanager/intern/wm_draw.c:732)
==13253==    by 0x10A64A5: wm_draw_update (blender/source/blender/windowmanager/intern/wm_draw.c:895)
==13253==  Block was alloc'd at
==13253==    at 0x7836948: calloc (vg_replace_malloc.c:711)
==13253==    by 0xF27190: MEM_lockfree_callocN (blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:267)
==13253==    by 0xE3633D: BLI_genericNodeN (blender/source/blender/blenlib/intern/listbase.c:911)
==13253==    by 0x24ED513: codegen_process_uniforms_functions (blender/source/blender/gpu/intern/gpu_codegen.c:689)
==13253==    by 0x24ED513: code_generate_fragment (blender/source/blender/gpu/intern/gpu_codegen.c:847)
==13253==    by 0x24ED513: GPU_generate_pass (blender/source/blender/gpu/intern/gpu_codegen.c:1949)
==13253==    by 0x24FB0D9: GPU_material_from_nodetree (blender/source/blender/gpu/intern/gpu_material.c:695)
==13253==    by 0x184D54F: DRW_shader_create_from_material (blender/source/blender/draw/intern/draw_manager_shader.c:429)
==13253==    by 0x180E438: EEVEE_material_mesh_get (blender/source/blender/draw/engines/eevee/eevee_materials.c:781)
==13253==    by 0x180F5B4: material_opaque (blender/source/blender/draw/engines/eevee/eevee_materials.c:1278)
==13253==    by 0x180F5B4: EEVEE_materials_cache_populate (blender/source/blender/draw/engines/eevee/eevee_materials.c:1670)
==13253==    by 0x1803121: EEVEE_cache_populate (blender/source/blender/draw/engines/eevee/eevee_engine.c:130)
==13253==    by 0x17E6F3F: drw_engines_cache_populate (blender/source/blender/draw/intern/draw_manager.c:1095)
==13253==    by 0x17E6F3F: DRW_draw_render_loop_ex (blender/source/blender/draw/intern/draw_manager.c:1569)
==13253==    by 0x1AA98B7: view3d_draw_view (blender/source/blender/editors/space_view3d/view3d_draw.c:1431)
==13253==    by 0x1AA98B7: view3d_main_region_draw (blender/source/blender/editors/space_view3d/view3d_draw.c:1452)
==13253==    by 0x1B14611: ED_region_do_draw (blender/source/blender/editors/screen/area.c:558)
I can't make it crash on Linux but valgrind does show me errors. ```lines=5 ==13253== Invalid read of size 8 ==13253== at 0x24EDAD9: codegen_call_functions (blender/source/blender/gpu/intern/gpu_codegen.c:0) ==13253== by 0x24EDAD9: code_generate_fragment (blender/source/blender/gpu/intern/gpu_codegen.c:903) ==13253== by 0x24EDAD9: GPU_generate_pass (blender/source/blender/gpu/intern/gpu_codegen.c:1949) ==13253== by 0x24FB0D9: GPU_material_from_nodetree (blender/source/blender/gpu/intern/gpu_material.c:695) ==13253== by 0x184D54F: DRW_shader_create_from_material (blender/source/blender/draw/intern/draw_manager_shader.c:429) ==13253== by 0x180E438: EEVEE_material_mesh_get (blender/source/blender/draw/engines/eevee/eevee_materials.c:781) ==13253== by 0x180F5B4: material_opaque (blender/source/blender/draw/engines/eevee/eevee_materials.c:1278) ==13253== by 0x180F5B4: EEVEE_materials_cache_populate (blender/source/blender/draw/engines/eevee/eevee_materials.c:1670) ==13253== by 0x1803121: EEVEE_cache_populate (blender/source/blender/draw/engines/eevee/eevee_engine.c:130) ==13253== by 0x17E6F3F: drw_engines_cache_populate (blender/source/blender/draw/intern/draw_manager.c:1095) ==13253== by 0x17E6F3F: DRW_draw_render_loop_ex (blender/source/blender/draw/intern/draw_manager.c:1569) ==13253== by 0x1AA98B7: view3d_draw_view (blender/source/blender/editors/space_view3d/view3d_draw.c:1431) ==13253== by 0x1AA98B7: view3d_main_region_draw (blender/source/blender/editors/space_view3d/view3d_draw.c:1452) ==13253== by 0x1B14611: ED_region_do_draw (blender/source/blender/editors/screen/area.c:558) ==13253== by 0x10A64A5: wm_draw_window_offscreen (blender/source/blender/windowmanager/intern/wm_draw.c:596) ==13253== by 0x10A64A5: wm_draw_window (blender/source/blender/windowmanager/intern/wm_draw.c:732) ==13253== by 0x10A64A5: wm_draw_update (blender/source/blender/windowmanager/intern/wm_draw.c:895) ==13253== by 0x10A426F: WM_main (blender/source/blender/windowmanager/intern/wm.c:424) ==13253== by 0xC62A9A: main (blender/source/creator/creator.c:500) ==13253== Address 0xc5ad1e8 is 8 bytes inside a block of size 32 free'd ==13253== at 0x7835CB0: free (vg_replace_malloc.c:530) ==13253== by 0xE35DD5: BLI_freelistN (blender/source/blender/blenlib/intern/listbase.c:533) ==13253== by 0x24ED82E: codegen_process_uniforms_functions (blender/source/blender/gpu/intern/gpu_codegen.c:717) ==13253== by 0x24ED82E: code_generate_fragment (blender/source/blender/gpu/intern/gpu_codegen.c:847) ==13253== by 0x24ED82E: GPU_generate_pass (blender/source/blender/gpu/intern/gpu_codegen.c:1949) ==13253== by 0x24FB0D9: GPU_material_from_nodetree (blender/source/blender/gpu/intern/gpu_material.c:695) ==13253== by 0x184D54F: DRW_shader_create_from_material (blender/source/blender/draw/intern/draw_manager_shader.c:429) ==13253== by 0x180E438: EEVEE_material_mesh_get (blender/source/blender/draw/engines/eevee/eevee_materials.c:781) ==13253== by 0x180F5B4: material_opaque (blender/source/blender/draw/engines/eevee/eevee_materials.c:1278) ==13253== by 0x180F5B4: EEVEE_materials_cache_populate (blender/source/blender/draw/engines/eevee/eevee_materials.c:1670) ==13253== by 0x1803121: EEVEE_cache_populate (blender/source/blender/draw/engines/eevee/eevee_engine.c:130) ==13253== by 0x17E6F3F: drw_engines_cache_populate (blender/source/blender/draw/intern/draw_manager.c:1095) ==13253== by 0x17E6F3F: DRW_draw_render_loop_ex (blender/source/blender/draw/intern/draw_manager.c:1569) ==13253== by 0x1AA98B7: view3d_draw_view (blender/source/blender/editors/space_view3d/view3d_draw.c:1431) ==13253== by 0x1AA98B7: view3d_main_region_draw (blender/source/blender/editors/space_view3d/view3d_draw.c:1452) ==13253== by 0x1B14611: ED_region_do_draw (blender/source/blender/editors/screen/area.c:558) ==13253== by 0x10A64A5: wm_draw_window_offscreen (blender/source/blender/windowmanager/intern/wm_draw.c:596) ==13253== by 0x10A64A5: wm_draw_window (blender/source/blender/windowmanager/intern/wm_draw.c:732) ==13253== by 0x10A64A5: wm_draw_update (blender/source/blender/windowmanager/intern/wm_draw.c:895) ==13253== Block was alloc'd at ==13253== at 0x7836948: calloc (vg_replace_malloc.c:711) ==13253== by 0xF27190: MEM_lockfree_callocN (blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:267) ==13253== by 0xE3633D: BLI_genericNodeN (blender/source/blender/blenlib/intern/listbase.c:911) ==13253== by 0x24ED513: codegen_process_uniforms_functions (blender/source/blender/gpu/intern/gpu_codegen.c:689) ==13253== by 0x24ED513: code_generate_fragment (blender/source/blender/gpu/intern/gpu_codegen.c:847) ==13253== by 0x24ED513: GPU_generate_pass (blender/source/blender/gpu/intern/gpu_codegen.c:1949) ==13253== by 0x24FB0D9: GPU_material_from_nodetree (blender/source/blender/gpu/intern/gpu_material.c:695) ==13253== by 0x184D54F: DRW_shader_create_from_material (blender/source/blender/draw/intern/draw_manager_shader.c:429) ==13253== by 0x180E438: EEVEE_material_mesh_get (blender/source/blender/draw/engines/eevee/eevee_materials.c:781) ==13253== by 0x180F5B4: material_opaque (blender/source/blender/draw/engines/eevee/eevee_materials.c:1278) ==13253== by 0x180F5B4: EEVEE_materials_cache_populate (blender/source/blender/draw/engines/eevee/eevee_materials.c:1670) ==13253== by 0x1803121: EEVEE_cache_populate (blender/source/blender/draw/engines/eevee/eevee_engine.c:130) ==13253== by 0x17E6F3F: drw_engines_cache_populate (blender/source/blender/draw/intern/draw_manager.c:1095) ==13253== by 0x17E6F3F: DRW_draw_render_loop_ex (blender/source/blender/draw/intern/draw_manager.c:1569) ==13253== by 0x1AA98B7: view3d_draw_view (blender/source/blender/editors/space_view3d/view3d_draw.c:1431) ==13253== by 0x1AA98B7: view3d_main_region_draw (blender/source/blender/editors/space_view3d/view3d_draw.c:1452) ==13253== by 0x1B14611: ED_region_do_draw (blender/source/blender/editors/screen/area.c:558) ```

Added subscribers: @StephenF, @sebastian_k

Added subscribers: @StephenF, @sebastian_k

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke

That valgrind message is wrong, probably due to stack corruption. This is what asan shows:

/home/brecht/dev/blender/source/blender/gpu/intern/gpu_uniformbuffer.c:275:20: runtime error: index 16 out of bounds for type 'LinkData *[5]'
/home/brecht/dev/blender/source/blender/gpu/intern/gpu_uniformbuffer.c:275:34: runtime error: store to address 0x7fffffffc290 with insufficient space for an object of type 'struct LinkData *'
That valgrind message is wrong, probably due to stack corruption. This is what asan shows: ``` /home/brecht/dev/blender/source/blender/gpu/intern/gpu_uniformbuffer.c:275:20: runtime error: index 16 out of bounds for type 'LinkData *[5]' /home/brecht/dev/blender/source/blender/gpu/intern/gpu_uniformbuffer.c:275:34: runtime error: store to address 0x7fffffffc290 with insufficient space for an object of type 'struct LinkData *' ```
Clément Foucault was assigned by Brecht Van Lommel 2019-04-25 01:58:05 +02:00

Added subscriber: @fclem

Added subscriber: @fclem

@fclem, this seems to work. Basically adding support for mat4 in UBOs, and raising assert if unsupported types are used. Supporting mat3 alignment requires bigger changes to the code I think, so I didn't bother with that.
P961: (An Untitled Masterwork)

diff --git a/source/blender/gpu/intern/gpu_uniformbuffer.c b/source/blender/gpu/intern/gpu_uniformbuffer.c
index 651e3c1..6b2c903 100644
--- a/source/blender/gpu/intern/gpu_uniformbuffer.c
+++ b/source/blender/gpu/intern/gpu_uniformbuffer.c
@@ -65,7 +65,7 @@ static void gpu_uniformbuffer_inputs_sort(struct ListBase *inputs);
 
 /* Only support up to this type, if you want to extend it, make sure the
  * padding logic is correct for the new types. */
-#define MAX_UBO_GPU_TYPE GPU_VEC4
+#define MAX_UBO_GPU_TYPE GPU_MAT4
 
 static void gpu_uniformbuffer_initialize(GPUUniformBuffer *ubo, const void *data)
 {
@@ -255,11 +255,11 @@ static int inputs_cmp(const void *a, const void *b)
 
 /**
  * Make sure we respect the expected alignment of UBOs.
- * vec4, pad vec3 as vec4, then vec2, then floats.
+ * mat4, vec4, pad vec3 as vec4, then vec2, then floats.
  */
 static void gpu_uniformbuffer_inputs_sort(ListBase *inputs)
 {
-  /* Order them as vec4, vec3, vec2, float. */
+  /* Order them as mat4, vec4, vec3, vec2, float. */
   BLI_listbase_sort(inputs, inputs_cmp);
 
   /* Creates a lookup table for the different types; */
@@ -268,6 +268,17 @@ static void gpu_uniformbuffer_inputs_sort(ListBase *inputs)
 
   for (LinkData *link = inputs->first; link; link = link->next) {
     GPUInput *input = link->data;
+
+    if (input->type == GPU_MAT3) {
+      /* Alignment for mat3 is not handled currently, so not supported */
+      BLI_assert(!"mat3 not supported in UBO");
+      continue;
+    }
+    else if (input->type > MAX_UBO_GPU_TYPE) {
+      BLI_assert(!"GPU type not supported in UBO");
+      continue;
+    }
+
     if (input->type == cur_type) {
       continue;
     }

@fclem, this seems to work. Basically adding support for mat4 in UBOs, and raising assert if unsupported types are used. Supporting `mat3` alignment requires bigger changes to the code I think, so I didn't bother with that. [P961: (An Untitled Masterwork)](https://archive.blender.org/developer/P961.txt) ``` diff --git a/source/blender/gpu/intern/gpu_uniformbuffer.c b/source/blender/gpu/intern/gpu_uniformbuffer.c index 651e3c1..6b2c903 100644 --- a/source/blender/gpu/intern/gpu_uniformbuffer.c +++ b/source/blender/gpu/intern/gpu_uniformbuffer.c @@ -65,7 +65,7 @@ static void gpu_uniformbuffer_inputs_sort(struct ListBase *inputs); /* Only support up to this type, if you want to extend it, make sure the * padding logic is correct for the new types. */ -#define MAX_UBO_GPU_TYPE GPU_VEC4 +#define MAX_UBO_GPU_TYPE GPU_MAT4 static void gpu_uniformbuffer_initialize(GPUUniformBuffer *ubo, const void *data) { @@ -255,11 +255,11 @@ static int inputs_cmp(const void *a, const void *b) /** * Make sure we respect the expected alignment of UBOs. - * vec4, pad vec3 as vec4, then vec2, then floats. + * mat4, vec4, pad vec3 as vec4, then vec2, then floats. */ static void gpu_uniformbuffer_inputs_sort(ListBase *inputs) { - /* Order them as vec4, vec3, vec2, float. */ + /* Order them as mat4, vec4, vec3, vec2, float. */ BLI_listbase_sort(inputs, inputs_cmp); /* Creates a lookup table for the different types; */ @@ -268,6 +268,17 @@ static void gpu_uniformbuffer_inputs_sort(ListBase *inputs) for (LinkData *link = inputs->first; link; link = link->next) { GPUInput *input = link->data; + + if (input->type == GPU_MAT3) { + /* Alignment for mat3 is not handled currently, so not supported */ + BLI_assert(!"mat3 not supported in UBO"); + continue; + } + else if (input->type > MAX_UBO_GPU_TYPE) { + BLI_assert(!"GPU type not supported in UBO"); + continue; + } + if (input->type == cur_type) { continue; } ```

@brecht +1 this should work correctly.

@brecht +1 this should work correctly.

This issue was referenced by 7e18aa4250

This issue was referenced by 7e18aa4250ffc8ec6c475fb90fc5549e6a4d5de6

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Thanks so much for the fix! It now works for me without crashing. Unfortunately the texture still does not update in eevee when you transform the object that is being referenced for texture coordinates. I'm not sure if this is a bug or just a current limitation of eevee?

Thanks so much for the fix! It now works for me without crashing. Unfortunately the texture still does not update in eevee when you transform the object that is being referenced for texture coordinates. I'm not sure if this is a bug or just a current limitation of eevee?

Added subscribers: @Josephbburg, @StephenSwaney

Added subscribers: @Josephbburg, @StephenSwaney

Thank you for the bug fix too ! As Isaac Freeman said, it seems that the texture projection from an object doesn't refresh in lookdev. I have to go to cycles render to see it. I would like to know if it's an Eevee limitation too.

Thank you for the bug fix too ! As Isaac Freeman said, it seems that the texture projection from an object doesn't refresh in lookdev. I have to go to cycles render to see it. I would like to know if it's an Eevee limitation too.

I would like to know if it's an Eevee limitation too.

It is a depsgraph issue, see #57489

> I would like to know if it's an Eevee limitation too. It is a depsgraph issue, see #57489
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
8 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#63524
No description provided.