aboutsummaryrefslogtreecommitdiff
path: root/src/mesa/ppc/ppc_xform.c
blob: 966798cdb368289b325b6f11aba090295f4dd8d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "ppc_xform.h"

#ifdef USE_PPC_ASM

#include "glheader.h"
#include "math/m_xform.h"

#include "rlvec.h"

static void _XFORMAPI
ppc_transform_points3_general(GLvector4f *to_vec, const GLfloat m[16],
    const GLvector4f *from_vec)
{

	rlvec.xform_points3((GLfloat *)to_vec->start, m,
	    (const GLfloat *)from_vec->start, from_vec->stride,
	    from_vec->count);
	to_vec->size = 4;
	to_vec->flags |= VEC_SIZE_4;
	to_vec->count = from_vec->count;
}

void
_mesa_init_all_ppc_transform_asm(void)
{

	rlvec_init();

	/*
	 * points3 = the glVertex3f-class path.
	 */
	_mesa_transform_tab[3][MATRIX_GENERAL] =
	    ppc_transform_points3_general;
	_mesa_transform_tab[3][MATRIX_PERSPECTIVE] =
	    ppc_transform_points3_general;
	_mesa_transform_tab[3][MATRIX_3D] =
	    ppc_transform_points3_general;
	_mesa_transform_tab[3][MATRIX_3D_NO_ROT] =
	    ppc_transform_points3_general;
	_mesa_transform_tab[3][MATRIX_2D] =
	    ppc_transform_points3_general;
	_mesa_transform_tab[3][MATRIX_2D_NO_ROT] =
	    ppc_transform_points3_general;
}

#endif /* USE_PPC_ASM */