mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +02:00
Slightly less heavy-handed compute memory barrier implementation.
Also validate whether there are any unbound writable resources when dispatching compute shader work.
This commit is contained in:
@@ -1095,8 +1095,17 @@ void Graphics::dispatchThreadgroups(Shader* shader, int x, int y, int z)
|
||||
}
|
||||
|
||||
flushBatchedDraws();
|
||||
|
||||
auto prevshader = Shader::current;
|
||||
shader->attach();
|
||||
dispatch(x, y, z);
|
||||
|
||||
bool success = dispatch(x, y, z);
|
||||
|
||||
if (prevshader != nullptr)
|
||||
prevshader->attach();
|
||||
|
||||
if (!success)
|
||||
throw love::Exception("Compute shader must have resources bound to all writable texture and buffer variables.");
|
||||
}
|
||||
|
||||
Graphics::BatchedVertexData Graphics::requestBatchedDraw(const BatchedDrawCommand &cmd)
|
||||
|
||||
Reference in New Issue
Block a user