• Home
  • Raw
  • Download

Lines Matching full:info

106 scan_src_operand(struct tgsi_shader_info *info,  in scan_src_operand()  argument
119 for (ind = 0; ind < info->num_inputs; ++ind) { in scan_src_operand()
120 info->input_usage_mask[ind] |= usage_mask; in scan_src_operand()
125 info->input_usage_mask[ind] |= usage_mask; in scan_src_operand()
128 if (info->processor == PIPE_SHADER_FRAGMENT) { in scan_src_operand()
132 input = info->input_array_first[src->Indirect.ArrayID]; in scan_src_operand()
136 name = info->input_semantic_name[input]; in scan_src_operand()
137 index = info->input_semantic_index[input]; in scan_src_operand()
144 info->reads_z = TRUE; in scan_src_operand()
153 info->colors_read |= mask << (index * 4); in scan_src_operand()
168 switch (info->input_interpolate[input]) { in scan_src_operand()
171 switch (info->input_interpolate_loc[input]) { in scan_src_operand()
173 info->uses_persp_center = TRUE; in scan_src_operand()
176 info->uses_persp_centroid = TRUE; in scan_src_operand()
179 info->uses_persp_sample = TRUE; in scan_src_operand()
184 switch (info->input_interpolate_loc[input]) { in scan_src_operand()
186 info->uses_linear_center = TRUE; in scan_src_operand()
189 info->uses_linear_centroid = TRUE; in scan_src_operand()
192 info->uses_linear_sample = TRUE; in scan_src_operand()
204 info->indirect_files |= (1 << src->Register.File); in scan_src_operand()
205 info->indirect_files_read |= (1 << src->Register.File); in scan_src_operand()
211 info->const_buffers_indirect = info->const_buffers_declared; in scan_src_operand()
213 info->const_buffers_indirect |= 1u << src->Dimension.Index; in scan_src_operand()
215 info->const_buffers_indirect |= 1; in scan_src_operand()
221 info->dim_indirect_files |= 1u << src->Register.File; in scan_src_operand()
228 assert(index < ARRAY_SIZE(info->is_msaa_sampler)); in scan_src_operand()
238 if (info->sampler_targets[index] == TGSI_TEXTURE_UNKNOWN) { in scan_src_operand()
240 info->sampler_targets[index] = target; in scan_src_operand()
242 /* Make sure the texture instruction's sampler/target info in scan_src_operand()
245 assert(info->sampler_targets[index] == target); in scan_src_operand()
250 info->is_msaa_sampler[src->Register.Index] = TRUE; in scan_src_operand()
260 info->writes_memory = TRUE; in scan_src_operand()
264 info->images_writemask = info->images_declared; in scan_src_operand()
266 info->images_writemask |= 1 << src->Register.Index; in scan_src_operand()
269 info->shader_buffers_atomic = info->shader_buffers_declared; in scan_src_operand()
271 info->shader_buffers_atomic |= 1 << src->Register.Index; in scan_src_operand()
276 info->shader_buffers_load = info->shader_buffers_declared; in scan_src_operand()
278 info->shader_buffers_load |= 1 << src->Register.Index; in scan_src_operand()
286 scan_instruction(struct tgsi_shader_info *info, in scan_instruction() argument
295 info->opcode_count[fullinst->Instruction.Opcode]++; in scan_instruction()
302 info->max_depth = MAX2(info->max_depth, *current_depth); in scan_instruction()
321 input = info->input_array_first[src0->Indirect.ArrayID]; in scan_instruction()
328 switch (info->input_interpolate[input]) { in scan_instruction()
334 info->uses_persp_opcode_interp_centroid = TRUE; in scan_instruction()
337 info->uses_persp_opcode_interp_offset = TRUE; in scan_instruction()
340 info->uses_persp_opcode_interp_sample = TRUE; in scan_instruction()
348 info->uses_linear_opcode_interp_centroid = TRUE; in scan_instruction()
351 info->uses_linear_opcode_interp_offset = TRUE; in scan_instruction()
354 info->uses_linear_opcode_interp_sample = TRUE; in scan_instruction()
363 info->uses_doubles = TRUE; in scan_instruction()
366 scan_src_operand(info, fullinst, &fullinst->Src[i], i, in scan_instruction()
382 scan_src_operand(info, fullinst, &src, 0, TGSI_WRITEMASK_XYZ, in scan_instruction()
391 info->indirect_files |= (1 << dst->Register.File); in scan_instruction()
392 info->indirect_files_written |= (1 << dst->Register.File); in scan_instruction()
396 info->dim_indirect_files |= 1u << dst->Register.File; in scan_instruction()
402 info->writes_memory = TRUE; in scan_instruction()
406 info->images_writemask = info->images_declared; in scan_instruction()
408 info->images_writemask |= 1 << dst->Register.Index; in scan_instruction()
411 info->shader_buffers_store = info->shader_buffers_declared; in scan_instruction()
413 info->shader_buffers_store |= 1 << dst->Register.Index; in scan_instruction()
419 info->num_memory_instructions++; in scan_instruction()
422 info->uses_derivatives = true; in scan_instruction()
424 info->num_instructions++; in scan_instruction()
429 scan_declaration(struct tgsi_shader_info *info, in scan_declaration() argument
433 const unsigned procType = info->processor; in scan_declaration()
441 assert(array_id < ARRAY_SIZE(info->input_array_first)); in scan_declaration()
442 info->input_array_first[array_id] = fulldecl->Range.First; in scan_declaration()
443 info->input_array_last[array_id] = fulldecl->Range.Last; in scan_declaration()
446 assert(array_id < ARRAY_SIZE(info->output_array_first)); in scan_declaration()
447 info->output_array_first[array_id] = fulldecl->Range.First; in scan_declaration()
448 info->output_array_last[array_id] = fulldecl->Range.Last; in scan_declaration()
451 info->array_max[file] = MAX2(info->array_max[file], array_id); in scan_declaration()
462 info->file_mask[file] |= (1 << reg); in scan_declaration()
463 info->file_count[file]++; in scan_declaration()
464 info->file_max[file] = MAX2(info->file_max[file], (int)reg); in scan_declaration()
473 info->const_file_max[buffer] = in scan_declaration()
474 MAX2(info->const_file_max[buffer], (int)reg); in scan_declaration()
475 info->const_buffers_declared |= 1u << buffer; in scan_declaration()
479 info->images_declared |= 1u << reg; in scan_declaration()
481 info->images_buffers |= 1 << reg; in scan_declaration()
485 info->shader_buffers_declared |= 1u << reg; in scan_declaration()
489 info->input_semantic_name[reg] = (ubyte) semName; in scan_declaration()
490 info->input_semantic_index[reg] = (ubyte) semIndex; in scan_declaration()
491 info->input_interpolate[reg] = (ubyte)fulldecl->Interp.Interpolate; in scan_declaration()
492 info->input_interpolate_loc[reg] = (ubyte)fulldecl->Interp.Location; in scan_declaration()
493 info->input_cylindrical_wrap[reg] = (ubyte)fulldecl->Interp.CylindricalWrap; in scan_declaration()
496 info->num_inputs = MAX2(info->num_inputs, reg + 1); in scan_declaration()
499 info->uses_primid = TRUE; in scan_declaration()
502 info->reads_position = TRUE; in scan_declaration()
504 info->uses_frontface = TRUE; in scan_declaration()
511 info->system_value_semantic_name[index] = semName; in scan_declaration()
512 info->num_system_values = MAX2(info->num_system_values, index + 1); in scan_declaration()
516 info->uses_instanceid = TRUE; in scan_declaration()
519 info->uses_vertexid = TRUE; in scan_declaration()
522 info->uses_vertexid_nobase = TRUE; in scan_declaration()
525 info->uses_basevertex = TRUE; in scan_declaration()
528 info->uses_primid = TRUE; in scan_declaration()
531 info->uses_invocationid = TRUE; in scan_declaration()
534 info->reads_position = TRUE; in scan_declaration()
537 info->uses_frontface = TRUE; in scan_declaration()
540 info->reads_samplemask = TRUE; in scan_declaration()
546 info->output_semantic_name[reg] = (ubyte) semName; in scan_declaration()
547 info->output_semantic_index[reg] = (ubyte) semIndex; in scan_declaration()
548 info->output_usagemask[reg] |= fulldecl->Declaration.UsageMask; in scan_declaration()
549 info->num_outputs = MAX2(info->num_outputs, reg + 1); in scan_declaration()
552 info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamX; in scan_declaration()
553 info->num_stream_output_components[fulldecl->Semantic.StreamX]++; in scan_declaration()
556 info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamY << 2; in scan_declaration()
557 info->num_stream_output_components[fulldecl->Semantic.StreamY]++; in scan_declaration()
560 info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamZ << 4; in scan_declaration()
561 info->num_stream_output_components[fulldecl->Semantic.StreamZ]++; in scan_declaration()
564 info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamW << 6; in scan_declaration()
565 info->num_stream_output_components[fulldecl->Semantic.StreamW]++; in scan_declaration()
570 info->writes_primid = true; in scan_declaration()
573 info->writes_viewport_index = true; in scan_declaration()
576 info->writes_layer = true; in scan_declaration()
579 info->writes_psize = true; in scan_declaration()
582 info->writes_clipvertex = true; in scan_declaration()
585 info->colors_written |= 1 << semIndex; in scan_declaration()
588 info->writes_stencil = true; in scan_declaration()
591 info->writes_samplemask = true; in scan_declaration()
594 info->writes_edgeflag = true; in scan_declaration()
598 info->writes_z = true; in scan_declaration()
600 info->writes_position = true; in scan_declaration()
606 STATIC_ASSERT(sizeof(info->samplers_declared) * 8 >= PIPE_MAX_SAMPLERS); in scan_declaration()
607 info->samplers_declared |= 1u << reg; in scan_declaration()
615 if (info->sampler_targets[reg] == TGSI_TEXTURE_UNKNOWN) { in scan_declaration()
617 info->sampler_targets[reg] = target; in scan_declaration()
618 info->sampler_type[reg] = type; in scan_declaration()
621 assert(info->sampler_targets[reg] == target); in scan_declaration()
622 assert(info->sampler_type[reg] == type); in scan_declaration()
631 scan_immediate(struct tgsi_shader_info *info) in scan_immediate() argument
633 uint reg = info->immediate_count++; in scan_immediate()
636 info->file_mask[file] |= (1 << reg); in scan_immediate()
637 info->file_count[file]++; in scan_immediate()
638 info->file_max[file] = MAX2(info->file_max[file], (int)reg); in scan_immediate()
643 scan_property(struct tgsi_shader_info *info, in scan_property() argument
649 assert(name < ARRAY_SIZE(info->properties)); in scan_property()
650 info->properties[name] = value; in scan_property()
654 info->num_written_clipdistance = value; in scan_property()
655 info->clipdist_writemask |= (1 << value) - 1; in scan_property()
658 info->num_written_culldistance = value; in scan_property()
659 info->culldist_writemask |= (1 << value) - 1; in scan_property()
668 * \return info the result of the scan
672 struct tgsi_shader_info *info) in tgsi_scan_shader() argument
678 memset(info, 0, sizeof(*info)); in tgsi_scan_shader()
680 info->file_max[i] = -1; in tgsi_scan_shader()
681 for (i = 0; i < ARRAY_SIZE(info->const_file_max); i++) in tgsi_scan_shader()
682 info->const_file_max[i] = -1; in tgsi_scan_shader()
683 info->properties[TGSI_PROPERTY_GS_INVOCATIONS] = 1; in tgsi_scan_shader()
684 for (i = 0; i < ARRAY_SIZE(info->sampler_targets); i++) in tgsi_scan_shader()
685 info->sampler_targets[i] = TGSI_TEXTURE_UNKNOWN; in tgsi_scan_shader()
701 info->processor = procType; in tgsi_scan_shader()
707 info->num_tokens++; in tgsi_scan_shader()
713 scan_instruction(info, &parse.FullToken.FullInstruction, in tgsi_scan_shader()
717 scan_declaration(info, &parse.FullToken.FullDeclaration); in tgsi_scan_shader()
720 scan_immediate(info); in tgsi_scan_shader()
723 scan_property(info, &parse.FullToken.FullProperty); in tgsi_scan_shader()
730 info->uses_kill = (info->opcode_count[TGSI_OPCODE_KILL_IF] || in tgsi_scan_shader()
731 info->opcode_count[TGSI_OPCODE_KILL]); in tgsi_scan_shader()
738 info->properties[TGSI_PROPERTY_GS_INPUT_PRIM]; in tgsi_scan_shader()
741 info->file_count[TGSI_FILE_INPUT] = num_verts; in tgsi_scan_shader()
742 info->file_max[TGSI_FILE_INPUT] = in tgsi_scan_shader()
743 MAX2(info->file_max[TGSI_FILE_INPUT], num_verts - 1); in tgsi_scan_shader()
745 info->file_mask[TGSI_FILE_INPUT] |= (1 << j); in tgsi_scan_shader()
759 * @param arrays info for array of each ID will be written to arrays[ID - 1].