1 #ifndef SPU_VERTEX_SHADER_H
2 #define SPU_VERTEX_SHADER_H
4 #include "cell/common.h"
5 #include "pipe/p_format.h"
10 typedef void (*spu_full_fetch_func
)( struct spu_vs_context
*draw
,
11 struct spu_exec_machine
*machine
,
15 struct spu_vs_context
{
16 struct pipe_viewport_state viewport
;
19 uint64_t src_ptr
[PIPE_MAX_ATTRIBS
];
20 unsigned pitch
[PIPE_MAX_ATTRIBS
];
21 unsigned size
[PIPE_MAX_ATTRIBS
];
22 unsigned code_offset
[PIPE_MAX_ATTRIBS
];
26 spu_full_fetch_func fetch_func
;
30 /* Clip derived state:
35 struct spu_exec_machine machine
;
36 const float (*constants
)[4];
38 unsigned num_vs_outputs
;
41 extern void spu_update_vertex_fetch(struct spu_vs_context
*draw
);
43 static INLINE
void spu_vertex_fetch(struct spu_vs_context
*draw
,
44 struct spu_exec_machine
*machine
,
48 if (draw
->vertex_fetch
.dirty
) {
49 spu_update_vertex_fetch(draw
);
50 draw
->vertex_fetch
.dirty
= 0;
53 (*draw
->vertex_fetch
.fetch_func
)(draw
, machine
, elts
, count
);
56 struct cell_command_vs
;
59 spu_bind_vertex_shader(struct spu_vs_context
*draw
,
60 struct cell_shader_info
*vs
);
63 spu_execute_vertex_shader(struct spu_vs_context
*draw
,
64 const struct cell_command_vs
*vs
);
66 #endif /* SPU_VERTEX_SHADER_H */