• Home
  • Raw
  • Download

Lines Matching full:info

106 scan_src_operand(struct tgsi_shader_info *info,  in scan_src_operand()  argument
116 if (info->processor == PIPE_SHADER_COMPUTE && in scan_src_operand()
120 name = info->system_value_semantic_name[src->Register.Index]; in scan_src_operand()
130 info->uses_thread_id[i] = true; in scan_src_operand()
132 info->uses_block_id[i] = true; in scan_src_operand()
137 if (info->properties[TGSI_PROPERTY_CS_FIXED_BLOCK_WIDTH] == 0) in scan_src_operand()
138 info->uses_block_size = true; in scan_src_operand()
141 info->uses_grid_size = true; in scan_src_operand()
149 for (ind = 0; ind < info->num_inputs; ++ind) { in scan_src_operand()
150 info->input_usage_mask[ind] |= usage_mask_after_swizzle; in scan_src_operand()
155 info->input_usage_mask[ind] |= usage_mask_after_swizzle; in scan_src_operand()
158 if (info->processor == PIPE_SHADER_FRAGMENT) { in scan_src_operand()
162 input = info->input_array_first[src->Indirect.ArrayID]; in scan_src_operand()
166 name = info->input_semantic_name[input]; in scan_src_operand()
167 index = info->input_semantic_index[input]; in scan_src_operand()
171 info->reads_z = true; in scan_src_operand()
174 info->colors_read |= usage_mask_after_swizzle << (index * 4); in scan_src_operand()
188 switch (info->input_interpolate[input]) { in scan_src_operand()
191 switch (info->input_interpolate_loc[input]) { in scan_src_operand()
193 info->uses_persp_center = TRUE; in scan_src_operand()
196 info->uses_persp_centroid = TRUE; in scan_src_operand()
199 info->uses_persp_sample = TRUE; in scan_src_operand()
204 switch (info->input_interpolate_loc[input]) { in scan_src_operand()
206 info->uses_linear_center = TRUE; in scan_src_operand()
209 info->uses_linear_centroid = TRUE; in scan_src_operand()
212 info->uses_linear_sample = TRUE; in scan_src_operand()
222 if (info->processor == PIPE_SHADER_TESS_CTRL && in scan_src_operand()
227 input = info->output_array_first[src->Indirect.ArrayID]; in scan_src_operand()
231 switch (info->output_semantic_name[input]) { in scan_src_operand()
233 info->reads_perpatch_outputs = true; in scan_src_operand()
237 info->reads_tessfactor_outputs = true; in scan_src_operand()
240 info->reads_pervertex_outputs = true; in scan_src_operand()
246 info->indirect_files |= (1 << src->Register.File); in scan_src_operand()
247 info->indirect_files_read |= (1 << src->Register.File); in scan_src_operand()
253 info->const_buffers_indirect = info->const_buffers_declared; in scan_src_operand()
255 info->const_buffers_indirect |= 1u << src->Dimension.Index; in scan_src_operand()
257 info->const_buffers_indirect |= 1; in scan_src_operand()
263 info->dim_indirect_files |= 1u << src->Register.File; in scan_src_operand()
270 assert(index < ARRAY_SIZE(info->is_msaa_sampler)); in scan_src_operand()
280 if (info->sampler_targets[index] == TGSI_TEXTURE_UNKNOWN) { in scan_src_operand()
282 info->sampler_targets[index] = target; in scan_src_operand()
284 /* Make sure the texture instruction's sampler/target info in scan_src_operand()
287 assert(info->sampler_targets[index] == target); in scan_src_operand()
292 info->is_msaa_sampler[src->Register.Index] = TRUE; in scan_src_operand()
302 info->writes_memory = TRUE; in scan_src_operand()
306 info->images_atomic = info->images_declared; in scan_src_operand()
308 info->images_atomic |= 1 << src->Register.Index; in scan_src_operand()
311 info->shader_buffers_atomic = info->shader_buffers_declared; in scan_src_operand()
313 info->shader_buffers_atomic |= 1 << src->Register.Index; in scan_src_operand()
318 info->images_load = info->images_declared; in scan_src_operand()
320 info->images_load |= 1 << src->Register.Index; in scan_src_operand()
323 info->shader_buffers_load = info->shader_buffers_declared; in scan_src_operand()
325 info->shader_buffers_load |= 1 << src->Register.Index; in scan_src_operand()
333 scan_instruction(struct tgsi_shader_info *info, in scan_instruction() argument
343 info->opcode_count[fullinst->Instruction.Opcode]++; in scan_instruction()
350 info->max_depth = MAX2(info->max_depth, *current_depth); in scan_instruction()
373 info->uses_bindless_samplers = true; in scan_instruction()
388 info->uses_bindless_images = true; in scan_instruction()
392 info->uses_bindless_images = true; in scan_instruction()
407 input = info->input_array_first[src0->Indirect.ArrayID]; in scan_instruction()
414 switch (info->input_interpolate[input]) { in scan_instruction()
420 info->uses_persp_opcode_interp_centroid = TRUE; in scan_instruction()
423 info->uses_persp_opcode_interp_offset = TRUE; in scan_instruction()
426 info->uses_persp_opcode_interp_sample = TRUE; in scan_instruction()
434 info->uses_linear_opcode_interp_centroid = TRUE; in scan_instruction()
437 info->uses_linear_opcode_interp_offset = TRUE; in scan_instruction()
440 info->uses_linear_opcode_interp_sample = TRUE; in scan_instruction()
455 info->uses_doubles = TRUE; in scan_instruction()
458 scan_src_operand(info, fullinst, &fullinst->Src[i], i, in scan_instruction()
468 scan_src_operand(info, fullinst, &src, -1, in scan_instruction()
480 scan_src_operand(info, fullinst, &src, -1, in scan_instruction()
494 scan_src_operand(info, fullinst, &src, -1, in scan_instruction()
512 scan_src_operand(info, fullinst, &src, -1, in scan_instruction()
515 info->indirect_files |= (1 << dst->Register.File); in scan_instruction()
516 info->indirect_files_written |= (1 << dst->Register.File); in scan_instruction()
525 scan_src_operand(info, fullinst, &src, -1, in scan_instruction()
528 info->dim_indirect_files |= 1u << dst->Register.File; in scan_instruction()
535 info->writes_memory = TRUE; in scan_instruction()
539 info->images_store = info->images_declared; in scan_instruction()
541 info->images_store |= 1 << dst->Register.Index; in scan_instruction()
544 info->shader_buffers_store = info->shader_buffers_declared; in scan_instruction()
546 info->shader_buffers_store |= 1 << dst->Register.Index; in scan_instruction()
552 info->num_memory_instructions++; in scan_instruction()
555 info->uses_derivatives = true; in scan_instruction()
557 info->num_instructions++; in scan_instruction()
562 scan_declaration(struct tgsi_shader_info *info, in scan_declaration() argument
566 const unsigned procType = info->processor; in scan_declaration()
574 assert(array_id < ARRAY_SIZE(info->input_array_first)); in scan_declaration()
575 info->input_array_first[array_id] = fulldecl->Range.First; in scan_declaration()
576 info->input_array_last[array_id] = fulldecl->Range.Last; in scan_declaration()
579 assert(array_id < ARRAY_SIZE(info->output_array_first)); in scan_declaration()
580 info->output_array_first[array_id] = fulldecl->Range.First; in scan_declaration()
581 info->output_array_last[array_id] = fulldecl->Range.Last; in scan_declaration()
584 info->array_max[file] = MAX2(info->array_max[file], array_id); in scan_declaration()
595 info->file_mask[file] |= (1 << reg); in scan_declaration()
596 info->file_count[file]++; in scan_declaration()
597 info->file_max[file] = MAX2(info->file_max[file], (int)reg); in scan_declaration()
606 info->const_file_max[buffer] = in scan_declaration()
607 MAX2(info->const_file_max[buffer], (int)reg); in scan_declaration()
608 info->const_buffers_declared |= 1u << buffer; in scan_declaration()
612 info->images_declared |= 1u << reg; in scan_declaration()
614 info->images_buffers |= 1 << reg; in scan_declaration()
618 info->shader_buffers_declared |= 1u << reg; in scan_declaration()
622 info->input_semantic_name[reg] = (ubyte) semName; in scan_declaration()
623 info->input_semantic_index[reg] = (ubyte) semIndex; in scan_declaration()
624 info->input_interpolate[reg] = (ubyte)fulldecl->Interp.Interpolate; in scan_declaration()
625 info->input_interpolate_loc[reg] = (ubyte)fulldecl->Interp.Location; in scan_declaration()
626 info->input_cylindrical_wrap[reg] = (ubyte)fulldecl->Interp.CylindricalWrap; in scan_declaration()
629 info->num_inputs = MAX2(info->num_inputs, reg + 1); in scan_declaration()
633 info->uses_primid = true; in scan_declaration()
636 info->reads_position = true; in scan_declaration()
639 info->uses_frontface = true; in scan_declaration()
647 info->system_value_semantic_name[index] = semName; in scan_declaration()
648 info->num_system_values = MAX2(info->num_system_values, index + 1); in scan_declaration()
652 info->uses_instanceid = TRUE; in scan_declaration()
655 info->uses_vertexid = TRUE; in scan_declaration()
658 info->uses_vertexid_nobase = TRUE; in scan_declaration()
661 info->uses_basevertex = TRUE; in scan_declaration()
664 info->uses_primid = TRUE; in scan_declaration()
667 info->uses_invocationid = TRUE; in scan_declaration()
670 info->reads_position = TRUE; in scan_declaration()
673 info->uses_frontface = TRUE; in scan_declaration()
676 info->reads_samplemask = TRUE; in scan_declaration()
680 info->reads_tess_factors = true; in scan_declaration()
686 info->output_semantic_name[reg] = (ubyte) semName; in scan_declaration()
687 info->output_semantic_index[reg] = (ubyte) semIndex; in scan_declaration()
688 info->output_usagemask[reg] |= fulldecl->Declaration.UsageMask; in scan_declaration()
689 info->num_outputs = MAX2(info->num_outputs, reg + 1); in scan_declaration()
692 info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamX; in scan_declaration()
693 info->num_stream_output_components[fulldecl->Semantic.StreamX]++; in scan_declaration()
696 info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamY << 2; in scan_declaration()
697 info->num_stream_output_components[fulldecl->Semantic.StreamY]++; in scan_declaration()
700 info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamZ << 4; in scan_declaration()
701 info->num_stream_output_components[fulldecl->Semantic.StreamZ]++; in scan_declaration()
704 info->output_streams[reg] |= (ubyte)fulldecl->Semantic.StreamW << 6; in scan_declaration()
705 info->num_stream_output_components[fulldecl->Semantic.StreamW]++; in scan_declaration()
710 info->writes_primid = true; in scan_declaration()
713 info->writes_viewport_index = true; in scan_declaration()
716 info->writes_layer = true; in scan_declaration()
719 info->writes_psize = true; in scan_declaration()
722 info->writes_clipvertex = true; in scan_declaration()
725 info->colors_written |= 1 << semIndex; in scan_declaration()
728 info->writes_stencil = true; in scan_declaration()
731 info->writes_samplemask = true; in scan_declaration()
734 info->writes_edgeflag = true; in scan_declaration()
738 info->writes_z = true; in scan_declaration()
740 info->writes_position = true; in scan_declaration()
746 STATIC_ASSERT(sizeof(info->samplers_declared) * 8 >= PIPE_MAX_SAMPLERS); in scan_declaration()
747 info->samplers_declared |= 1u << reg; in scan_declaration()
755 if (info->sampler_targets[reg] == TGSI_TEXTURE_UNKNOWN) { in scan_declaration()
757 info->sampler_targets[reg] = target; in scan_declaration()
758 info->sampler_type[reg] = type; in scan_declaration()
761 assert(info->sampler_targets[reg] == target); in scan_declaration()
762 assert(info->sampler_type[reg] == type); in scan_declaration()
771 scan_immediate(struct tgsi_shader_info *info) in scan_immediate() argument
773 uint reg = info->immediate_count++; in scan_immediate()
776 info->file_mask[file] |= (1 << reg); in scan_immediate()
777 info->file_count[file]++; in scan_immediate()
778 info->file_max[file] = MAX2(info->file_max[file], (int)reg); in scan_immediate()
783 scan_property(struct tgsi_shader_info *info, in scan_property() argument
789 assert(name < ARRAY_SIZE(info->properties)); in scan_property()
790 info->properties[name] = value; in scan_property()
794 info->num_written_clipdistance = value; in scan_property()
795 info->clipdist_writemask |= (1 << value) - 1; in scan_property()
798 info->num_written_culldistance = value; in scan_property()
799 info->culldist_writemask |= (1 << value) - 1; in scan_property()
808 * \return info the result of the scan
812 struct tgsi_shader_info *info) in tgsi_scan_shader() argument
818 memset(info, 0, sizeof(*info)); in tgsi_scan_shader()
820 info->file_max[i] = -1; in tgsi_scan_shader()
821 for (i = 0; i < ARRAY_SIZE(info->const_file_max); i++) in tgsi_scan_shader()
822 info->const_file_max[i] = -1; in tgsi_scan_shader()
823 info->properties[TGSI_PROPERTY_GS_INVOCATIONS] = 1; in tgsi_scan_shader()
824 for (i = 0; i < ARRAY_SIZE(info->sampler_targets); i++) in tgsi_scan_shader()
825 info->sampler_targets[i] = TGSI_TEXTURE_UNKNOWN; in tgsi_scan_shader()
841 info->processor = procType; in tgsi_scan_shader()
847 info->num_tokens++; in tgsi_scan_shader()
853 scan_instruction(info, &parse.FullToken.FullInstruction, in tgsi_scan_shader()
857 scan_declaration(info, &parse.FullToken.FullDeclaration); in tgsi_scan_shader()
860 scan_immediate(info); in tgsi_scan_shader()
863 scan_property(info, &parse.FullToken.FullProperty); in tgsi_scan_shader()
870 info->uses_kill = (info->opcode_count[TGSI_OPCODE_KILL_IF] || in tgsi_scan_shader()
871 info->opcode_count[TGSI_OPCODE_KILL]); in tgsi_scan_shader()
878 info->properties[TGSI_PROPERTY_GS_INPUT_PRIM]; in tgsi_scan_shader()
881 info->file_count[TGSI_FILE_INPUT] = num_verts; in tgsi_scan_shader()
882 info->file_max[TGSI_FILE_INPUT] = in tgsi_scan_shader()
883 MAX2(info->file_max[TGSI_FILE_INPUT], num_verts - 1); in tgsi_scan_shader()
885 info->file_mask[TGSI_FILE_INPUT] |= (1 << j); in tgsi_scan_shader()
899 * @param arrays info for array of each ID will be written to arrays[ID - 1].
981 get_inst_tessfactor_writemask(const struct tgsi_shader_info *info, in get_inst_tessfactor_writemask() argument
991 unsigned name = info->output_semantic_name[dst->Register.Index]; in get_inst_tessfactor_writemask()
1003 get_block_tessfactor_writemask(const struct tgsi_shader_info *info, in get_block_tessfactor_writemask() argument
1021 get_block_tessfactor_writemask(info, parse, TGSI_OPCODE_ENDIF); in get_block_tessfactor_writemask()
1026 get_block_tessfactor_writemask(info, parse, TGSI_OPCODE_ENDLOOP); in get_block_tessfactor_writemask()
1034 writemask |= get_inst_tessfactor_writemask(info, inst); in get_block_tessfactor_writemask()
1041 get_if_block_tessfactor_writemask(const struct tgsi_shader_info *info, in get_if_block_tessfactor_writemask() argument
1065 get_if_block_tessfactor_writemask(info, parse, in get_if_block_tessfactor_writemask()
1073 get_block_tessfactor_writemask(info, parse, TGSI_OPCODE_ENDLOOP); in get_if_block_tessfactor_writemask()
1082 unsigned writemask = get_inst_tessfactor_writemask(info, inst); in get_if_block_tessfactor_writemask()
1104 const struct tgsi_shader_info *info, in tgsi_scan_tess_ctrl() argument
1109 if (info->processor != PIPE_SHADER_TESS_CTRL) in tgsi_scan_tess_ctrl()
1146 get_if_block_tessfactor_writemask(info, &parse, in tgsi_scan_tess_ctrl()
1153 get_block_tessfactor_writemask(info, &parse, TGSI_OPCODE_ENDIF); in tgsi_scan_tess_ctrl()
1179 main_block_tf_writemask |= get_inst_tessfactor_writemask(info, inst); in tgsi_scan_tess_ctrl()