On Sat Aug 27 11:18:20 2022 +0000, Matteo Bruni wrote:
Nah, let's just keep this as it is now, no reason to make everything more complicated. I guess this is just something peculiar to fx_4_0 effects, surprised that I never encountered it before. I'll do some further digging locally.
I found that in d3d10/tests/effect.c: create_effect():
/* * Don't use sizeof(data), use data[6] as size, * because the DWORD data[] has only complete DWORDs and * so it could happen that there are padded bytes at the end. * * The fx size (data[6]) could be up to 3 BYTEs smaller * than the sizeof(data). */
Maybe we could do something like this? Use DWORDs to store shader code. And pass data[6] to size argument.