Fixes dEQP-GLES3.functional.ubo.multi_basic_types.single_buffer.* among
others
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
PAN_BO_ACCESS_SHARED |
PAN_BO_ACCESS_READ |
panfrost_bo_access_for_stage(st));
- return rsrc->bo->gpu;
+
+ /* Alignment gauranteed by PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT */
+ return rsrc->bo->gpu + cb->buffer_offset;
} else if (cb->user_buffer) {
- return panfrost_upload_transient(batch, cb->user_buffer, cb->buffer_size);
+ return panfrost_upload_transient(batch, cb->user_buffer + cb->buffer_offset, cb->buffer_size);
} else {
unreachable("No constant buffer");
}