gl_shader_stage stage,
const void *key_data, uint32_t key_size,
const void *kernel_data, uint32_t kernel_size,
- const void *constant_data, uint32_t constant_data_size,
const struct brw_stage_prog_data *prog_data_in,
uint32_t prog_data_size,
const struct brw_compile_stats *stats, uint32_t num_stats,
memcpy(shader->kernel.map, kernel_data, kernel_size);
shader->kernel_size = kernel_size;
- if (constant_data_size) {
- shader->constant_data =
- anv_state_pool_alloc(&device->dynamic_state_pool,
- constant_data_size, 32);
- memcpy(shader->constant_data.map, constant_data, constant_data_size);
- } else {
- shader->constant_data = ANV_STATE_NULL;
- }
- shader->constant_data_size = constant_data_size;
-
memcpy(prog_data, prog_data_in, prog_data_size);
memset(prog_data_param, 0,
prog_data->nr_params * sizeof(*prog_data_param));
{
assert(shader->ref_cnt == 0);
anv_state_pool_free(&device->instruction_state_pool, shader->kernel);
- anv_state_pool_free(&device->dynamic_state_pool, shader->constant_data);
vk_free(&device->vk.alloc, shader);
}
blob_write_uint32(blob, shader->kernel_size);
blob_write_bytes(blob, shader->kernel.map, shader->kernel_size);
- blob_write_uint32(blob, shader->constant_data_size);
- blob_write_bytes(blob, shader->constant_data.map,
- shader->constant_data_size);
-
blob_write_uint32(blob, shader->prog_data_size);
blob_write_bytes(blob, shader->prog_data, shader->prog_data_size);
uint32_t kernel_size = blob_read_uint32(blob);
const void *kernel_data = blob_read_bytes(blob, kernel_size);
- uint32_t constant_data_size = blob_read_uint32(blob);
- const void *constant_data = blob_read_bytes(blob, constant_data_size);
-
uint32_t prog_data_size = blob_read_uint32(blob);
const struct brw_stage_prog_data *prog_data =
blob_read_bytes(blob, prog_data_size);
return anv_shader_bin_create(device, stage,
key_data, key_size,
kernel_data, kernel_size,
- constant_data, constant_data_size,
prog_data, prog_data_size,
stats, num_stats, xfb_info, &bind_map);
}
const void *key_data, uint32_t key_size,
const void *kernel_data,
uint32_t kernel_size,
- const void *constant_data,
- uint32_t constant_data_size,
const struct brw_stage_prog_data *prog_data,
uint32_t prog_data_size,
const struct brw_compile_stats *stats,
anv_shader_bin_create(cache->device, stage,
key_data, key_size,
kernel_data, kernel_size,
- constant_data, constant_data_size,
prog_data, prog_data_size,
stats, num_stats, xfb_info, bind_map);
if (!bin)
gl_shader_stage stage,
const void *key_data, uint32_t key_size,
const void *kernel_data, uint32_t kernel_size,
- const void *constant_data,
- uint32_t constant_data_size,
const struct brw_stage_prog_data *prog_data,
uint32_t prog_data_size,
const struct brw_compile_stats *stats,
struct anv_shader_bin *bin =
anv_pipeline_cache_add_shader_locked(cache, stage, key_data, key_size,
kernel_data, kernel_size,
- constant_data, constant_data_size,
prog_data, prog_data_size,
stats, num_stats,
xfb_info, bind_map);
return anv_shader_bin_create(cache->device, stage,
key_data, key_size,
kernel_data, kernel_size,
- constant_data, constant_data_size,
prog_data, prog_data_size,
stats, num_stats,
xfb_info, bind_map);
gl_shader_stage stage,
const void *key_data, uint32_t key_size,
const void *kernel_data, uint32_t kernel_size,
- const void *constant_data,
- uint32_t constant_data_size,
const struct brw_stage_prog_data *prog_data,
uint32_t prog_data_size,
const struct brw_compile_stats *stats,
if (cache) {
bin = anv_pipeline_cache_upload_kernel(cache, stage, key_data, key_size,
kernel_data, kernel_size,
- constant_data, constant_data_size,
prog_data, prog_data_size,
stats, num_stats,
xfb_info, bind_map);
} else {
bin = anv_shader_bin_create(device, stage, key_data, key_size,
kernel_data, kernel_size,
- constant_data, constant_data_size,
prog_data, prog_data_size,
stats, num_stats,
xfb_info, bind_map);
gl_shader_stage stage,
const void *key_data, uint32_t key_size,
const void *kernel_data, uint32_t kernel_size,
- const void *constant_data,
- uint32_t constant_data_size,
const struct brw_stage_prog_data *prog_data,
uint32_t prog_data_size,
const struct brw_compile_stats *stats,
gl_shader_stage stage,
const void *key_data, uint32_t key_size,
const void *kernel_data, uint32_t kernel_size,
- const void *constant_data,
- uint32_t constant_data_size,
const struct brw_stage_prog_data *prog_data,
uint32_t prog_data_size,
const struct brw_compile_stats *stats,
struct anv_state kernel;
uint32_t kernel_size;
- struct anv_state constant_data;
- uint32_t constant_data_size;
-
const struct brw_stage_prog_data *prog_data;
uint32_t prog_data_size;
gl_shader_stage stage,
const void *key, uint32_t key_size,
const void *kernel, uint32_t kernel_size,
- const void *constant_data, uint32_t constant_data_size,
const struct brw_stage_prog_data *prog_data,
uint32_t prog_data_size,
const struct brw_compile_stats *stats, uint32_t num_stats,