1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00

Fix crash when drawing with an active compute shader;

This commit is contained in:
bjorn 2023-10-02 09:56:33 -07:00
parent 6462c7bc07
commit 9c28eab732

View file

@ -6167,6 +6167,7 @@ void lovrPassDraw(Pass* pass, DrawInfo* info) {
pass->flags &= ~DIRTY_CAMERA; pass->flags &= ~DIRTY_CAMERA;
draw->shader = pass->pipeline->shader ? pass->pipeline->shader : lovrGraphicsGetDefaultShader(info->shader); draw->shader = pass->pipeline->shader ? pass->pipeline->shader : lovrGraphicsGetDefaultShader(info->shader);
lovrCheck(draw->shader->info.type == SHADER_GRAPHICS, "Tried to draw while a compute shader is active");
lovrRetain(draw->shader); lovrRetain(draw->shader);
draw->material = info->material; draw->material = info->material;