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

Set a Texture to sampler2D in shader and run, then report VK_ERROR_DEVICE_LOST #74499

Open
Tracked by #71929
larkD opened this issue Mar 6, 2023 · 1 comment
Open
Tracked by #71929

Comments

@larkD
Copy link

larkD commented Mar 6, 2023

Godot version

4.0 stable

System information

windows10, Vulkan, GeForce GT 1030

Issue description

key the code to shader editor:

shader_type canvas_item;
uniform sampler2D light_vector;

void fragment(){
COLOR = texture(TEXTURE,UV);
}

and set light_vector to a texture in the editor, then run program.
program freeze and no response, report err:
E 0:00:02:0010 swap_buffers: Vulkan: Cannot submit graphics queue. Error code: VK_ERROR_DEVICE_LOST
<C++ error> Condition "err" is true. Returning: ERR_CANT_CREATE
<C++ source> drivers/vulkan/vulkan_context.cpp:2357 @ swap_buffers()

Steps to reproduce

key the code to shader editor:

shader_type canvas_item;
uniform sampler2D light_vector;

void fragment(){
COLOR = texture(TEXTURE,UV);
}

and set light_vector to any texture in the editor, then run program.

Minimal reproduction project

N/A

@issork
Copy link
Contributor

issork commented Apr 6, 2023

I just recently ran into this issue as well, I am working on a 2D game. When I disable the shader that handles palette swapping for my character or if I switch to Compatibility it does work.

What is weird is that if I create a new game through my character creation screen, where the same character and shader is used, it also works in the game. If I load a game it does not. Might have something to do with that the parent of my Node2D is a Control node in the character creator and then the same Node2D is used ingame, but I wasn't able to investigate more yet.

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

No branches or pull requests

3 participants