Lines Matching full:info
37 nv50_vertprog_assign_slots(struct nv50_ir_prog_info *info) in nv50_vertprog_assign_slots() argument
39 struct nv50_program *prog = (struct nv50_program *)info->driverPriv; in nv50_vertprog_assign_slots()
43 for (i = 0; i < info->numInputs; ++i) { in nv50_vertprog_assign_slots()
45 prog->in[i].sn = info->in[i].sn; in nv50_vertprog_assign_slots()
46 prog->in[i].si = info->in[i].si; in nv50_vertprog_assign_slots()
48 prog->in[i].mask = info->in[i].mask; in nv50_vertprog_assign_slots()
50 prog->vp.attrs[(4 * i) / 32] |= info->in[i].mask << ((4 * i) % 32); in nv50_vertprog_assign_slots()
53 if (info->in[i].mask & (1 << c)) in nv50_vertprog_assign_slots()
54 info->in[i].slot[c] = n++; in nv50_vertprog_assign_slots()
56 prog->in_nr = info->numInputs; in nv50_vertprog_assign_slots()
58 for (i = 0; i < info->numSysVals; ++i) { in nv50_vertprog_assign_slots()
59 switch (info->sv[i].sn) { in nv50_vertprog_assign_slots()
83 if (info->io.vertexId < info->numSysVals) in nv50_vertprog_assign_slots()
84 info->sv[info->io.vertexId].slot[0] = n++; in nv50_vertprog_assign_slots()
85 if (info->io.instanceId < info->numSysVals) in nv50_vertprog_assign_slots()
86 info->sv[info->io.instanceId].slot[0] = n++; in nv50_vertprog_assign_slots()
89 for (i = 0; i < info->numOutputs; ++i) { in nv50_vertprog_assign_slots()
90 switch (info->out[i].sn) { in nv50_vertprog_assign_slots()
95 prog->vp.clpd[info->out[i].si] = n; in nv50_vertprog_assign_slots()
101 prog->vp.bfc[info->out[i].si] = i; in nv50_vertprog_assign_slots()
107 prog->out[i].sn = info->out[i].sn; in nv50_vertprog_assign_slots()
108 prog->out[i].si = info->out[i].si; in nv50_vertprog_assign_slots()
110 prog->out[i].mask = info->out[i].mask; in nv50_vertprog_assign_slots()
113 if (info->out[i].mask & (1 << c)) in nv50_vertprog_assign_slots()
114 info->out[i].slot[c] = n++; in nv50_vertprog_assign_slots()
116 prog->out_nr = info->numOutputs; in nv50_vertprog_assign_slots()
119 if (prog->vp.psiz < info->numOutputs) in nv50_vertprog_assign_slots()
126 nv50_fragprog_assign_slots(struct nv50_ir_prog_info *info) in nv50_fragprog_assign_slots() argument
128 struct nv50_program *prog = (struct nv50_program *)info->driverPriv; in nv50_fragprog_assign_slots()
135 for (m = 0, i = 0; i < info->numInputs; ++i) { in nv50_fragprog_assign_slots()
136 switch (info->in[i].sn) { in nv50_fragprog_assign_slots()
141 m += info->in[i].flat ? 0 : 1; in nv50_fragprog_assign_slots()
145 /* careful: id may be != i in info->in[prog->in[i].id] */ in nv50_fragprog_assign_slots()
150 for (n = 0, i = 0; i < info->numInputs; ++i) { in nv50_fragprog_assign_slots()
151 if (info->in[i].sn == TGSI_SEMANTIC_POSITION) { in nv50_fragprog_assign_slots()
152 prog->fp.interp |= info->in[i].mask << 24; in nv50_fragprog_assign_slots()
154 if (info->in[i].mask & (1 << c)) in nv50_fragprog_assign_slots()
155 info->in[i].slot[c] = nintp++; in nv50_fragprog_assign_slots()
157 if (info->in[i].sn == TGSI_SEMANTIC_FACE) { in nv50_fragprog_assign_slots()
158 info->in[i].slot[0] = 255; in nv50_fragprog_assign_slots()
160 unsigned j = info->in[i].flat ? m++ : n++; in nv50_fragprog_assign_slots()
162 if (info->in[i].sn == TGSI_SEMANTIC_COLOR) in nv50_fragprog_assign_slots()
163 prog->vp.bfc[info->in[i].si] = j; in nv50_fragprog_assign_slots()
166 prog->in[j].mask = info->in[i].mask; in nv50_fragprog_assign_slots()
167 prog->in[j].sn = info->in[i].sn; in nv50_fragprog_assign_slots()
168 prog->in[j].si = info->in[i].si; in nv50_fragprog_assign_slots()
169 prog->in[j].linear = info->in[i].linear; in nv50_fragprog_assign_slots()
185 info->in[j].slot[c] = nintp++; in nv50_fragprog_assign_slots()
203 if (info->prop.fp.numColourResults > 1) in nv50_fragprog_assign_slots()
206 for (i = 0; i < info->numOutputs; ++i) { in nv50_fragprog_assign_slots()
208 prog->out[i].sn = info->out[i].sn; in nv50_fragprog_assign_slots()
209 prog->out[i].si = info->out[i].si; in nv50_fragprog_assign_slots()
210 prog->out[i].mask = info->out[i].mask; in nv50_fragprog_assign_slots()
212 if (i == info->io.fragDepth || i == info->io.sampleMask) in nv50_fragprog_assign_slots()
214 prog->out[i].hw = info->out[i].si * 4; in nv50_fragprog_assign_slots()
217 info->out[i].slot[c] = prog->out[i].hw + c; in nv50_fragprog_assign_slots()
222 if (info->io.sampleMask < PIPE_MAX_SHADER_OUTPUTS) in nv50_fragprog_assign_slots()
223 info->out[info->io.sampleMask].slot[0] = prog->max_out++; in nv50_fragprog_assign_slots()
225 if (info->io.fragDepth < PIPE_MAX_SHADER_OUTPUTS) in nv50_fragprog_assign_slots()
226 info->out[info->io.fragDepth].slot[2] = prog->max_out++; in nv50_fragprog_assign_slots()
235 nv50_program_assign_varying_slots(struct nv50_ir_prog_info *info) in nv50_program_assign_varying_slots() argument
237 switch (info->type) { in nv50_program_assign_varying_slots()
239 return nv50_vertprog_assign_slots(info); in nv50_program_assign_varying_slots()
241 return nv50_vertprog_assign_slots(info); in nv50_program_assign_varying_slots()
243 return nv50_fragprog_assign_slots(info); in nv50_program_assign_varying_slots()
250 nv50_program_create_strmout_state(const struct nv50_ir_prog_info *info, in nv50_program_create_strmout_state() argument
296 so->map[base[b] + p + c] = info->out[r].slot[s + c]; in nv50_program_create_strmout_state()
305 struct nv50_ir_prog_info *info; in nv50_program_translate() local
309 info = CALLOC_STRUCT(nv50_ir_prog_info); in nv50_program_translate()
310 if (!info) in nv50_program_translate()
313 info->type = prog->type; in nv50_program_translate()
314 info->target = chipset; in nv50_program_translate()
315 info->bin.sourceRep = NV50_PROGRAM_IR_TGSI; in nv50_program_translate()
316 info->bin.source = (void *)prog->pipe.tokens; in nv50_program_translate()
318 info->io.ucpBinding = 15; in nv50_program_translate()
319 info->io.ucpBase = 0; in nv50_program_translate()
320 info->io.genUserClip = prog->vp.clpd_nr; in nv50_program_translate()
322 info->assignSlots = nv50_program_assign_varying_slots; in nv50_program_translate()
332 info->driverPriv = prog; in nv50_program_translate()
335 info->optLevel = debug_get_num_option("NV50_PROG_OPTIMIZE", 3); in nv50_program_translate()
336 info->dbgFlags = debug_get_num_option("NV50_PROG_DEBUG", 0); in nv50_program_translate()
338 info->optLevel = 3; in nv50_program_translate()
341 ret = nv50_ir_generate_code(info); in nv50_program_translate()
346 if (info->bin.syms) /* we don't need them yet */ in nv50_program_translate()
347 FREE(info->bin.syms); in nv50_program_translate()
349 prog->code = info->bin.code; in nv50_program_translate()
350 prog->code_size = info->bin.codeSize; in nv50_program_translate()
351 prog->fixups = info->bin.relocData; in nv50_program_translate()
352 prog->max_gpr = MAX2(4, (info->bin.maxGPR >> 1) + 1); in nv50_program_translate()
353 prog->tls_space = info->bin.tlsSpace; in nv50_program_translate()
356 if (info->prop.fp.writesDepth) { in nv50_program_translate()
360 if (info->prop.fp.usesDiscard) in nv50_program_translate()
365 prog->so = nv50_program_create_strmout_state(info, in nv50_program_translate()
369 FREE(info); in nv50_program_translate()