• Home
  • Raw
  • Download

Lines Matching refs:prog

184 _mesa_init_gl_program(struct gl_program *prog, gl_shader_stage stage,  in _mesa_init_gl_program()  argument
187 if (!prog) in _mesa_init_gl_program()
190 memset(prog, 0, sizeof(*prog)); in _mesa_init_gl_program()
191 prog->Id = id; in _mesa_init_gl_program()
192 prog->Target = _mesa_shader_stage_to_program(stage); in _mesa_init_gl_program()
193 prog->RefCount = 1; in _mesa_init_gl_program()
194 prog->Format = GL_PROGRAM_FORMAT_ASCII_ARB; in _mesa_init_gl_program()
195 prog->info.stage = stage; in _mesa_init_gl_program()
196 prog->is_arb_asm = is_arb_asm; in _mesa_init_gl_program()
212 prog->SamplerUnits[i] = i; in _mesa_init_gl_program()
215 return prog; in _mesa_init_gl_program()
235 struct gl_program *prog = rzalloc(NULL, struct gl_program); in _mesa_new_program() local
237 return _mesa_init_gl_program(prog, stage, id, is_arb_asm); in _mesa_new_program()
248 _mesa_delete_program(struct gl_context *ctx, struct gl_program *prog) in _mesa_delete_program() argument
251 assert(prog); in _mesa_delete_program()
252 assert(prog->RefCount==0); in _mesa_delete_program()
254 if (prog == &_mesa_DummyProgram) in _mesa_delete_program()
257 if (prog->Parameters) { in _mesa_delete_program()
258 _mesa_free_parameter_list(prog->Parameters); in _mesa_delete_program()
261 if (prog->nir) { in _mesa_delete_program()
262 ralloc_free(prog->nir); in _mesa_delete_program()
265 if (prog->sh.BindlessSamplers) { in _mesa_delete_program()
266 ralloc_free(prog->sh.BindlessSamplers); in _mesa_delete_program()
269 if (prog->sh.BindlessImages) { in _mesa_delete_program()
270 ralloc_free(prog->sh.BindlessImages); in _mesa_delete_program()
273 if (prog->driver_cache_blob) { in _mesa_delete_program()
274 ralloc_free(prog->driver_cache_blob); in _mesa_delete_program()
277 ralloc_free(prog); in _mesa_delete_program()
304 struct gl_program *prog) in _mesa_reference_program_() argument
308 if (*ptr && prog) { in _mesa_reference_program_()
311 assert(prog->Target == GL_VERTEX_PROGRAM_ARB); in _mesa_reference_program_()
313 assert(prog->Target == GL_FRAGMENT_PROGRAM_ARB || in _mesa_reference_program_()
314 prog->Target == GL_FRAGMENT_PROGRAM_NV); in _mesa_reference_program_()
316 assert(prog->Target == GL_GEOMETRY_PROGRAM_NV); in _mesa_reference_program_()
335 if (prog) { in _mesa_reference_program_()
336 p_atomic_inc(&prog->RefCount); in _mesa_reference_program_()
339 *ptr = prog; in _mesa_reference_program_()
348 _mesa_insert_instructions(struct gl_program *prog, GLuint start, GLuint count) in _mesa_insert_instructions() argument
350 const GLuint origLen = prog->arb.NumInstructions; in _mesa_insert_instructions()
356 for (i = 0; i < prog->arb.NumInstructions; i++) { in _mesa_insert_instructions()
357 struct prog_instruction *inst = prog->arb.Instructions + i; in _mesa_insert_instructions()
366 newInst = rzalloc_array(prog, struct prog_instruction, newLen); in _mesa_insert_instructions()
372 _mesa_copy_instructions(newInst, prog->arb.Instructions, start); in _mesa_insert_instructions()
379 prog->arb.Instructions + start, in _mesa_insert_instructions()
383 ralloc_free(prog->arb.Instructions); in _mesa_insert_instructions()
386 prog->arb.Instructions = newInst; in _mesa_insert_instructions()
387 prog->arb.NumInstructions = newLen; in _mesa_insert_instructions()
397 _mesa_delete_instructions(struct gl_program *prog, GLuint start, GLuint count, in _mesa_delete_instructions() argument
400 const GLuint origLen = prog->arb.NumInstructions; in _mesa_delete_instructions()
406 for (i = 0; i < prog->arb.NumInstructions; i++) { in _mesa_delete_instructions()
407 struct prog_instruction *inst = prog->arb.Instructions + i; in _mesa_delete_instructions()
422 _mesa_copy_instructions(newInst, prog->arb.Instructions, start); in _mesa_delete_instructions()
426 prog->arb.Instructions + start + count, in _mesa_delete_instructions()
430 ralloc_free(prog->arb.Instructions); in _mesa_delete_instructions()
433 prog->arb.Instructions = newInst; in _mesa_delete_instructions()
434 prog->arb.NumInstructions = newLen; in _mesa_delete_instructions()
448 _mesa_find_used_registers(const struct gl_program *prog, in _mesa_find_used_registers() argument
456 for (i = 0; i < prog->arb.NumInstructions; i++) { in _mesa_find_used_registers()
457 const struct prog_instruction *inst = prog->arb.Instructions + i; in _mesa_find_used_registers()
508 const struct gl_program *prog) in _mesa_get_min_invocations_per_fragment() argument
526 if (prog->info.fs.uses_sample_qualifier || in _mesa_get_min_invocations_per_fragment()
527 BITSET_TEST(prog->info.system_values_read, SYSTEM_VALUE_SAMPLE_ID) || in _mesa_get_min_invocations_per_fragment()
528 BITSET_TEST(prog->info.system_values_read, SYSTEM_VALUE_SAMPLE_POS)) in _mesa_get_min_invocations_per_fragment()
541 gl_external_samplers(const struct gl_program *prog) in gl_external_samplers() argument
544 GLbitfield mask = prog->SamplersUsed; in gl_external_samplers()
548 if (prog->sh.SamplerTargets[idx] == TEXTURE_EXTERNAL_INDEX) in gl_external_samplers()