Lines Matching defs:program

34 Notes on program parameters, etc.
42 PROGRAM_CONSTANT - indexes into program->Parameters, a known constant/literal
43 PROGRAM_STATE_VAR - indexes into program->Parameters, and may actually be:
45 + a pointer to a "program.local[k]" parameter, or
46 + a pointer to a "program.env[k]" parameter
48 Basically, all the program.local[] and program.env[] values will get mapped
50 having three separate program parameter arrays.
70 struct gl_program *program)
81 state.mem_ctx = program;
85 /* Error in the program. Just return. */
89 ralloc_free(program->String);
94 program->String = prog.String;
95 program->arb.NumInstructions = prog.arb.NumInstructions;
96 program->arb.NumTemporaries = prog.arb.NumTemporaries;
97 program->arb.NumParameters = prog.arb.NumParameters;
98 program->arb.NumAttributes = prog.arb.NumAttributes;
99 program->arb.NumAddressRegs = prog.arb.NumAddressRegs;
100 program->arb.NumNativeInstructions = prog.arb.NumNativeInstructions;
101 program->arb.NumNativeTemporaries = prog.arb.NumNativeTemporaries;
102 program->arb.NumNativeParameters = prog.arb.NumNativeParameters;
103 program->arb.NumNativeAttributes = prog.arb.NumNativeAttributes;
104 program->arb.NumNativeAddressRegs = prog.arb.NumNativeAddressRegs;
105 program->arb.NumAluInstructions = prog.arb.NumAluInstructions;
106 program->arb.NumTexInstructions = prog.arb.NumTexInstructions;
107 program->arb.NumTexIndirections = prog.arb.NumTexIndirections;
108 program->arb.NumNativeAluInstructions = prog.arb.NumAluInstructions;
109 program->arb.NumNativeTexInstructions = prog.arb.NumTexInstructions;
110 program->arb.NumNativeTexIndirections = prog.arb.NumTexIndirections;
111 program->info.inputs_read = prog.info.inputs_read;
112 program->info.outputs_written = prog.info.outputs_written;
113 program->arb.IndirectRegisterFiles = prog.arb.IndirectRegisterFiles;
115 program->TexturesUsed[i] = prog.TexturesUsed[i];
117 program->SamplersUsed |= (1 << i);
119 program->ShadowSamplers = prog.ShadowSamplers;
120 program->info.fs.origin_upper_left = state.option.OriginUpperLeft;
121 program->info.fs.pixel_center_integer = state.option.PixelCenterInteger;
123 program->info.fs.uses_discard = state.fragment.UsesKill;
125 ralloc_free(program->arb.Instructions);
126 program->arb.Instructions = prog.arb.Instructions;
128 if (program->Parameters)
129 _mesa_free_parameter_list(program->Parameters);
130 program->Parameters = prog.Parameters;
132 /* Append fog instructions now if the program has "OPTION ARB_fog_exp"
145 _mesa_append_fog_code(ctx, program, fog_modes[state.option.Fog], GL_TRUE);
149 printf("____________Fragment program %u ________\n", program->Id);
150 _mesa_print_program(&program->Base);
157 * Parse the vertex program string. If success, update the given
158 * vertex_program object with the new program. Else, leave the vertex_program
164 struct gl_program *program)
174 state.mem_ctx = program;
178 _mesa_error(ctx, GL_INVALID_OPERATION, "glProgramString(bad program)");
182 _mesa_optimize_program(&prog, program);
184 ralloc_free(program->String);
189 program->String = prog.String;
190 program->arb.NumInstructions = prog.arb.NumInstructions;
191 program->arb.NumTemporaries = prog.arb.NumTemporaries;
192 program->arb.NumParameters = prog.arb.NumParameters;
193 program->arb.NumAttributes = prog.arb.NumAttributes;
194 program->arb.NumAddressRegs = prog.arb.NumAddressRegs;
195 program->arb.NumNativeInstructions = prog.arb.NumNativeInstructions;
196 program->arb.NumNativeTemporaries = prog.arb.NumNativeTemporaries;
197 program->arb.NumNativeParameters = prog.arb.NumNativeParameters;
198 program->arb.NumNativeAttributes = prog.arb.NumNativeAttributes;
199 program->arb.NumNativeAddressRegs = prog.arb.NumNativeAddressRegs;
200 program->info.inputs_read = prog.info.inputs_read;
201 program->info.outputs_written = prog.info.outputs_written;
202 program->arb.IndirectRegisterFiles = prog.arb.IndirectRegisterFiles;
203 program->arb.IsPositionInvariant = (state.option.PositionInvariant)
206 ralloc_free(program->arb.Instructions);
207 program->arb.Instructions = prog.arb.Instructions;
209 if (program->Parameters)
210 _mesa_free_parameter_list(program->Parameters);
211 program->Parameters = prog.Parameters;
214 printf("____________Vertex program %u __________\n", program->Id);
215 _mesa_print_program(program);