| 30 | } |
| 31 | |
| 32 | void GL46StructuredBuffer::AttachToUnit(GLint shaderStorageBufferUnit) |
| 33 | { |
| 34 | auto buffer = GetStructuredBuffer(); |
| 35 | |
| 36 | // Cannot use glBindBufferBase because if structured buffer has a counter |
| 37 | // associated with it, then there are extra bytes allocated in the buffer |
| 38 | // to store the counter value. The structured buffer data does start |
| 39 | // at offset=0, so all that is needed is the actual number of data bytes |
| 40 | // in the StructuredBuffer object. |
| 41 | glBindBufferRange(GL_SHADER_STORAGE_BUFFER, shaderStorageBufferUnit, mGLHandle, 0, buffer->GetNumBytes()); |
| 42 | } |
| 43 | |
| 44 | bool GL46StructuredBuffer::CopyCounterValueToBuffer(GL46Buffer* targetBuffer, GLint offset) |
| 45 | { |
nothing calls this directly
no test coverage detected