| 400 | } |
| 401 | |
| 402 | void DispatchCompute(const int3 &groups) { |
| 403 | #ifdef PLATFORM_WINNIX |
| 404 | if (glDispatchCompute) GL_CALL(glDispatchCompute(groups.x, groups.y, groups.z)); |
| 405 | // Make sure any imageStore/VBOasSSBO operations have completed. |
| 406 | // Would be better to decouple this from DispatchCompute. |
| 407 | if (glMemoryBarrier) |
| 408 | GL_CALL(glMemoryBarrier(GL_TEXTURE_FETCH_BARRIER_BIT | |
| 409 | GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT)); |
| 410 | #else |
| 411 | assert(false); |
| 412 | #endif |
| 413 | } |
| 414 | |
| 415 | // Simple function for getting some uniform / shader storage attached to a shader. Should ideally |
| 416 | // be split up for more flexibility. |