Lines Matching defs:fprog
236 * \param fprog Fragment program that fog instructions will be appended to.
241 * This function sets \c VARYING_BIT_FOGC in \c fprog->info.inputs_read.
247 _mesa_append_fog_code(struct gl_context *ctx, struct gl_program *fprog,
255 const GLuint origLen = fprog->arb.NumInstructions;
267 if (!(fprog->info.outputs_written & (1 << FRAG_RESULT_COLOR))) {
273 newInst = rzalloc_array(fprog, struct prog_instruction, newLen);
281 _mesa_copy_instructions(newInst, fprog->arb.Instructions, origLen);
285 = _mesa_add_state_reference(fprog->Parameters, fogPStateOpt);
288 = _mesa_add_state_reference(fprog->Parameters, fogColorState);
291 colorTemp = fprog->arb.NumTemporaries++;
293 fogFactorTemp = fprog->arb.NumTemporaries++;
297 for (i = 0; i < fprog->arb.NumInstructions; i++) {
406 ralloc_free(fprog->arb.Instructions);
409 fprog->arb.Instructions = newInst;
410 fprog->arb.NumInstructions = inst - newInst;
411 fprog->info.inputs_read |= VARYING_BIT_FOGC;
412 assert(fprog->info.outputs_written & (1 << FRAG_RESULT_COLOR));