I want to do the following:
glCopyNamedBufferSubData(pSSBO, pSSBOLocal, 0, 0, GetElementStride() * elementCount);
pSSBO is a regular GPU side SSBO and pSSBOLocal is a CPU side persistently mapped, immutable storage buffer. They have been created like this:
glNamedBufferData(pSSBO, size, nullptr, GL_DYNAMIC_DRAW));
glNamedBufferStorage(pSSBOLocal, size, nullptr, GL_MAP_READ_BIT | GL_MAP_PERSISTENT_BIT | GL_CLIENT_STORAGE_BIT));
pPersistentMapped = glMapNamedBufferRange(pSSBOLocal, 0, size, GL_MAP_READ_BIT | GL_MAP_PERSISTENT_BIT));
On Linux using an AMD driver this works. On Windows using an nVidia driver this fails at glCopyNamedBufferSubData(...)
with error GL_INVALID_VALUE. I’ve verified using the specification that all conditions for GL_INVALID_VALUE are not fulfilled. Hence I think this is a driver bug or is some strange special rule applying here which is not mentioned anywhere in the specifications?
EDIT: I’ve done some more testing. On the “same” machine using “Linux” the nVidia driver does not fail for this code. Hence it is a Windows driver problem it looks like.