1 #include "intel_batchbuffer.h"
2 
3 
emit_vertex_2s(struct intel_batchbuffer * batch,int16_t x,int16_t y)4 static inline void emit_vertex_2s(struct intel_batchbuffer *batch,
5 				  int16_t x, int16_t y)
6 {
7 	OUT_BATCH((uint16_t)y << 16 | (uint16_t)x);
8 }
9 
emit_vertex(struct intel_batchbuffer * batch,float f)10 static inline void emit_vertex(struct intel_batchbuffer *batch,
11 			       float f)
12 {
13 	union { float f; uint32_t ui; } u;
14 	u.f = f;
15 	OUT_BATCH(u.ui);
16 }
17 
emit_vertex_normalized(struct intel_batchbuffer * batch,float f,float total)18 static inline void emit_vertex_normalized(struct intel_batchbuffer *batch,
19 					  float f, float total)
20 {
21 	union { float f; uint32_t ui; } u;
22 	u.f = f / total;
23 	OUT_BATCH(u.ui);
24 }
25 
26 void gen11_render_copyfunc(struct intel_batchbuffer *batch,
27 			  drm_intel_context *context,
28 			  const struct igt_buf *src, unsigned src_x, unsigned src_y,
29 			  unsigned width, unsigned height,
30 			  const struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
31 void gen9_render_copyfunc(struct intel_batchbuffer *batch,
32 			  drm_intel_context *context,
33 			  const struct igt_buf *src, unsigned src_x, unsigned src_y,
34 			  unsigned width, unsigned height,
35 			  const struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
36 void gen8_render_copyfunc(struct intel_batchbuffer *batch,
37 			  drm_intel_context *context,
38 			  const struct igt_buf *src, unsigned src_x, unsigned src_y,
39 			  unsigned width, unsigned height,
40 			  const struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
41 void gen7_render_copyfunc(struct intel_batchbuffer *batch,
42 			  drm_intel_context *context,
43 			  const struct igt_buf *src, unsigned src_x, unsigned src_y,
44 			  unsigned width, unsigned height,
45 			  const struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
46 void gen6_render_copyfunc(struct intel_batchbuffer *batch,
47 			  drm_intel_context *context,
48 			  const struct igt_buf *src, unsigned src_x, unsigned src_y,
49 			  unsigned width, unsigned height,
50 			  const struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
51 void gen4_render_copyfunc(struct intel_batchbuffer *batch,
52 			  drm_intel_context *context,
53 			  const struct igt_buf *src, unsigned src_x, unsigned src_y,
54 			  unsigned width, unsigned height,
55 			  const struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
56 void gen3_render_copyfunc(struct intel_batchbuffer *batch,
57 			  drm_intel_context *context,
58 			  const struct igt_buf *src, unsigned src_x, unsigned src_y,
59 			  unsigned width, unsigned height,
60 			  const struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
61 void gen2_render_copyfunc(struct intel_batchbuffer *batch,
62 			  drm_intel_context *context,
63 			  const struct igt_buf *src, unsigned src_x, unsigned src_y,
64 			  unsigned width, unsigned height,
65 			  const struct igt_buf *dst, unsigned dst_x, unsigned dst_y);
66