mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-04 21:43:34 +00:00
Fix crash when drawing with an active compute shader;
This commit is contained in:
parent
6462c7bc07
commit
9c28eab732
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue