Hi there, yes I can provide more source. Below I've written some example code that illustrates the problem in an easy-to-verify way with some colours. You can also check the code I have written for my original project to detect this bug and work around it, which is simpler and does not upload any data (as it's not necessary to generate the error and detect the bug): renderdoc/gl_common.cpp at master · baldurk/renderdoc · GitHub
// single DXT1 4x4 compressed block = 8 bytes // the data is random, as the contents aren't important, just that it's some colour data unsigned char datablock[8] = { 0xcc, 0x84, 0x11, 0x28, 0x51, 0xba, 0x39, 0x00, }; // single DXT1 4x4 compressed block = 8 bytes // this block is completely black. Used to illustrate that the copy did not succeed unsigned char blackblock[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; GLuint texs[2]; glGenTextures(2, texs); glBindTexture(GL_TEXTURE_2D, texs[0]); glTexStorage2D(GL_TEXTURE_2D, 1, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, 2, 2); glCompressedTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 2, 2, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, 8, datablock); glBindTexture(GL_TEXTURE_2D, texs[1]); glTexStorage2D(GL_TEXTURE_2D, 1, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, 2, 2); glCompressedTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 2, 2, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, 8, blackblock); // at this point, texs[0] has some colour data, texs[1] is completely black. This can be verified by // binding the textures and rendering with them GLenum err = glGetError(); // GL_NONE returned, no errors so far // Perform a 2x2 copy from texs[0] (with data) to texs[1] (without colour data) // same result happens if you specify width and height as 4x4 to align to block size. glCopyImageSubData(texs[0], GL_TEXTURE_2D, 0, 0, 0, 0, texs[1], GL_TEXTURE_2D, 0, 0, 0, 0, 2, 2, 1); err = glGetError(); // GL_INVALID_VALUE from above copy, and debug message is thrown to ARB_debug_output glBindTexture(GL_TEXTURE_2D, texs[1]); // texs[1] remains black
This can be placed in any suitable codebase to verify the contents of the textures.