Module: Mesa Branch: master Commit: ffb5488c73d99449d4f83bcbdbf6644744d495de URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ffb5488c73d99449d4f83bcbdbf6644744d495de
Author: Icecream95 <i...@disroot.org> Date: Fri Jan 8 11:16:55 2021 +1300 panfrost: Fix textureSize for buffer textures Suggested-by: Boris Brezillon <boris.brezil...@collabora.com> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8300> --- src/gallium/drivers/panfrost/pan_cmdstream.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 5a62265d9cf..a4b90332171 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -762,6 +762,14 @@ static void panfrost_upload_txs_sysval(struct panfrost_batch *batch, struct pipe_sampler_view *tex = &ctx->sampler_views[st][texidx]->base; assert(dim); + + if (tex->target == PIPE_BUFFER) { + assert(dim == 1); + uniform->i[0] = + tex->u.buf.size / util_format_get_blocksize(tex->format); + return; + } + uniform->i[0] = u_minify(tex->texture->width0, tex->u.tex.first_level); if (dim > 1) _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit