On Sat Aug 27 05:38:26 2022 +0000, Ziqing Hui wrote:
I tried the 268 bytes. However, the tests will fail on Windows for 268 bytes. This line will fail on Windows: tests/d3dx10_43.c: line 4002. It returns E_FAIL for 268 bytes. Return S_OK for 266 bytes as expected. I guess maybe /Fx option just output DWORDs even if its actual shader size is not DWORD aligned. It adds 2 bytes 0 to the end of the output to satisfy DWORD alignment. While the actual shader doesn't contains the 2 bytes.
If I want to store 266 bytes as DWORDs, what should I do? Store it as a 268 bytes array and reduce data size by 2 when calling effect creation functions?
Like:
``` static const DWORD test_fx[] = { 288 bytes };
test_create_effect_from_memory { D3DX10CreateEffectFromMemory(sizeof(test_fx) - 2) } ```