[Mesa-dev] [PATCH 15/25] i965: Add visitor support for handling image uniforms.

Paul Berry stereotype441 at gmail.com
Tue Dec 31 10:41:16 PST 2013


On 2 December 2013 11:39, Francisco Jerez <currojerez at riseup.net> wrote:

> +
> +void
> +backend_visitor::setup_image_uniform_values(const gl_uniform_storage
> *storage)
> +{
> +   const unsigned stage = _mesa_program_target_to_index(prog->Target);
> +
> +   for (unsigned i = 0; i < MAX2(storage->array_elements, 1); i++) {
> +      const unsigned image_idx = storage->image[stage].index + i;
> +      brw_image_param *param = &stage_prog_data->image_param[image_idx];
> +
> +      param->surface_idx =
> +         stage_prog_data->binding_table.image_start + image_idx;
> +
> +      setup_vector_uniform_values(&param->surface_idx, sizeof(uint32_t),
> 1);
> +      setup_vector_uniform_values(param->offset, sizeof(uint32_t), 2);
> +      setup_vector_uniform_values(param->size, sizeof(uint32_t), 3);
> +      setup_vector_uniform_values(param->stride, sizeof(uint32_t), 4);
> +      setup_vector_uniform_values(param->tiling, sizeof(uint32_t), 3);
> +      setup_vector_uniform_values(param->swizzling, sizeof(uint32_t), 2);
> +
> +      brw_mark_surface_used(stage_prog_data, param->surface_idx);
>

Ok, now I see how you addressed my worries about brw_mark_surface_used() in
patches 10-12.  It would be helpful to put comments in the commit messages
for those patches explaining that brw_mark_surface_used() will be
re-introduced in this patch and patch 17.  This is especially important for
patch 10, since the lack of a call to brw_mark_surface_used() is going to
introduce a temporary regression to ARB_shader_atomic_counters
functionality that isn't corrected until patch 17.

With that addressed, this patch is:

Reviewed-by: Paul Berry <stereotype441 at gmai.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131231/cb42c395/attachment.html>


More information about the mesa-dev mailing list