blob: 3d6f750e22e15bec82e75c73cf8028f3a8162b49 [file] [log] [blame]
Chia-I Wu00a23b22014-08-20 15:28:08 +08001/*
2 * XGL
3 *
4 * Copyright (C) 2014 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
Chia-I Wu44e42362014-09-02 08:32:09 +080023 *
24 * Authors:
25 * Chia-I Wu <olv@lunarg.com>
Chia-I Wu00a23b22014-08-20 15:28:08 +080026 */
27
28#ifndef CMD_PRIV_H
29#define CMD_PRIV_H
30
Chia-I Wue24c3292014-08-21 14:05:23 +080031#include "genhw/genhw.h"
Chia-I Wu32710d72014-08-20 16:05:22 +080032#include "dev.h"
33#include "gpu.h"
Chia-I Wu00a23b22014-08-20 15:28:08 +080034#include "cmd.h"
35
Chia-I Wu32710d72014-08-20 16:05:22 +080036#define CMD_ASSERT(cmd, min_gen, max_gen) \
37 INTEL_GPU_ASSERT((cmd)->dev->gpu, (min_gen), (max_gen))
38
Chia-I Wu00b51a82014-09-09 12:07:37 +080039enum intel_cmd_item_type {
40 /* for state buffer */
41 INTEL_CMD_ITEM_BLOB,
42 INTEL_CMD_ITEM_CLIP_VIEWPORT,
43 INTEL_CMD_ITEM_SF_VIEWPORT,
44 INTEL_CMD_ITEM_SCISSOR_RECT,
45 INTEL_CMD_ITEM_CC_VIEWPORT,
46 INTEL_CMD_ITEM_COLOR_CALC,
47 INTEL_CMD_ITEM_DEPTH_STENCIL,
48 INTEL_CMD_ITEM_BLEND,
49 INTEL_CMD_ITEM_SAMPLER,
50
51 /* for surface buffer */
52 INTEL_CMD_ITEM_SURFACE,
53 INTEL_CMD_ITEM_BINDING_TABLE,
54
55 /* for instruction buffer */
56 INTEL_CMD_ITEM_KERNEL,
57
58 INTEL_CMD_ITEM_COUNT,
59};
60
61struct intel_cmd_item {
62 enum intel_cmd_item_type type;
63 XGL_SIZE offset;
64 XGL_SIZE size;
65};
66
Chia-I Wud7d1e482014-10-18 13:25:10 +080067#define INTEL_CMD_RELOC_TARGET_IS_WRITER (1u << 31)
Chia-I Wu958d1b72014-08-21 11:28:11 +080068struct intel_cmd_reloc {
Chia-I Wu68f319d2014-09-09 09:43:21 +080069 enum intel_cmd_writer_type which;
Chia-I Wu72292b72014-09-09 10:48:33 +080070 XGL_SIZE offset;
Chia-I Wu958d1b72014-08-21 11:28:11 +080071
Chia-I Wud7d1e482014-10-18 13:25:10 +080072 intptr_t target;
73 uint32_t target_offset;
Chia-I Wu958d1b72014-08-21 11:28:11 +080074
Chia-I Wu32a22462014-08-26 14:13:46 +080075 uint32_t flags;
Chia-I Wu958d1b72014-08-21 11:28:11 +080076};
77
Chia-I Wuc14d1562014-10-17 09:49:22 +080078struct intel_ds_view;
79
Chia-I Wu29e6f502014-11-24 14:27:29 +080080enum intel_cmd_meta_mode {
81 /*
82 * Draw POINTLIST of (width - 1) vertices with only VS enabled. The
83 * vertex id is from 0 to (width - 1).
84 */
85 INTEL_CMD_META_VS_POINTS,
86
87 /*
88 * Draw a RECTLIST from (dst.x, dst.y) to (dst.x + width, dst.y + height)
89 * with only FS enabled.
90 */
91 INTEL_CMD_META_FS_RECT,
92
93 /*
94 * Draw a RECTLIST from (dst.x, dst.y) to (dst.x + width, dst.y + height)
95 * with only depth/stencil enabled.
96 */
97 INTEL_CMD_META_DEPTH_STENCIL_RECT,
98};
99
Chia-I Wuc14d1562014-10-17 09:49:22 +0800100struct intel_cmd_meta {
Chia-I Wu29e6f502014-11-24 14:27:29 +0800101 enum intel_cmd_meta_mode mode;
Chia-I Wuc14d1562014-10-17 09:49:22 +0800102 enum intel_dev_meta_shader shader_id;
103
104 struct {
105 bool valid;
106
107 uint32_t surface[8];
108 XGL_UINT surface_len;
109
110 intptr_t reloc_target;
111 uint32_t reloc_offset;
112 uint32_t reloc_flags;
113
114 XGL_UINT lod, layer;
115 XGL_UINT x, y;
116 } src, dst;
117
Chia-I Wu429a0aa2014-10-24 11:57:51 +0800118 struct {
119 struct intel_ds_view *view;
120 struct intel_ds_state *state;
121 } ds;
122
Chia-I Wuc14d1562014-10-17 09:49:22 +0800123 uint32_t clear_val[4];
124
125 XGL_UINT width, height;
126 XGL_UINT samples;
127};
128
Chia-I Wu9f039862014-08-20 15:39:56 +0800129static inline int cmd_gen(const struct intel_cmd *cmd)
130{
131 return intel_gpu_gen(cmd->dev->gpu);
132}
133
Chia-I Wucdff0592014-08-22 09:27:36 +0800134static inline void cmd_reserve_reloc(struct intel_cmd *cmd,
135 XGL_UINT reloc_len)
136{
137 /* fail silently */
138 if (cmd->reloc_used + reloc_len > cmd->reloc_count) {
139 cmd->reloc_used = 0;
140 cmd->result = XGL_ERROR_TOO_MANY_MEMORY_REFERENCES;
141 }
142 assert(cmd->reloc_used + reloc_len <= cmd->reloc_count);
143}
144
Chia-I Wue24c3292014-08-21 14:05:23 +0800145void cmd_writer_grow(struct intel_cmd *cmd,
Chia-I Wu3c3edc02014-09-09 10:32:59 +0800146 enum intel_cmd_writer_type which,
Chia-I Wu72292b72014-09-09 10:48:33 +0800147 XGL_SIZE new_size);
148
Chia-I Wu00b51a82014-09-09 12:07:37 +0800149void cmd_writer_record(struct intel_cmd *cmd,
150 enum intel_cmd_writer_type which,
151 enum intel_cmd_item_type type,
152 XGL_SIZE offset, XGL_SIZE size);
153
Chia-I Wu72292b72014-09-09 10:48:33 +0800154/**
155 * Return an offset to a region that is aligned to \p alignment and has at
156 * least \p size bytes.
157 */
158static inline XGL_SIZE cmd_writer_reserve(struct intel_cmd *cmd,
159 enum intel_cmd_writer_type which,
160 XGL_SIZE alignment, XGL_SIZE size)
161{
162 struct intel_cmd_writer *writer = &cmd->writers[which];
163 XGL_SIZE offset;
164
165 assert(alignment && u_is_pow2(alignment));
166 offset = u_align(writer->used, alignment);
167
168 if (offset + size > writer->size) {
169 cmd_writer_grow(cmd, which, offset + size);
170 /* align again in case of errors */
171 offset = u_align(writer->used, alignment);
172
173 assert(offset + size <= writer->size);
174 }
175
176 return offset;
177}
Chia-I Wu00a23b22014-08-20 15:28:08 +0800178
Chia-I Wu32710d72014-08-20 16:05:22 +0800179/**
Chia-I Wubda55fd2014-08-25 12:46:10 +0800180 * Add a reloc at \p pos. No error checking.
Chia-I Wucdff0592014-08-22 09:27:36 +0800181 */
Chia-I Wu72292b72014-09-09 10:48:33 +0800182static inline void cmd_writer_reloc(struct intel_cmd *cmd,
183 enum intel_cmd_writer_type which,
Chia-I Wud7d1e482014-10-18 13:25:10 +0800184 XGL_SIZE offset, intptr_t target,
185 uint32_t target_offset, uint32_t flags)
Chia-I Wucdff0592014-08-22 09:27:36 +0800186{
187 struct intel_cmd_reloc *reloc = &cmd->relocs[cmd->reloc_used];
188
189 assert(cmd->reloc_used < cmd->reloc_count);
190
Chia-I Wu68f319d2014-09-09 09:43:21 +0800191 reloc->which = which;
Chia-I Wu72292b72014-09-09 10:48:33 +0800192 reloc->offset = offset;
Chia-I Wud7d1e482014-10-18 13:25:10 +0800193 reloc->target = target;
194 reloc->target_offset = target_offset;
Chia-I Wu32a22462014-08-26 14:13:46 +0800195 reloc->flags = flags;
Chia-I Wucdff0592014-08-22 09:27:36 +0800196
197 cmd->reloc_used++;
198}
199
200/**
Chia-I Wu72292b72014-09-09 10:48:33 +0800201 * Reserve a region from the state buffer. Both the offset, in bytes, and the
202 * pointer to the reserved region are returned.
203 *
204 * Note that \p alignment is in bytes and \p len is in DWords.
Chia-I Wue24c3292014-08-21 14:05:23 +0800205 */
Chia-I Wu72292b72014-09-09 10:48:33 +0800206static inline uint32_t cmd_state_pointer(struct intel_cmd *cmd,
Chia-I Wu00b51a82014-09-09 12:07:37 +0800207 enum intel_cmd_item_type item,
Chia-I Wu72292b72014-09-09 10:48:33 +0800208 XGL_SIZE alignment, XGL_UINT len,
209 uint32_t **dw)
Chia-I Wue24c3292014-08-21 14:05:23 +0800210{
Chia-I Wu72292b72014-09-09 10:48:33 +0800211 const enum intel_cmd_writer_type which = INTEL_CMD_WRITER_STATE;
212 const XGL_SIZE size = len << 2;
213 const XGL_SIZE offset = cmd_writer_reserve(cmd, which, alignment, size);
214 struct intel_cmd_writer *writer = &cmd->writers[which];
Chia-I Wue24c3292014-08-21 14:05:23 +0800215
Chia-I Wu72292b72014-09-09 10:48:33 +0800216 /* all states are at least aligned to 32-bytes */
217 assert(alignment % 32 == 0);
218
219 *dw = (uint32_t *) ((char *) writer->ptr + offset);
220
221 writer->used = offset + size;
222
Chia-I Wu00b51a82014-09-09 12:07:37 +0800223 if (intel_debug & INTEL_DEBUG_BATCH)
224 cmd_writer_record(cmd, which, item, offset, size);
225
Chia-I Wu72292b72014-09-09 10:48:33 +0800226 return offset;
Chia-I Wue24c3292014-08-21 14:05:23 +0800227}
228
229/**
Chia-I Wu72292b72014-09-09 10:48:33 +0800230 * Write a dynamic state to the state buffer.
Chia-I Wucdff0592014-08-22 09:27:36 +0800231 */
Chia-I Wu72292b72014-09-09 10:48:33 +0800232static inline uint32_t cmd_state_write(struct intel_cmd *cmd,
Chia-I Wu00b51a82014-09-09 12:07:37 +0800233 enum intel_cmd_item_type item,
Chia-I Wu72292b72014-09-09 10:48:33 +0800234 XGL_SIZE alignment, XGL_UINT len,
235 const uint32_t *dw)
Chia-I Wucdff0592014-08-22 09:27:36 +0800236{
Chia-I Wu72292b72014-09-09 10:48:33 +0800237 uint32_t offset, *dst;
238
Chia-I Wu00b51a82014-09-09 12:07:37 +0800239 offset = cmd_state_pointer(cmd, item, alignment, len, &dst);
Chia-I Wu72292b72014-09-09 10:48:33 +0800240 memcpy(dst, dw, len << 2);
241
242 return offset;
Chia-I Wucdff0592014-08-22 09:27:36 +0800243}
244
245/**
Chia-I Wu72292b72014-09-09 10:48:33 +0800246 * Write a surface state to the surface buffer. The offset, in bytes, of the
247 * state is returned.
248 *
249 * Note that \p alignment is in bytes and \p len is in DWords.
Chia-I Wue24c3292014-08-21 14:05:23 +0800250 */
Chia-I Wu72292b72014-09-09 10:48:33 +0800251static inline uint32_t cmd_surface_write(struct intel_cmd *cmd,
Chia-I Wu00b51a82014-09-09 12:07:37 +0800252 enum intel_cmd_item_type item,
Chia-I Wu72292b72014-09-09 10:48:33 +0800253 XGL_SIZE alignment, XGL_UINT len,
254 const uint32_t *dw)
Chia-I Wue24c3292014-08-21 14:05:23 +0800255{
Chia-I Wu00b51a82014-09-09 12:07:37 +0800256 assert(item == INTEL_CMD_ITEM_SURFACE ||
257 item == INTEL_CMD_ITEM_BINDING_TABLE);
258
259 return cmd_state_write(cmd, item, alignment, len, dw);
Chia-I Wue24c3292014-08-21 14:05:23 +0800260}
261
262/**
Chia-I Wu72292b72014-09-09 10:48:33 +0800263 * Add a relocation entry for a DWord of a surface state.
Chia-I Wucdff0592014-08-22 09:27:36 +0800264 */
Chia-I Wu72292b72014-09-09 10:48:33 +0800265static inline void cmd_surface_reloc(struct intel_cmd *cmd,
266 uint32_t offset, XGL_UINT dw_index,
267 struct intel_bo *bo,
268 uint32_t bo_offset, uint32_t reloc_flags)
Chia-I Wucdff0592014-08-22 09:27:36 +0800269{
Chia-I Wu72292b72014-09-09 10:48:33 +0800270 const enum intel_cmd_writer_type which = INTEL_CMD_WRITER_STATE;
Chia-I Wucdff0592014-08-22 09:27:36 +0800271
Chia-I Wu72292b72014-09-09 10:48:33 +0800272 cmd_writer_reloc(cmd, which, offset + (dw_index << 2),
Chia-I Wud7d1e482014-10-18 13:25:10 +0800273 (intptr_t) bo, bo_offset, reloc_flags);
274}
275
276static inline void cmd_surface_reloc_writer(struct intel_cmd *cmd,
277 uint32_t offset, XGL_UINT dw_index,
278 enum intel_cmd_writer_type writer,
279 uint32_t writer_offset)
280{
281 const enum intel_cmd_writer_type which = INTEL_CMD_WRITER_STATE;
282
283 cmd_writer_reloc(cmd, which, offset + (dw_index << 2),
284 (intptr_t) writer, writer_offset,
285 INTEL_CMD_RELOC_TARGET_IS_WRITER);
Chia-I Wucdff0592014-08-22 09:27:36 +0800286}
287
288/**
Chia-I Wu72292b72014-09-09 10:48:33 +0800289 * Write a kernel to the instruction buffer. The offset, in bytes, of the
290 * kernel is returned.
Chia-I Wue24c3292014-08-21 14:05:23 +0800291 */
Chia-I Wu72292b72014-09-09 10:48:33 +0800292static inline uint32_t cmd_instruction_write(struct intel_cmd *cmd,
293 XGL_SIZE size,
294 const void *kernel)
Chia-I Wue24c3292014-08-21 14:05:23 +0800295{
Chia-I Wu72292b72014-09-09 10:48:33 +0800296 const enum intel_cmd_writer_type which = INTEL_CMD_WRITER_INSTRUCTION;
297 /*
298 * From the Sandy Bridge PRM, volume 4 part 2, page 112:
299 *
300 * "Due to prefetch of the instruction stream, the EUs may attempt to
301 * access up to 8 instructions (128 bytes) beyond the end of the
302 * kernel program - possibly into the next memory page. Although
303 * these instructions will not be executed, software must account for
304 * the prefetch in order to avoid invalid page access faults."
305 */
306 const XGL_SIZE reserved_size = size + 128;
307 /* kernels are aligned to 64 bytes */
308 const XGL_SIZE alignment = 64;
309 const XGL_SIZE offset = cmd_writer_reserve(cmd,
310 which, alignment, reserved_size);
311 struct intel_cmd_writer *writer = &cmd->writers[which];
Chia-I Wue24c3292014-08-21 14:05:23 +0800312
Chia-I Wu72292b72014-09-09 10:48:33 +0800313 memcpy((char *) writer->ptr + offset, kernel, size);
Chia-I Wu5e25c272014-08-21 20:19:12 +0800314
Chia-I Wu72292b72014-09-09 10:48:33 +0800315 writer->used = offset + size;
316
Chia-I Wu00b51a82014-09-09 12:07:37 +0800317 if (intel_debug & INTEL_DEBUG_BATCH)
318 cmd_writer_record(cmd, which, INTEL_CMD_ITEM_KERNEL, offset, size);
319
Chia-I Wu72292b72014-09-09 10:48:33 +0800320 return offset;
321}
322
323/**
324 * Reserve a region from the batch buffer. Both the offset, in DWords, and
325 * the pointer to the reserved region are returned.
326 *
327 * Note that \p len is in DWords.
328 */
329static inline XGL_UINT cmd_batch_pointer(struct intel_cmd *cmd,
330 XGL_UINT len, uint32_t **dw)
331{
332 const enum intel_cmd_writer_type which = INTEL_CMD_WRITER_BATCH;
333 /*
334 * We know the batch bo is always aligned. Using 1 here should allow the
335 * compiler to optimize away aligning.
336 */
337 const XGL_SIZE alignment = 1;
338 const XGL_SIZE size = len << 2;
339 const XGL_SIZE offset = cmd_writer_reserve(cmd, which, alignment, size);
340 struct intel_cmd_writer *writer = &cmd->writers[which];
341
342 assert(offset % 4 == 0);
343 *dw = (uint32_t *) ((char *) writer->ptr + offset);
344
345 writer->used = offset + size;
346
347 return offset >> 2;
348}
349
350/**
351 * Write a command to the batch buffer.
352 */
353static inline XGL_UINT cmd_batch_write(struct intel_cmd *cmd,
354 XGL_UINT len, const uint32_t *dw)
355{
356 XGL_UINT pos;
357 uint32_t *dst;
358
359 pos = cmd_batch_pointer(cmd, len, &dst);
360 memcpy(dst, dw, len << 2);
361
362 return pos;
363}
364
365/**
366 * Add a relocation entry for a DWord of a command.
367 */
368static inline void cmd_batch_reloc(struct intel_cmd *cmd, XGL_UINT pos,
369 struct intel_bo *bo,
370 uint32_t bo_offset, uint32_t reloc_flags)
371{
372 const enum intel_cmd_writer_type which = INTEL_CMD_WRITER_BATCH;
373
Chia-I Wud7d1e482014-10-18 13:25:10 +0800374 cmd_writer_reloc(cmd, which, pos << 2, (intptr_t) bo, bo_offset, reloc_flags);
375}
376
377static inline void cmd_batch_reloc_writer(struct intel_cmd *cmd, XGL_UINT pos,
378 enum intel_cmd_writer_type writer,
379 uint32_t writer_offset)
380{
381 const enum intel_cmd_writer_type which = INTEL_CMD_WRITER_BATCH;
382
383 cmd_writer_reloc(cmd, which, pos << 2, (intptr_t) writer, writer_offset,
384 INTEL_CMD_RELOC_TARGET_IS_WRITER);
Chia-I Wue24c3292014-08-21 14:05:23 +0800385}
386
387/**
Chia-I Wu48c283d2014-08-25 23:13:46 +0800388 * Begin the batch buffer.
Chia-I Wu79dfbb32014-08-25 12:19:02 +0800389 */
390static inline void cmd_batch_begin(struct intel_cmd *cmd)
391{
Chia-I Wu48c283d2014-08-25 23:13:46 +0800392 /* STATE_BASE_ADDRESS */
Chia-I Wu79dfbb32014-08-25 12:19:02 +0800393 const uint8_t cmd_len = 10;
Chia-I Wu426072d2014-08-26 14:31:55 +0800394 const uint32_t dw0 = GEN6_RENDER_CMD(COMMON, STATE_BASE_ADDRESS) |
Chia-I Wu79dfbb32014-08-25 12:19:02 +0800395 (cmd_len - 2);
Chia-I Wu72292b72014-09-09 10:48:33 +0800396 XGL_UINT pos;
397 uint32_t *dw;
Chia-I Wu79dfbb32014-08-25 12:19:02 +0800398
399 CMD_ASSERT(cmd, 6, 7.5);
400
Chia-I Wu72292b72014-09-09 10:48:33 +0800401 pos = cmd_batch_pointer(cmd, cmd_len, &dw);
Chia-I Wu79dfbb32014-08-25 12:19:02 +0800402
Chia-I Wu72292b72014-09-09 10:48:33 +0800403 dw[0] = dw0;
Chia-I Wu79dfbb32014-08-25 12:19:02 +0800404 /* start offsets */
Chia-I Wu72292b72014-09-09 10:48:33 +0800405 dw[1] = 1;
406 dw[2] = 1;
407 dw[3] = 1;
408 dw[4] = 1;
409 dw[5] = 1;
Chia-I Wu79dfbb32014-08-25 12:19:02 +0800410 /* end offsets */
Chia-I Wu72292b72014-09-09 10:48:33 +0800411 dw[6] = 1;
412 dw[7] = 1 + 0xfffff000;
413 dw[8] = 1 + 0xfffff000;
414 dw[9] = 1;
Chia-I Wud7d1e482014-10-18 13:25:10 +0800415
416 cmd_reserve_reloc(cmd, 3);
417 cmd_batch_reloc_writer(cmd, pos + 2, INTEL_CMD_WRITER_STATE, 1);
418 cmd_batch_reloc_writer(cmd, pos + 3, INTEL_CMD_WRITER_STATE, 1);
419 cmd_batch_reloc_writer(cmd, pos + 5, INTEL_CMD_WRITER_INSTRUCTION, 1);
Chia-I Wu79dfbb32014-08-25 12:19:02 +0800420}
421
422/**
Chia-I Wue24c3292014-08-21 14:05:23 +0800423 * End the batch buffer.
424 */
425static inline void cmd_batch_end(struct intel_cmd *cmd)
426{
Chia-I Wu68f319d2014-09-09 09:43:21 +0800427 struct intel_cmd_writer *writer = &cmd->writers[INTEL_CMD_WRITER_BATCH];
Chia-I Wu72292b72014-09-09 10:48:33 +0800428 uint32_t *dw;
Chia-I Wu79dfbb32014-08-25 12:19:02 +0800429
Chia-I Wu72292b72014-09-09 10:48:33 +0800430 if (writer->used & 0x7) {
431 cmd_batch_pointer(cmd, 1, &dw);
432 dw[0] = GEN6_MI_CMD(MI_BATCH_BUFFER_END);
Chia-I Wue24c3292014-08-21 14:05:23 +0800433 } else {
Chia-I Wu72292b72014-09-09 10:48:33 +0800434 cmd_batch_pointer(cmd, 2, &dw);
435 dw[0] = GEN6_MI_CMD(MI_BATCH_BUFFER_END);
436 dw[1] = GEN6_MI_CMD(MI_NOOP);
Chia-I Wue24c3292014-08-21 14:05:23 +0800437 }
Chia-I Wu343b1372014-08-20 16:39:20 +0800438}
439
Chia-I Wu525c6602014-08-27 10:22:34 +0800440void cmd_batch_flush(struct intel_cmd *cmd, uint32_t pipe_control_dw0);
Chia-I Wu3fb47ce2014-10-28 11:19:36 +0800441void cmd_batch_flush_all(struct intel_cmd *cmd);
Chia-I Wu525c6602014-08-27 10:22:34 +0800442
Chia-I Wu759fa2e2014-08-30 18:44:47 +0800443void cmd_batch_depth_count(struct intel_cmd *cmd,
444 struct intel_bo *bo,
445 XGL_GPU_SIZE offset);
446
Chia-I Wue8dbd5d2014-08-31 13:15:58 +0800447void cmd_batch_timestamp(struct intel_cmd *cmd,
448 struct intel_bo *bo,
449 XGL_GPU_SIZE offset);
450
451void cmd_batch_immediate(struct intel_cmd *cmd,
452 struct intel_bo *bo,
453 XGL_GPU_SIZE offset,
454 uint64_t val);
Chia-I Wu1cbc0052014-08-25 09:50:12 +0800455
Chia-I Wuc14d1562014-10-17 09:49:22 +0800456void cmd_draw_meta(struct intel_cmd *cmd, const struct intel_cmd_meta *meta);
457
Chia-I Wu00a23b22014-08-20 15:28:08 +0800458#endif /* CMD_PRIV_H */