Lines Matching refs:glprog

50       struct gl_program *glprog = sh->Program;  in write_subroutines()  local
52 blob_write_uint32(metadata, glprog->sh.NumSubroutineUniforms); in write_subroutines()
53 blob_write_uint32(metadata, glprog->sh.MaxSubroutineFunctionIndex); in write_subroutines()
54 blob_write_uint32(metadata, glprog->sh.NumSubroutineFunctions); in write_subroutines()
55 for (unsigned j = 0; j < glprog->sh.NumSubroutineFunctions; j++) { in write_subroutines()
56 int num_types = glprog->sh.SubroutineFunctions[j].num_compat_types; in write_subroutines()
58 blob_write_string(metadata, glprog->sh.SubroutineFunctions[j].name); in write_subroutines()
59 blob_write_uint32(metadata, glprog->sh.SubroutineFunctions[j].index); in write_subroutines()
64 glprog->sh.SubroutineFunctions[j].types[k]); in write_subroutines()
80 struct gl_program *glprog = sh->Program; in read_subroutines() local
82 glprog->sh.NumSubroutineUniforms = blob_read_uint32(metadata); in read_subroutines()
83 glprog->sh.MaxSubroutineFunctionIndex = blob_read_uint32(metadata); in read_subroutines()
84 glprog->sh.NumSubroutineFunctions = blob_read_uint32(metadata); in read_subroutines()
87 glprog->sh.NumSubroutineFunctions); in read_subroutines()
88 glprog->sh.SubroutineFunctions = subs; in read_subroutines()
90 for (unsigned j = 0; j < glprog->sh.NumSubroutineFunctions; j++) { in read_subroutines()
140 struct gl_program *glprog = sh->Program; in write_buffer_blocks() local
142 blob_write_uint32(metadata, glprog->info.num_ubos); in write_buffer_blocks()
143 blob_write_uint32(metadata, glprog->info.num_ssbos); in write_buffer_blocks()
145 for (unsigned j = 0; j < glprog->info.num_ubos; j++) { in write_buffer_blocks()
147 glprog->sh.UniformBlocks[j] - prog->data->UniformBlocks; in write_buffer_blocks()
151 for (unsigned j = 0; j < glprog->info.num_ssbos; j++) { in write_buffer_blocks()
152 uint32_t offset = glprog->sh.ShaderStorageBlocks[j] - in write_buffer_blocks()
216 struct gl_program *glprog = sh->Program; in read_buffer_blocks() local
218 glprog->info.num_ubos = blob_read_uint32(metadata); in read_buffer_blocks()
219 glprog->info.num_ssbos = blob_read_uint32(metadata); in read_buffer_blocks()
221 glprog->sh.UniformBlocks = in read_buffer_blocks()
222 rzalloc_array(glprog, gl_uniform_block *, glprog->info.num_ubos); in read_buffer_blocks()
223 glprog->sh.ShaderStorageBlocks = in read_buffer_blocks()
224 rzalloc_array(glprog, gl_uniform_block *, glprog->info.num_ssbos); in read_buffer_blocks()
226 for (unsigned j = 0; j < glprog->info.num_ubos; j++) { in read_buffer_blocks()
228 glprog->sh.UniformBlocks[j] = prog->data->UniformBlocks + offset; in read_buffer_blocks()
231 for (unsigned j = 0; j < glprog->info.num_ssbos; j++) { in read_buffer_blocks()
233 glprog->sh.ShaderStorageBlocks[j] = in read_buffer_blocks()
246 struct gl_program *glprog = prog->_LinkedShaders[i]->Program; in write_atomic_buffers() local
247 blob_write_uint32(metadata, glprog->info.num_abos); in write_atomic_buffers()
277 struct gl_program *glprog = prog->_LinkedShaders[i]->Program; in read_atomic_buffers() local
279 glprog->info.num_abos = blob_read_uint32(metadata); in read_atomic_buffers()
280 glprog->sh.AtomicBuffers = in read_atomic_buffers()
281 rzalloc_array(glprog, gl_active_atomic_buffer *, in read_atomic_buffers()
282 glprog->info.num_abos); in read_atomic_buffers()
283 stage_buff_list[i] = glprog->sh.AtomicBuffers; in read_atomic_buffers()
574 struct gl_program *glprog = sh->Program; in write_uniform_remap_tables() local
575 blob_write_uint32(metadata, glprog->sh.NumSubroutineUniformRemapTable); in write_uniform_remap_tables()
577 for (unsigned j = 0; j < glprog->sh.NumSubroutineUniformRemapTable; j++) { in write_uniform_remap_tables()
580 glprog->sh.SubroutineUniformRemapTable[j]); in write_uniform_remap_tables()
622 struct gl_program *glprog = sh->Program; in read_uniform_remap_tables() local
623 glprog->sh.NumSubroutineUniformRemapTable = blob_read_uint32(metadata); in read_uniform_remap_tables()
625 glprog->sh.SubroutineUniformRemapTable = in read_uniform_remap_tables()
626 rzalloc_array(glprog, struct gl_uniform_storage *, in read_uniform_remap_tables()
627 glprog->sh.NumSubroutineUniformRemapTable); in read_uniform_remap_tables()
629 for (unsigned j = 0; j < glprog->sh.NumSubroutineUniformRemapTable; j++) { in read_uniform_remap_tables()
635 &glprog->sh.SubroutineUniformRemapTable[j], in read_uniform_remap_tables()
1007 struct gl_program *glprog = shader->Program; in write_shader_metadata() local
1010 blob_write_bytes(metadata, glprog->TexturesUsed, in write_shader_metadata()
1011 sizeof(glprog->TexturesUsed)); in write_shader_metadata()
1012 blob_write_uint64(metadata, glprog->SamplersUsed); in write_shader_metadata()
1014 blob_write_bytes(metadata, glprog->SamplerUnits, in write_shader_metadata()
1015 sizeof(glprog->SamplerUnits)); in write_shader_metadata()
1016 blob_write_bytes(metadata, glprog->sh.SamplerTargets, in write_shader_metadata()
1017 sizeof(glprog->sh.SamplerTargets)); in write_shader_metadata()
1018 blob_write_uint32(metadata, glprog->ShadowSamplers); in write_shader_metadata()
1020 blob_write_bytes(metadata, glprog->sh.ImageAccess, in write_shader_metadata()
1021 sizeof(glprog->sh.ImageAccess)); in write_shader_metadata()
1022 blob_write_bytes(metadata, glprog->sh.ImageUnits, in write_shader_metadata()
1023 sizeof(glprog->sh.ImageUnits)); in write_shader_metadata()
1027 blob_write_uint32(metadata, glprog->sh.NumBindlessSamplers); in write_shader_metadata()
1028 blob_write_uint32(metadata, glprog->sh.HasBoundBindlessSampler); in write_shader_metadata()
1029 for (i = 0; i < glprog->sh.NumBindlessSamplers; i++) { in write_shader_metadata()
1030 blob_write_bytes(metadata, &glprog->sh.BindlessSamplers[i], in write_shader_metadata()
1034 blob_write_uint32(metadata, glprog->sh.NumBindlessImages); in write_shader_metadata()
1035 blob_write_uint32(metadata, glprog->sh.HasBoundBindlessImage); in write_shader_metadata()
1036 for (i = 0; i < glprog->sh.NumBindlessImages; i++) { in write_shader_metadata()
1037 blob_write_bytes(metadata, &glprog->sh.BindlessImages[i], in write_shader_metadata()
1041 blob_write_bytes(metadata, &glprog->sh.fs.BlendSupport, in write_shader_metadata()
1042 sizeof(glprog->sh.fs.BlendSupport)); in write_shader_metadata()
1044 write_shader_parameters(metadata, glprog->Parameters); in write_shader_metadata()
1046 assert((glprog->driver_cache_blob == NULL) == in write_shader_metadata()
1047 (glprog->driver_cache_blob_size == 0)); in write_shader_metadata()
1048 blob_write_uint32(metadata, (uint32_t)glprog->driver_cache_blob_size); in write_shader_metadata()
1049 if (glprog->driver_cache_blob_size > 0) { in write_shader_metadata()
1050 blob_write_bytes(metadata, glprog->driver_cache_blob, in write_shader_metadata()
1051 glprog->driver_cache_blob_size); in write_shader_metadata()
1057 struct gl_program *glprog, in read_shader_metadata() argument
1062 blob_copy_bytes(metadata, (uint8_t *) glprog->TexturesUsed, in read_shader_metadata()
1063 sizeof(glprog->TexturesUsed)); in read_shader_metadata()
1064 glprog->SamplersUsed = blob_read_uint64(metadata); in read_shader_metadata()
1066 blob_copy_bytes(metadata, (uint8_t *) glprog->SamplerUnits, in read_shader_metadata()
1067 sizeof(glprog->SamplerUnits)); in read_shader_metadata()
1068 blob_copy_bytes(metadata, (uint8_t *) glprog->sh.SamplerTargets, in read_shader_metadata()
1069 sizeof(glprog->sh.SamplerTargets)); in read_shader_metadata()
1070 glprog->ShadowSamplers = blob_read_uint32(metadata); in read_shader_metadata()
1072 blob_copy_bytes(metadata, (uint8_t *) glprog->sh.ImageAccess, in read_shader_metadata()
1073 sizeof(glprog->sh.ImageAccess)); in read_shader_metadata()
1074 blob_copy_bytes(metadata, (uint8_t *) glprog->sh.ImageUnits, in read_shader_metadata()
1075 sizeof(glprog->sh.ImageUnits)); in read_shader_metadata()
1079 glprog->sh.NumBindlessSamplers = blob_read_uint32(metadata); in read_shader_metadata()
1080 glprog->sh.HasBoundBindlessSampler = blob_read_uint32(metadata); in read_shader_metadata()
1081 if (glprog->sh.NumBindlessSamplers > 0) { in read_shader_metadata()
1082 glprog->sh.BindlessSamplers = in read_shader_metadata()
1083 rzalloc_array(glprog, gl_bindless_sampler, in read_shader_metadata()
1084 glprog->sh.NumBindlessSamplers); in read_shader_metadata()
1086 for (i = 0; i < glprog->sh.NumBindlessSamplers; i++) { in read_shader_metadata()
1087 blob_copy_bytes(metadata, (uint8_t *) &glprog->sh.BindlessSamplers[i], in read_shader_metadata()
1092 glprog->sh.NumBindlessImages = blob_read_uint32(metadata); in read_shader_metadata()
1093 glprog->sh.HasBoundBindlessImage = blob_read_uint32(metadata); in read_shader_metadata()
1094 if (glprog->sh.NumBindlessImages > 0) { in read_shader_metadata()
1095 glprog->sh.BindlessImages = in read_shader_metadata()
1096 rzalloc_array(glprog, gl_bindless_image, in read_shader_metadata()
1097 glprog->sh.NumBindlessImages); in read_shader_metadata()
1099 for (i = 0; i < glprog->sh.NumBindlessImages; i++) { in read_shader_metadata()
1100 blob_copy_bytes(metadata, (uint8_t *) &glprog->sh.BindlessImages[i], in read_shader_metadata()
1105 blob_copy_bytes(metadata, (uint8_t *) &glprog->sh.fs.BlendSupport, in read_shader_metadata()
1106 sizeof(glprog->sh.fs.BlendSupport)); in read_shader_metadata()
1108 glprog->Parameters = _mesa_new_parameter_list(); in read_shader_metadata()
1109 read_shader_parameters(metadata, glprog->Parameters); in read_shader_metadata()
1111 glprog->driver_cache_blob_size = (size_t)blob_read_uint32(metadata); in read_shader_metadata()
1112 if (glprog->driver_cache_blob_size > 0) { in read_shader_metadata()
1113 glprog->driver_cache_blob = in read_shader_metadata()
1114 (uint8_t*)ralloc_size(glprog, glprog->driver_cache_blob_size); in read_shader_metadata()
1115 blob_copy_bytes(metadata, glprog->driver_cache_blob, in read_shader_metadata()
1116 glprog->driver_cache_blob_size); in read_shader_metadata()
1134 struct gl_program *glprog; in create_linked_shader_and_program() local
1139 glprog = ctx->Driver.NewProgram(ctx, _mesa_shader_stage_to_program(stage), in create_linked_shader_and_program()
1141 glprog->info.stage = stage; in create_linked_shader_and_program()
1142 linked->Program = glprog; in create_linked_shader_and_program()
1144 read_shader_metadata(metadata, glprog, linked); in create_linked_shader_and_program()
1146 glprog->info.name = ralloc_strdup(glprog, blob_read_string(metadata)); in create_linked_shader_and_program()
1147 glprog->info.label = ralloc_strdup(glprog, blob_read_string(metadata)); in create_linked_shader_and_program()
1151 &glprog->info); in create_linked_shader_and_program()
1154 blob_copy_bytes(metadata, ((uint8_t *) &glprog->info) + s_info_ptrs, in create_linked_shader_and_program()
1157 _mesa_reference_shader_program_data(ctx, &glprog->sh.data, prog->data); in create_linked_shader_and_program()
1158 _mesa_reference_program(ctx, &linked->Program, glprog); in create_linked_shader_and_program()