• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright © 2021 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21  * IN THE SOFTWARE.
22  */
23 
24 #include "common/intel_decoder.h"
25 #include "util/log.h"
26 
27 void
intel_batch_decode_ctx_init(struct intel_batch_decode_ctx * ctx,const struct brw_isa_info * isa,const struct intel_device_info * devinfo,FILE * fp,enum intel_batch_decode_flags flags,const char * xml_path,struct intel_batch_decode_bo (* get_bo)(void *,bool,uint64_t),unsigned (* get_state_size)(void *,uint64_t,uint64_t),void * user_data)28 intel_batch_decode_ctx_init(struct intel_batch_decode_ctx *ctx,
29                             const struct brw_isa_info *isa,
30                             const struct intel_device_info *devinfo,
31                             FILE *fp, enum intel_batch_decode_flags flags,
32                             const char *xml_path,
33                             struct intel_batch_decode_bo (*get_bo)(void *,
34                                                                    bool,
35                                                                    uint64_t),
36                             unsigned (*get_state_size)(void *, uint64_t,
37                                                        uint64_t),
38                             void *user_data)
39 {
40    /* Clear ctx to play safe. */
41    memset(ctx, 0, sizeof(*ctx));
42 }
43 
44 void
intel_batch_decode_ctx_finish(struct intel_batch_decode_ctx * ctx)45 intel_batch_decode_ctx_finish(struct intel_batch_decode_ctx *ctx)
46 {
47 }
48 
49 void
intel_print_batch(struct intel_batch_decode_ctx * ctx,const uint32_t * batch,uint32_t batch_size,uint64_t batch_addr,bool from_ring)50 intel_print_batch(struct intel_batch_decode_ctx *ctx,
51                   const uint32_t *batch, uint32_t batch_size,
52                   uint64_t batch_addr, bool from_ring)
53 {
54    mesa_logw("Batch logging not supported on Android.");
55 }
56