Lines Matching full: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) in _mesa_parse_arb_fragment_program() argument
81 state.mem_ctx = program; in _mesa_parse_arb_fragment_program()
85 /* Error in the program. Just return. */ in _mesa_parse_arb_fragment_program()
89 ralloc_free(program->String); in _mesa_parse_arb_fragment_program()
94 program->String = prog.String; in _mesa_parse_arb_fragment_program()
95 program->arb.NumInstructions = prog.arb.NumInstructions; in _mesa_parse_arb_fragment_program()
96 program->arb.NumTemporaries = prog.arb.NumTemporaries; in _mesa_parse_arb_fragment_program()
97 program->arb.NumParameters = prog.arb.NumParameters; in _mesa_parse_arb_fragment_program()
98 program->arb.NumAttributes = prog.arb.NumAttributes; in _mesa_parse_arb_fragment_program()
99 program->arb.NumAddressRegs = prog.arb.NumAddressRegs; in _mesa_parse_arb_fragment_program()
100 program->arb.NumNativeInstructions = prog.arb.NumNativeInstructions; in _mesa_parse_arb_fragment_program()
101 program->arb.NumNativeTemporaries = prog.arb.NumNativeTemporaries; in _mesa_parse_arb_fragment_program()
102 program->arb.NumNativeParameters = prog.arb.NumNativeParameters; in _mesa_parse_arb_fragment_program()
103 program->arb.NumNativeAttributes = prog.arb.NumNativeAttributes; in _mesa_parse_arb_fragment_program()
104 program->arb.NumNativeAddressRegs = prog.arb.NumNativeAddressRegs; in _mesa_parse_arb_fragment_program()
105 program->arb.NumAluInstructions = prog.arb.NumAluInstructions; in _mesa_parse_arb_fragment_program()
106 program->arb.NumTexInstructions = prog.arb.NumTexInstructions; in _mesa_parse_arb_fragment_program()
107 program->arb.NumTexIndirections = prog.arb.NumTexIndirections; in _mesa_parse_arb_fragment_program()
108 program->arb.NumNativeAluInstructions = prog.arb.NumAluInstructions; in _mesa_parse_arb_fragment_program()
109 program->arb.NumNativeTexInstructions = prog.arb.NumTexInstructions; in _mesa_parse_arb_fragment_program()
110 program->arb.NumNativeTexIndirections = prog.arb.NumTexIndirections; in _mesa_parse_arb_fragment_program()
111 program->info.inputs_read = prog.info.inputs_read; in _mesa_parse_arb_fragment_program()
112 program->info.outputs_written = prog.info.outputs_written; in _mesa_parse_arb_fragment_program()
113 program->arb.IndirectRegisterFiles = prog.arb.IndirectRegisterFiles; in _mesa_parse_arb_fragment_program()
115 program->TexturesUsed[i] = prog.TexturesUsed[i]; in _mesa_parse_arb_fragment_program()
117 program->SamplersUsed |= (1 << i); in _mesa_parse_arb_fragment_program()
119 program->ShadowSamplers = prog.ShadowSamplers; in _mesa_parse_arb_fragment_program()
120 program->OriginUpperLeft = state.option.OriginUpperLeft; in _mesa_parse_arb_fragment_program()
121 program->PixelCenterInteger = state.option.PixelCenterInteger; in _mesa_parse_arb_fragment_program()
123 program->info.fs.uses_discard = state.fragment.UsesKill; in _mesa_parse_arb_fragment_program()
125 ralloc_free(program->arb.Instructions); in _mesa_parse_arb_fragment_program()
126 program->arb.Instructions = prog.arb.Instructions; in _mesa_parse_arb_fragment_program()
128 if (program->Parameters) in _mesa_parse_arb_fragment_program()
129 _mesa_free_parameter_list(program->Parameters); in _mesa_parse_arb_fragment_program()
130 program->Parameters = prog.Parameters; in _mesa_parse_arb_fragment_program()
132 /* Append fog instructions now if the program has "OPTION ARB_fog_exp" in _mesa_parse_arb_fragment_program()
145 _mesa_append_fog_code(ctx, program, fog_modes[state.option.Fog], GL_TRUE); in _mesa_parse_arb_fragment_program()
149 printf("____________Fragment program %u ________\n", program->Id); in _mesa_parse_arb_fragment_program()
150 _mesa_print_program(&program->Base); in _mesa_parse_arb_fragment_program()
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) in _mesa_parse_arb_vertex_program() argument
174 state.mem_ctx = program; in _mesa_parse_arb_vertex_program()
180 _mesa_error(ctx, GL_INVALID_OPERATION, "glProgramString(bad program)"); in _mesa_parse_arb_vertex_program()
184 _mesa_optimize_program(&prog, program); in _mesa_parse_arb_vertex_program()
186 ralloc_free(program->String); in _mesa_parse_arb_vertex_program()
191 program->String = prog.String; in _mesa_parse_arb_vertex_program()
192 program->arb.NumInstructions = prog.arb.NumInstructions; in _mesa_parse_arb_vertex_program()
193 program->arb.NumTemporaries = prog.arb.NumTemporaries; in _mesa_parse_arb_vertex_program()
194 program->arb.NumParameters = prog.arb.NumParameters; in _mesa_parse_arb_vertex_program()
195 program->arb.NumAttributes = prog.arb.NumAttributes; in _mesa_parse_arb_vertex_program()
196 program->arb.NumAddressRegs = prog.arb.NumAddressRegs; in _mesa_parse_arb_vertex_program()
197 program->arb.NumNativeInstructions = prog.arb.NumNativeInstructions; in _mesa_parse_arb_vertex_program()
198 program->arb.NumNativeTemporaries = prog.arb.NumNativeTemporaries; in _mesa_parse_arb_vertex_program()
199 program->arb.NumNativeParameters = prog.arb.NumNativeParameters; in _mesa_parse_arb_vertex_program()
200 program->arb.NumNativeAttributes = prog.arb.NumNativeAttributes; in _mesa_parse_arb_vertex_program()
201 program->arb.NumNativeAddressRegs = prog.arb.NumNativeAddressRegs; in _mesa_parse_arb_vertex_program()
202 program->info.inputs_read = prog.info.inputs_read; in _mesa_parse_arb_vertex_program()
203 program->info.outputs_written = prog.info.outputs_written; in _mesa_parse_arb_vertex_program()
204 program->arb.IndirectRegisterFiles = prog.arb.IndirectRegisterFiles; in _mesa_parse_arb_vertex_program()
205 program->arb.IsPositionInvariant = (state.option.PositionInvariant) in _mesa_parse_arb_vertex_program()
208 ralloc_free(program->arb.Instructions); in _mesa_parse_arb_vertex_program()
209 program->arb.Instructions = prog.arb.Instructions; in _mesa_parse_arb_vertex_program()
211 if (program->Parameters) in _mesa_parse_arb_vertex_program()
212 _mesa_free_parameter_list(program->Parameters); in _mesa_parse_arb_vertex_program()
213 program->Parameters = prog.Parameters; in _mesa_parse_arb_vertex_program()
216 printf("____________Vertex program %u __________\n", program->Id); in _mesa_parse_arb_vertex_program()
217 _mesa_print_program(program); in _mesa_parse_arb_vertex_program()