PVRTexTool incorrectly loads DDS cubemaps with mipmaps?

Hi,



As part of our asset pipeline, we generate .DDS-format cubemaps with mipmaps (which are saved with Microsoft’s D3DX library). We then wish to use PVRTexTool’s command-line to generate a .KTX-format cubemap, compressed with ETC2, for use in an OpenGL ES 3.0 application.



What we’ve discovered is that PVRTexTool loads them incorrectly - the first face is correct, but the second face contains the texture data for the lower mipmap levels of the first face. At a guess, I suspect this might be because while both .PVR and .KTX are arranged by mipmap level and then face, whereas .DDS files are arranged by face and then mipmap.



If you’d like I can send some cubemaps for testing that exhibit the problem with the latest (4.1.3) version of PVRTexTool.

Hi Abigail,



Thanks for reporting the issue.



If you’re happy to share reproduction files with us publicly, you can file a bug report here: https://pvrsupport.imgtec.com/feedback

This will enable other developers to find and track the status of the issue.



If you would prefer to send the files to us confidentially, you can attach them to a support ticket here: https://pvrsupport.imgtec.com/new-ticket



Thanks,

Joe

Hiya,



After some investigation, it turns out that the D3DX11 does sometimes produce invalid .DDS files, which can be opened in the DirectX texture tool but many other programs have trouble with. As the Microsoft guidelines do specify that reading .DDS files should ignore certain flags (which PVRTexTool doesn’t) I’ve opened a bug report: https://pvrsupport.imgtec.com/feedback/view/69-dds-files-with-common-invalid-flags-result-in-invalid-data

Hi Abigail,



Thanks for submitting the Feedback with your additional findings & example DDS files. I will update the status of the Feedback item as progress is made.



Joe