• Home
  • Raw
  • Download

Lines Matching refs:blob

41    struct blob *blob;  member
70 struct blob_reader *blob; member
123 return read_lookup_object(ctx, blob_read_uint32(ctx->blob)); in read_object()
177 blob_write_bytes(ctx->blob, c->values, sizeof(c->values)); in write_constant()
178 blob_write_uint32(ctx->blob, c->num_elements); in write_constant()
188 blob_copy_bytes(ctx->blob, (uint8_t *)c->values, sizeof(c->values)); in read_constant()
189 c->num_elements = blob_read_uint32(ctx->blob); in read_constant()
286 blob_write_uint32(ctx->blob, flags.u32); in write_variable()
289 encode_type_to_blob(ctx->blob, var->type); in write_variable()
294 encode_type_to_blob(ctx->blob, var->interface_type); in write_variable()
299 blob_write_string(ctx->blob, var->name); in write_variable()
304 blob_write_bytes(ctx->blob, &data, sizeof(data)); in write_variable()
316 blob_write_uint32(ctx->blob, diff.u32); in write_variable()
323 blob_write_bytes(ctx->blob, &var->state_slots[i], in write_variable()
331 blob_write_bytes(ctx->blob, (uint8_t *) var->members, in write_variable()
343 flags.u32 = blob_read_uint32(ctx->blob); in read_variable()
348 var->type = decode_type_from_blob(ctx->blob); in read_variable()
356 var->interface_type = decode_type_from_blob(ctx->blob); in read_variable()
362 const char *name = blob_read_string(ctx->blob); in read_variable()
373 blob_copy_bytes(ctx->blob, (uint8_t *) &var->data, sizeof(var->data)); in read_variable()
377 diff.u32 = blob_read_uint32(ctx->blob); in read_variable()
392 blob_copy_bytes(ctx->blob, &var->state_slots[i], in read_variable()
410 blob_copy_bytes(ctx->blob, (uint8_t *) var->members, in read_variable()
420 blob_write_uint32(ctx->blob, exec_list_length(src)); in write_var_list()
430 unsigned num_vars = blob_read_uint32(ctx->blob); in read_var_list()
441 blob_write_uint32(ctx->blob, reg->num_components); in write_register()
442 blob_write_uint32(ctx->blob, reg->bit_size); in write_register()
443 blob_write_uint32(ctx->blob, reg->num_array_elems); in write_register()
444 blob_write_uint32(ctx->blob, reg->index); in write_register()
445 blob_write_uint32(ctx->blob, !ctx->strip && reg->name); in write_register()
447 blob_write_string(ctx->blob, reg->name); in write_register()
455 reg->num_components = blob_read_uint32(ctx->blob); in read_register()
456 reg->bit_size = blob_read_uint32(ctx->blob); in read_register()
457 reg->num_array_elems = blob_read_uint32(ctx->blob); in read_register()
458 reg->index = blob_read_uint32(ctx->blob); in read_register()
459 bool has_name = blob_read_uint32(ctx->blob); in read_register()
461 const char *name = blob_read_string(ctx->blob); in read_register()
477 blob_write_uint32(ctx->blob, exec_list_length(src)); in write_reg_list()
486 unsigned num_regs = blob_read_uint32(ctx->blob); in read_reg_list()
529 blob_write_uint32(ctx->blob, header.u32); in write_src_full()
533 blob_write_uint32(ctx->blob, header.u32); in write_src_full()
534 blob_write_uint32(ctx->blob, src->reg.base_offset); in write_src_full()
554 header.u32 = blob_read_uint32(ctx->blob); in read_src()
561 src->reg.base_offset = blob_read_uint32(ctx->blob); in read_src()
721 memcpy(&last_header, ctx->blob->data + ctx->last_alu_header_offset, in write_dest()
735 memcpy(ctx->blob->data + ctx->last_alu_header_offset, in write_dest()
743 ctx->last_alu_header_offset = ctx->blob->size; in write_dest()
744 blob_write_uint32(ctx->blob, header.u32); in write_dest()
747 blob_write_uint32(ctx->blob, header.u32); in write_dest()
752 blob_write_uint32(ctx->blob, dst->ssa.num_components); in write_dest()
757 blob_write_string(ctx->blob, dst->ssa.name); in write_dest()
759 blob_write_uint32(ctx->blob, write_lookup_object(ctx, dst->reg.reg)); in write_dest()
760 blob_write_uint32(ctx->blob, dst->reg.base_offset); in write_dest()
777 num_components = blob_read_uint32(ctx->blob); in read_dest()
780 char *name = dest.ssa.has_name ? blob_read_string(ctx->blob) : NULL; in read_dest()
785 dst->reg.base_offset = blob_read_uint32(ctx->blob); in read_dest()
860 blob_write_uint32(ctx->blob, alu->dest.write_mask); in write_alu()
867 blob_write_uint16(ctx->blob, idx); in write_alu()
899 blob_write_uint32(ctx->blob, value); in write_alu()
926 alu->dest.write_mask = blob_read_uint32(ctx->blob); in read_alu()
933 src->src.ssa = read_lookup_object(ctx, blob_read_uint16(ctx->blob)); in read_alu()
962 unsigned value = blob_read_uint32(ctx->blob); in read_alu()
1019 blob_write_uint32(ctx->blob, var_idx); in write_deref()
1024 blob_write_uint32(ctx->blob, deref->strct.index); in write_deref()
1030 blob_write_uint16(ctx->blob, in write_deref()
1032 blob_write_uint16(ctx->blob, in write_deref()
1042 blob_write_uint32(ctx->blob, deref->cast.ptr_stride); in write_deref()
1043 blob_write_uint32(ctx->blob, deref->cast.align_mul); in write_deref()
1044 blob_write_uint32(ctx->blob, deref->cast.align_offset); in write_deref()
1046 encode_type_to_blob(ctx->blob, deref->type); in write_deref()
1083 deref->strct.index = blob_read_uint32(ctx->blob); in read_deref()
1091 deref->parent.ssa = read_lookup_object(ctx, blob_read_uint16(ctx->blob)); in read_deref()
1093 deref->arr.index.ssa = read_lookup_object(ctx, blob_read_uint16(ctx->blob)); in read_deref()
1108 deref->cast.ptr_stride = blob_read_uint32(ctx->blob); in read_deref()
1109 deref->cast.align_mul = blob_read_uint32(ctx->blob); in read_deref()
1110 deref->cast.align_offset = blob_read_uint32(ctx->blob); in read_deref()
1114 deref->type = decode_type_from_blob(ctx->blob); in read_deref()
1184 blob_write_uint32(ctx->blob, header.u32); in write_intrinsic()
1193 blob_write_uint8(ctx->blob, intrin->const_index[i]); in write_intrinsic()
1197 blob_write_uint16(ctx->blob, intrin->const_index[i]); in write_intrinsic()
1201 blob_write_uint32(ctx->blob, intrin->const_index[i]); in write_intrinsic()
1251 intrin->const_index[i] = blob_read_uint8(ctx->blob); in read_intrinsic()
1255 intrin->const_index[i] = blob_read_uint16(ctx->blob); in read_intrinsic()
1259 intrin->const_index[i] = blob_read_uint32(ctx->blob); in read_intrinsic()
1321 blob_write_uint32(ctx->blob, header.u32); in write_load_const()
1326 blob_write_bytes(ctx->blob, lc->value, in write_load_const()
1332 blob_write_uint32(ctx->blob, lc->value[i].u32); in write_load_const()
1337 blob_write_uint16(ctx->blob, lc->value[i].u16); in write_load_const()
1343 blob_write_uint8(ctx->blob, lc->value[i].u8); in write_load_const()
1397 blob_copy_bytes(ctx->blob, lc->value, sizeof(*lc->value) * lc->def.num_components); in read_load_const()
1402 lc->value[i].u32 = blob_read_uint32(ctx->blob); in read_load_const()
1407 lc->value[i].u16 = blob_read_uint16(ctx->blob); in read_load_const()
1413 lc->value[i].u8 = blob_read_uint8(ctx->blob); in read_load_const()
1435 blob_write_uint32(ctx->blob, header.u32); in write_ssa_undef()
1481 blob_write_uint32(ctx->blob, tex->texture_index); in write_tex()
1482 blob_write_uint32(ctx->blob, tex->sampler_index); in write_tex()
1484 blob_write_bytes(ctx->blob, tex->tg4_offsets, sizeof(tex->tg4_offsets)); in write_tex()
1498 blob_write_uint32(ctx->blob, packed.u32); in write_tex()
1516 tex->texture_index = blob_read_uint32(ctx->blob); in read_tex()
1517 tex->sampler_index = blob_read_uint32(ctx->blob); in read_tex()
1519 blob_copy_bytes(ctx->blob, tex->tg4_offsets, sizeof(tex->tg4_offsets)); in read_tex()
1522 packed.u32 = blob_read_uint32(ctx->blob); in read_tex()
1559 size_t blob_offset = blob_reserve_uint32(ctx->blob); in write_phi()
1560 ASSERTED size_t blob_offset2 = blob_reserve_uint32(ctx->blob); in write_phi()
1575 uint32_t *blob_ptr = (uint32_t *)(ctx->blob->data + fixup->blob_offset); in write_fixup_phis()
1604 src->src.ssa = (nir_ssa_def *)(uintptr_t) blob_read_uint32(ctx->blob); in read_phi()
1605 src->pred = (nir_block *)(uintptr_t) blob_read_uint32(ctx->blob); in read_phi()
1653 blob_write_uint32(ctx->blob, header.u32); in write_jump()
1670 blob_write_uint32(ctx->blob, write_lookup_object(ctx, call->callee)); in write_call()
1720 blob_write_uint32(ctx->blob, instr->type); in write_instr()
1736 header.u32 = blob_read_uint32(ctx->blob); in read_instr()
1787 blob_write_uint32(ctx->blob, exec_list_length(&block->instr_list)); in write_block()
1809 unsigned num_instrs = blob_read_uint32(ctx->blob); in read_block()
1862 blob_write_uint32(ctx->blob, cf->type); in write_cf_node()
1882 nir_cf_node_type type = blob_read_uint32(ctx->blob); in read_cf_node()
1902 blob_write_uint32(ctx->blob, exec_list_length(cf_list)); in write_cf_list()
1911 uint32_t num_cf_nodes = blob_read_uint32(ctx->blob); in read_cf_list()
1919 blob_write_uint8(ctx->blob, fi->structured); in write_function_impl()
1923 blob_write_uint32(ctx->blob, fi->reg_alloc); in write_function_impl()
1935 fi->structured = blob_read_uint8(ctx->blob); in read_function_impl()
1939 fi->reg_alloc = blob_read_uint32(ctx->blob); in read_function_impl()
1957 blob_write_uint32(ctx->blob, flags); in write_function()
1959 blob_write_string(ctx->blob, fxn->name); in write_function()
1963 blob_write_uint32(ctx->blob, fxn->num_params); in write_function()
1968 blob_write_uint32(ctx->blob, val); in write_function()
1981 uint32_t flags = blob_read_uint32(ctx->blob); in read_function()
1983 char *name = has_name ? blob_read_string(ctx->blob) : NULL; in read_function()
1989 fxn->num_params = blob_read_uint32(ctx->blob); in read_function()
1992 uint32_t val = blob_read_uint32(ctx->blob); in read_function()
2010 nir_serialize(struct blob *blob, const nir_shader *nir, bool strip) in nir_serialize() argument
2014 ctx.blob = blob; in nir_serialize()
2019 size_t idx_size_offset = blob_reserve_uint32(blob); in nir_serialize()
2027 blob_write_uint32(blob, strings); in nir_serialize()
2029 blob_write_string(blob, info.name); in nir_serialize()
2031 blob_write_string(blob, info.label); in nir_serialize()
2033 blob_write_bytes(blob, (uint8_t *) &info, sizeof(info)); in nir_serialize()
2037 blob_write_uint32(blob, nir->num_inputs); in nir_serialize()
2038 blob_write_uint32(blob, nir->num_uniforms); in nir_serialize()
2039 blob_write_uint32(blob, nir->num_outputs); in nir_serialize()
2040 blob_write_uint32(blob, nir->shared_size); in nir_serialize()
2041 blob_write_uint32(blob, nir->scratch_size); in nir_serialize()
2043 blob_write_uint32(blob, exec_list_length(&nir->functions)); in nir_serialize()
2053 blob_write_uint32(blob, nir->constant_data_size); in nir_serialize()
2055 blob_write_bytes(blob, nir->constant_data, nir->constant_data_size); in nir_serialize()
2057 *(uint32_t *)(blob->data + idx_size_offset) = ctx.next_idx; in nir_serialize()
2066 struct blob_reader *blob) in nir_deserialize() argument
2069 ctx.blob = blob; in nir_deserialize()
2071 ctx.idx_table_len = blob_read_uint32(blob); in nir_deserialize()
2074 uint32_t strings = blob_read_uint32(blob); in nir_deserialize()
2075 char *name = (strings & 0x1) ? blob_read_string(blob) : NULL; in nir_deserialize()
2076 char *label = (strings & 0x2) ? blob_read_string(blob) : NULL; in nir_deserialize()
2079 blob_copy_bytes(blob, (uint8_t *) &info, sizeof(info)); in nir_deserialize()
2090 ctx.nir->num_inputs = blob_read_uint32(blob); in nir_deserialize()
2091 ctx.nir->num_uniforms = blob_read_uint32(blob); in nir_deserialize()
2092 ctx.nir->num_outputs = blob_read_uint32(blob); in nir_deserialize()
2093 ctx.nir->shared_size = blob_read_uint32(blob); in nir_deserialize()
2094 ctx.nir->scratch_size = blob_read_uint32(blob); in nir_deserialize()
2096 unsigned num_functions = blob_read_uint32(blob); in nir_deserialize()
2105 ctx.nir->constant_data_size = blob_read_uint32(blob); in nir_deserialize()
2109 blob_copy_bytes(blob, ctx.nir->constant_data, in nir_deserialize()
2123 struct blob writer; in nir_shader_serialize_deserialize()