mesa/src/intel/common
Caio Marcelo de Oliveira Filho 8ec40824ae intel/batch-decoder: fix uninitialized values warnings
Code assumes that all the necessary fields will exist, but compiler
doesn't know about this. Provide zero as default values, like in other
decoding functions.

Fixes warnings

../../src/intel/common/gen_batch_decoder.c: In function ‘handle_media_interface_descriptor_load’:
../../src/intel/common/gen_batch_decoder.c:347:7: warning: ‘binding_entry_count’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       dump_binding_table(ctx, binding_table_offset, binding_entry_count);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/intel/common/gen_batch_decoder.c:347:7: warning: ‘binding_table_offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]

../../src/intel/common/gen_batch_decoder.c:346:7: warning: ‘sampler_count’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       dump_samplers(ctx, sampler_offset, sampler_count);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/intel/common/gen_batch_decoder.c:346:7: warning: ‘sampler_offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]

../../src/intel/common/gen_batch_decoder.c:343:7: warning: ‘ksp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       ctx_disassemble_program(ctx, ksp, "compute shader");
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../../src/intel/common/gen_batch_decoder.c: In function ‘decode_dynamic_state_pointers’:
../../src/intel/common/gen_batch_decoder.c:663:54: warning: ‘state_offset’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    const uint32_t *state_map = ctx->dynamic_base.map + state_offset;
                                ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~

../../src/intel/common/gen_batch_decoder.c: In function ‘gen_print_batch’:
../../src/intel/common/gen_batch_decoder.c:856:13: warning: ‘next_batch.map’ may be used uninitialized in this function [-Wmaybe-uninitialized]
          if (next_batch.map == NULL) {
             ^
../../src/intel/common/gen_batch_decoder.c:860:13: warning: ‘next_batch.addr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             gen_print_batch(ctx, next_batch.map, next_batch.size,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             next_batch.addr);
                             ~~~~~~~~~~~~~~~~

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2018-07-18 08:29:51 -07:00
..
gen_batch_decoder.c intel/batch-decoder: fix uninitialized values warnings 2018-07-18 08:29:51 -07:00
gen_clflush.h intel: Fix clflushing on modern (Baytrail+) Atom CPUs. 2017-07-10 15:55:26 -07:00
gen_debug.c i965: add a debug option to disable oa config loading 2017-11-28 13:34:04 +00:00
gen_debug.h android: change include "cutils/log.h" to "log/log.h" on Android API >=26 2018-05-14 08:08:31 +03:00
gen_decoder.c intel/decoder: use snprintf(..., "%s", ...) instead of strncpy 2018-07-18 08:29:51 -07:00
gen_decoder.h intel: decoder: limit to the number decoded lines from VBO 2018-05-02 19:46:47 +01:00
gen_defines.h intel: add new common header gen_defines.h 2018-02-28 14:36:57 +02:00
gen_disasm.c intel: Move batch decoder/disassembler from tools/ to common/ 2018-05-02 09:27:56 -07:00
gen_disasm.h intel: Move batch decoder/disassembler from tools/ to common/ 2018-05-02 09:27:56 -07:00
gen_gem.h intel/common: Add an address de-canonicalization helper 2018-05-31 16:51:45 -07:00
gen_l3_config.c intel/common/icl: Add L3 config 2018-03-22 09:56:09 -07:00
gen_l3_config.h intel: Split gen_device_info out into libintel_dev 2018-03-05 09:47:37 -08:00
gen_sample_positions.h intel/common: Improve the comments for sample positions 2017-10-16 08:04:56 -07:00
gen_urb_config.c mesa: include mtypes.h less 2018-04-12 19:31:30 -04:00
intel_log.c intel: Add simple logging façade for Android (v2) 2017-10-17 11:08:26 -07:00
intel_log.h intel: Add simple logging façade for Android (v2) 2017-10-17 11:08:26 -07:00
meson.build anv: move canonical_address calculation into a separate function 2018-05-27 19:24:33 -07:00