if (pipeline->layout && pipeline->layout->stage[stage].has_dynamic_offsets)
prog_data->nr_params += MAX_DYNAMIC_BUFFERS * 2;
+ if (pipeline->layout && pipeline->layout->stage[stage].image_count > 0)
+ prog_data->nr_params += pipeline->layout->stage[stage].image_count *
+ BRW_IMAGE_PARAM_SIZE;
+
if (prog_data->nr_params > 0) {
/* XXX: I think we're leaking this */
- prog_data->param = (const gl_constant_value **)
- malloc(prog_data->nr_params * sizeof(gl_constant_value *));
+ prog_data->param = (const union gl_constant_value **)
+ malloc(prog_data->nr_params * sizeof(union gl_constant_value *));
/* We now set the param values to be offsets into a
* anv_push_constant_data structure. Since the compiler doesn't
if (nir->num_uniforms > 0) {
/* Fill out the push constants section of the param array */
for (unsigned i = 0; i < MAX_PUSH_CONSTANTS_SIZE / sizeof(float); i++)
- prog_data->param[i] = (const gl_constant_value *)
+ prog_data->param[i] = (const union gl_constant_value *)
&null_data->client_data[i * sizeof(float)];
}
}
anv_nir_apply_dynamic_offsets(pipeline, nir, prog_data);
/* Apply the actual pipeline layout to UBOs, SSBOs, and textures */
- anv_nir_apply_pipeline_layout(nir, pipeline->layout);
+ if (pipeline->layout)
+ anv_nir_apply_pipeline_layout(nir, prog_data, pipeline->layout);
/* All binding table offsets provided by apply_pipeline_layout() are
* relative to the start of the bindint table (plus MAX_RTS for VS).
/* nir_lower_io will only handle the push constants; we need to set this
* to the full number of possible uniforms.
*/
- nir->num_uniforms = prog_data->nr_params;
+ nir->num_uniforms = prog_data->nr_params * 4;
return nir;
}
memcpy(state.map, data, size);
+ if (!pipeline->device->info.has_llc)
+ anv_state_clflush(state);
+
return state.offset;
}
+
static void
anv_pipeline_add_compiled_stage(struct anv_pipeline *pipeline,
gl_shader_stage stage,
}
/* TODO: SIMD8 GS */
- pipeline->gs_vec4 =
+ pipeline->gs_kernel =
anv_pipeline_upload_kernel(pipeline, shader_code, code_size);
pipeline->gs_vertex_count = nir->info.gs.vertices_in;
assert(info->pInputAssemblyState);
assert(info->pViewportState);
assert(info->pRasterizationState);
- assert(info->pMultisampleState);
if (subpass && subpass->depth_stencil_attachment != VK_ATTACHMENT_UNUSED)
assert(info->pDepthStencilState);
pipeline->vs_simd8 = NO_KERNEL;
pipeline->vs_vec4 = NO_KERNEL;
- pipeline->gs_vec4 = NO_KERNEL;
+ pipeline->gs_kernel = NO_KERNEL;
pipeline->active_stages = 0;
pipeline->total_scratch = 0;