GPUOpen-Tools / compressonator

Tool suite for Texture and 3D Model Compression, Optimization and Analysis using CPUs, GPUs and APUs
1.3k stars 196 forks source link

Compilation error: call to 'cmp_getBlockPackedIndicesSNorm' is ambiguous #171

Open ShukantPal opened 3 years ago

ShukantPal commented 3 years ago

Sorry if I'm opening too many bugs :). After #167, I'm trying to build on Linux (Ubuntu docker image on my Mac) and I get this error:

#19 38.92 /trees/Compressonator/cmp_compressonatorlib/dxtc/codec_dxtc_alpha.cpp:638:28: error: call to 'cmp_getBlockPackedIndicesSNorm' is ambiguous
#19 38.92     BC4_Snorm_block.data = cmp_getBlockPackedIndicesSNorm(alphaMinMax, alphaBlockSnorm, BC4_Snorm_block.data);
#19 38.92                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#19 38.92 /trees/Compressonator/cmp_core/shaders/bcn_common_kernel.h:1216:19: note: candidate function
#19 38.92 static CGU_UINT64 cmp_getBlockPackedIndicesSNorm(CGU_Vec2f alphaMinMax, CGU_FLOAT alphaBlockSnorm[BLOCK_SIZE_4X4], CGU_UINT64 data)
#19 38.92                   ^
#19 38.92 /trees/Compressonator/cmp_compressonatorlib/dxtc/codec_dxtc_alpha.cpp:552:17: note: candidate function
#19 38.92 static uint64_t cmp_getBlockPackedIndicesSNorm(CGU_Vec2f alphaMinMax, const float alphaBlockSnorm[], uint64_t data)
ShukantPal commented 3 years ago

It looks like the implementations are exactly the same - I deleted the one in codec_dxtc_alpha.cpp to pass the compilation.

NPCompress commented 3 years ago

@ShukantPal Please continue to file all issues. If there are any updates or modifications you have made and would like to share with users, please do so using a pull request.

ShukantPal commented 3 years ago

Sure, thanks! I'm not a C++/C developer so this is an interesting rabbit hole