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
1 changed files with 1 additions and 0 deletions

View File

@ -6167,6 +6167,7 @@ void lovrPassDraw(Pass* pass, DrawInfo* info) {
pass->flags &= ~DIRTY_CAMERA;
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);
draw->material = info->material;