Lines Matching defs:info
121 get_additional_semantic_info(nir_shader *s, nir_variable *var, struct semantic_info *info,
125 if (nir_is_arrayed_io(var, s->info.stage))
128 info->comp_type =
131 bool is_depth = is_depth_output(info->kind);
134 info->sig_comp_type = dxil_get_comp_type(type);
136 info->sig_comp_type = DXIL_COMP_TYPE_U32;
137 info->comp_type = DXIL_PROG_SIG_COMP_TYPE_UINT32;
139 info->sig_comp_type = DXIL_COMP_TYPE_F32;
140 info->comp_type = DXIL_PROG_SIG_COMP_TYPE_FLOAT32;
143 bool is_gs_input = s->info.stage == MESA_SHADER_GEOMETRY &&
146 info->stream = var->data.stream;
147 info->rows = 1;
148 if (info->kind == DXIL_SEM_TARGET) {
149 info->start_row = info->index;
150 info->cols = (uint8_t)glsl_get_components(type);
152 (info->kind == DXIL_SEM_PRIMITIVE_ID && is_gs_input) ||
153 info->kind == DXIL_SEM_COVERAGE ||
154 info->kind == DXIL_SEM_SAMPLE_INDEX) {
156 info->start_row = -1;
157 info->cols = 1;
158 } else if (info->kind == DXIL_SEM_TESS_FACTOR ||
159 info->kind == DXIL_SEM_INSIDE_TESS_FACTOR) {
161 info->start_row = next_row;
162 info->rows = glsl_get_aoa_size(type);
163 info->cols = 1;
164 next_row += info->rows;
167 info->start_row = next_row - 1;
169 info->start_row = next_row;
173 assert(glsl_type_is_array(type) && info->kind == DXIL_SEM_CLIP_DISTANCE);
179 info->kind = DXIL_SEM_CULL_DISTANCE;
180 snprintf(info->name, 64, "SV_CullDistance");
182 info->cols = num_floats;
183 info->start_col = (uint8_t)var->data.location_frac;
185 info->start_row = next_row;
186 info->rows = glsl_count_vec4_slots(type, false, false);
189 next_row += info->rows;
190 info->start_col = (uint8_t)var->data.location_frac;
191 info->cols = MIN2(glsl_get_component_slots(type), 4);
197 typedef void (*semantic_info_proc)(nir_variable *var, struct semantic_info *info, gl_shader_stage stage);
200 get_semantic_vs_in_name(nir_variable *var, struct semantic_info *info, gl_shader_stage stage)
202 strcpy(info->name, "TEXCOORD");
203 info->index = var->data.driver_location;
204 info->kind = DXIL_SEM_ARBITRARY;
208 get_semantic_sv_name(nir_variable *var, struct semantic_info *info, gl_shader_stage stage)
211 info->interpolation = get_interpolation(var);
215 info->kind = DXIL_SEM_VERTEX_ID;
218 info->kind = DXIL_SEM_IS_FRONT_FACE;
221 info->kind = DXIL_SEM_INSTANCE_ID;
224 info->kind = DXIL_SEM_PRIMITIVE_ID;
227 info->kind = DXIL_SEM_SAMPLE_INDEX;
232 strncpy(info->name, var->name, ARRAY_SIZE(info->name) - 1);
236 get_semantic_ps_outname(nir_variable *var, struct semantic_info *info)
238 info->kind = DXIL_SEM_INVALID;
241 snprintf(info->name, 64, "%s", "SV_Target");
242 info->index = var->data.index;
243 info->kind = DXIL_SEM_TARGET;
253 snprintf(info->name, 64, "%s", "SV_Target");
254 info->index = var->data.location - FRAG_RESULT_DATA0;
257 info->index = var->data.index;
258 info->kind = DXIL_SEM_TARGET;
261 snprintf(info->name, 64, "%s", "SV_Depth");
262 info->kind = DXIL_SEM_DEPTH;
265 snprintf(info->name, 64, "%s", "SV_StencilRef");
266 info->kind = DXIL_SEM_STENCIL_REF; //??
269 snprintf(info->name, 64, "%s", "SV_Coverage");
270 info->kind = DXIL_SEM_COVERAGE; //??
273 snprintf(info->name, 64, "%s", "UNDEFINED");
279 get_semantic_name(nir_variable *var, struct semantic_info *info,
282 info->kind = DXIL_SEM_INVALID;
283 info->interpolation = get_interpolation(var);
288 snprintf(info->name, 64, "%s", "SV_Position");
289 info->kind = DXIL_SEM_POSITION;
294 snprintf(info->name, 64, "%s", "SV_IsFrontFace");
295 info->kind = DXIL_SEM_IS_FRONT_FACE;
300 snprintf(info->name, 64, "%s", "SV_PrimitiveID");
301 info->kind = DXIL_SEM_PRIMITIVE_ID;
305 info->index = 1;
308 assert(var->data.location == VARYING_SLOT_CLIP_DIST1 || info->index == 0);
309 snprintf(info->name, 64, "%s", "SV_ClipDistance");
310 info->kind = DXIL_SEM_CLIP_DISTANCE;
315 snprintf(info->name, 64, "%s", "SV_InsideTessFactor");
316 info->kind = DXIL_SEM_INSIDE_TESS_FACTOR;
321 snprintf(info->name, 64, "%s", "SV_TessFactor");
322 info->kind = DXIL_SEM_TESS_FACTOR;
327 snprintf(info->name, 64, "%s", "SV_ViewportArrayIndex");
328 info->kind = DXIL_SEM_VIEWPORT_ARRAY_INDEX;
333 snprintf(info->name, 64, "%s", "SV_RenderTargetArrayIndex");
334 info->kind = DXIL_SEM_RENDERTARGET_ARRAY_INDEX;
338 info->index = var->data.driver_location;
339 strcpy(info->name, "TEXCOORD");
340 info->kind = DXIL_SEM_ARBITRARY;
346 get_semantic_in_name(nir_variable *var, struct semantic_info *info, gl_shader_stage stage)
353 get_semantic_name(var, info, type);
354 info->sysvalue_name = in_sysvalue_name(var);
574 get_semantics(var, &semantic, s->info.stage);
597 if (s->info.stage == MESA_SHADER_KERNEL)
603 s->info.stage == MESA_SHADER_VERTEX ?
641 if (s->info.stage == MESA_SHADER_FRAGMENT) {
646 if (nir_is_arrayed_io(var, s->info.stage))
651 next_row = get_additional_semantic_info(s, var, &semantic, next_row, s->info.clip_distance_array_size);
653 mod->info.has_out_position |= semantic.kind== DXIL_SEM_POSITION;
654 mod->info.has_out_depth |= semantic.kind == DXIL_SEM_DEPTH;
714 if (s->info.stage != MESA_SHADER_TESS_CTRL &&
715 s->info.stage != MESA_SHADER_TESS_EVAL)
718 nir_variable_mode mode = s->info.stage == MESA_SHADER_TESS_CTRL ?