microsoft / DirectXTex

DirectXTex texture processing library
https://walbourn.github.io/directxtex/
MIT License
1.79k stars 438 forks source link

Undocumented error code on writing 80070003 #37

Closed jamesford42 closed 8 years ago

jamesford42 commented 8 years ago

Microsoft (R) DirectX 11 Texture Converter (DirectXTex version) Copyright (C) Microsoft Corp. All rights reserved.

reading controls_controller.png (379x260 B8G8R8A8_UNORM 2D) as (379x260,9 BC3_UNORM 2D) writing controls_controller.DDS FAILED (80070003)

WARNING: Not all feature levels support non-power-of-2 textures with mipmaps

WARNING: Direct3D requires BC image to be multiple of 4 in width & height

Note: The warnings are unrelated to the error code, I have been seeing these and I am intentionally not making the texture pow2 or mult-of-four.

Request: add documentation of all possible error codes to the Wiki.

walbourn commented 8 years ago

All errors are HRESULTS. If you look up 80070003 in an error look up tool (such as Visual Studio's Tools -> Error Lookup or the legacy DirectX SDK Error Lookup Tool) you will find it is ERROR_PATH_NOT_FOUND which probably is related to the output path.

WARNING: Not all feature levels support non-power-of-2 textures with mipmaps

This is just informational and is emitted any time you create mipmaps with non-power-of-2 width or height textures. This only applies to Feature Levels 9.x.

WARNING: Direct3D requires BC image to be multiple of 4 in width & height

This should probably be a error rather than a warning. The software codec will let you get away with it, but you can't actually create such a resource at runtime with Direct3D. BC compression requires the that top most level be a multiple of 4. It can handle if the mipmaps end up not being multiples of 4, but the top level must be some multiple of 4. So you have three choices:

jamesford42 commented 8 years ago

All errors are HRESULTS. If you look up 80070003 in an error look up tool (such as Visual Studio's Tools -> Error Lookup or the legacy DirectX SDK Error Lookup Tool) you will find it is ERROR_PATH_NOT_FOUND which probably is related to the output path.

Ahh, thanks.

WARNING: Direct3D requires BC image to be multiple of 4 in width & height

This should probably be a error rather than a warning.

I'm not actually even using Direct3D, or even the dds, at runtime. This is only an intermediate step in my content pipeline, so, the fact that it is only a warning is good (for me).