• Home
  • Raw
  • Download

Lines Matching refs:shader

37    struct anv_shader_bin *shader;  in anv_shader_bin_create()  local
44 anv_multialloc_add(&ma, &shader, 1); in anv_shader_bin_create()
57 shader->ref_cnt = 1; in anv_shader_bin_create()
61 shader->key = key; in anv_shader_bin_create()
63 shader->kernel = in anv_shader_bin_create()
65 memcpy(shader->kernel.map, kernel_data, kernel_size); in anv_shader_bin_create()
66 shader->kernel_size = kernel_size; in anv_shader_bin_create()
72 shader->prog_data = prog_data; in anv_shader_bin_create()
73 shader->prog_data_size = prog_data_size; in anv_shader_bin_create()
75 shader->bind_map = *bind_map; in anv_shader_bin_create()
78 shader->bind_map.surface_to_descriptor = surface_to_descriptor; in anv_shader_bin_create()
81 shader->bind_map.sampler_to_descriptor = sampler_to_descriptor; in anv_shader_bin_create()
83 return shader; in anv_shader_bin_create()
88 struct anv_shader_bin *shader) in anv_shader_bin_destroy() argument
90 assert(shader->ref_cnt == 0); in anv_shader_bin_destroy()
91 anv_state_pool_free(&device->instruction_state_pool, shader->kernel); in anv_shader_bin_destroy()
92 vk_free(&device->alloc, shader); in anv_shader_bin_destroy()
96 anv_shader_bin_write_to_blob(const struct anv_shader_bin *shader, in anv_shader_bin_write_to_blob() argument
101 ok = blob_write_uint32(blob, shader->key->size); in anv_shader_bin_write_to_blob()
102 ok = blob_write_bytes(blob, shader->key->data, shader->key->size); in anv_shader_bin_write_to_blob()
104 ok = blob_write_uint32(blob, shader->kernel_size); in anv_shader_bin_write_to_blob()
105 ok = blob_write_bytes(blob, shader->kernel.map, shader->kernel_size); in anv_shader_bin_write_to_blob()
107 ok = blob_write_uint32(blob, shader->prog_data_size); in anv_shader_bin_write_to_blob()
108 ok = blob_write_bytes(blob, shader->prog_data, shader->prog_data_size); in anv_shader_bin_write_to_blob()
109 ok = blob_write_bytes(blob, shader->prog_data->param, in anv_shader_bin_write_to_blob()
110 shader->prog_data->nr_params * in anv_shader_bin_write_to_blob()
111 sizeof(*shader->prog_data->param)); in anv_shader_bin_write_to_blob()
113 ok = blob_write_uint32(blob, shader->bind_map.surface_count); in anv_shader_bin_write_to_blob()
114 ok = blob_write_uint32(blob, shader->bind_map.sampler_count); in anv_shader_bin_write_to_blob()
115 ok = blob_write_uint32(blob, shader->bind_map.image_count); in anv_shader_bin_write_to_blob()
116 ok = blob_write_bytes(blob, shader->bind_map.surface_to_descriptor, in anv_shader_bin_write_to_blob()
117 shader->bind_map.surface_count * in anv_shader_bin_write_to_blob()
118 sizeof(*shader->bind_map.surface_to_descriptor)); in anv_shader_bin_write_to_blob()
119 ok = blob_write_bytes(blob, shader->bind_map.sampler_to_descriptor, in anv_shader_bin_write_to_blob()
120 shader->bind_map.sampler_count * in anv_shader_bin_write_to_blob()
121 sizeof(*shader->bind_map.sampler_to_descriptor)); in anv_shader_bin_write_to_blob()
251 struct anv_shader_bin *shader = in anv_pipeline_cache_search() local
257 if (shader) in anv_pipeline_cache_search()
258 anv_shader_bin_ref(shader); in anv_pipeline_cache_search()
260 return shader; in anv_pipeline_cache_search()
272 struct anv_shader_bin *shader = in anv_pipeline_cache_add_shader() local
274 if (shader) in anv_pipeline_cache_add_shader()
275 return shader; in anv_pipeline_cache_add_shader()
463 struct anv_shader_bin *shader = entry->data; in anv_GetPipelineCacheData() local
466 if (!anv_shader_bin_write_to_blob(shader, &blob)) { in anv_GetPipelineCacheData()