Copy directX 12 texture to GpuMat

I found a solution:
Make Directx texture with ROW_MAJOR as layout
then find the good row pitch
(very weird with direct X:
with texture 1936 * 1066 in R8G8B8A8 => pitch is 1936 * 4 + 128 = 7808 bytes
with texture 1920 * 1080 => pitch is 1920 * 4 = 7680 bytes)

1 Like