void BufferStorage11::packPixels(ID3D11Texture2D *srcTexture, UINT srcSubresource, const PackPixelsParams ¶ms) { PackStorage11 *packStorage = getPackStorage(); TypedBufferStorage11 *latestStorage = getLatestStorage(); if (packStorage) { packStorage->packPixels(srcTexture, srcSubresource, params); packStorage->setDataRevision(latestStorage ? latestStorage->getDataRevision() + 1 : 1); } }
gl::Error Buffer11::packPixels(ID3D11Texture2D *srcTexture, UINT srcSubresource, const PackPixelsParams ¶ms) { PackStorage *packStorage = getPackStorage(); BufferStorage *latestStorage = getLatestBufferStorage(); if (packStorage) { gl::Error error = packStorage->packPixels(srcTexture, srcSubresource, params); if (error.isError()) { return error; } packStorage->setDataRevision(latestStorage ? latestStorage->getDataRevision() + 1 : 1); } return gl::Error(GL_NO_ERROR); }