summaryrefslogtreecommitdiff
path: root/rtl/gfx/gfx_transpose.sv
blob: 03ecf2d358aebfe424d46f3d0ef088e6df98d7f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
`include "gfx/gfx_defs.sv"

module gfx_transpose
(
	input  mat4 in,
	output mat4 out
);

	integer i, j;

	// Esto no tiene costo en hardware, es un renombramiento de señales
	always_comb
		for (i = 0; i < `VECS_PER_MAT; ++i)
			for (j = 0; j < `FLOATS_PER_VEC; ++j)
				out[i][j] = in[j][i];

endmodule