Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan Attaching ViewportTexture to Material throws error #50296

Closed
nonunknown opened this issue Jul 8, 2021 · 2 comments
Closed

Vulkan Attaching ViewportTexture to Material throws error #50296

nonunknown opened this issue Jul 8, 2021 · 2 comments

Comments

@nonunknown
Copy link
Contributor

Godot version

v4.0.dev.custom_build [cb4e421]

System information

manjaro Gnome 21, AMD R7 200 series, Intel i3 3.0 GHZ,8GB RAM

Issue description

When you select the SubViewport path to Viewport texture console starts spamming infinitely the error:

ERROR: Condition "!uniform_set" is true.
   at: draw_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:6697)
ERROR: Uniforms were never supplied for set (3) at the time of drawing, which are required by the pipeline
   at: draw_list_draw (drivers/vulkan/rendering_device_vulkan.cpp:6852)

After Closing godot the message continues:


ERROR: Condition "!material" is true.
   at: material_set_shader (servers/rendering/renderer_rd/renderer_storage_rd.cpp:1556)
ERROR: Attempting to use an uninitialized RID
   at: getornull (./core/templates/rid_owner.h:197)
ERROR: Condition "!material" is true.
   at: material_set_shader (servers/rendering/renderer_rd/renderer_storage_rd.cpp:1556)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:7853)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:7853)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:7853)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:7853)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:7853)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:7853)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:7853)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:7853)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:7853)
ERROR: Attempted to free invalid ID: 0
   at: _free_internal (drivers/vulkan/rendering_device_vulkan.cpp:7853)
WARNING: 8 RIDs of type "UniformBuffer" were leaked.
     at: _free_rids (drivers/vulkan/rendering_device_vulkan.cpp:8378)

Steps to reproduce

*Create Basic 3d Scene

  • Create two cameras A and B
  • Create a subviewport node
  • attach camera B inside
  • Create a meshinstance to apply a material
  • attach a basic material to the mesh
  • under albedo attach a new ViewportTexture
  • Select the SubViewport
  • Error should happen

Minimal reproduction project

ViewportTextureBug.zip

@GiantBlargg
Copy link
Contributor

GiantBlargg commented Sep 10, 2021

#52528 seems to fix some, but not all, of the errors.

@akien-mga
Copy link
Member

I tested and the error spam was fixed by #54489.

I'm not sure the ViewportTexture actually works though, there's still

ERROR: Viewport Texture must be set to use it.
   at: get_height (scene/main/viewport.cpp:113)
ERROR: Viewport Texture must be set to use it.
   at: get_width (scene/main/viewport.cpp:108)

and the preview is garbled, but that's probably something to track in a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants