lima: use passed surface to get mipmap level for reload, not cbuf

lima_pack_reload_plbu_cmd() can be used for either cbuf or zsbuf, so
use passed surface other using cbuf unconditionally.

Fixes: b8c31ac06d ("lima: fix glCopyTexSubImage2D")
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10121>
This commit is contained in:
Vasily Khoruzhick 2021-04-12 08:10:29 -07:00 committed by Marge Bot
parent b071d98c04
commit c8e80c24d4

View file

@ -345,10 +345,8 @@ lima_pack_reload_plbu_cmd(struct lima_job *job, struct pipe_surface *psurf)
struct lima_context *ctx = job->ctx;
struct lima_surface *surf = lima_surface(psurf);
struct pipe_surface *cbuf = job->key.cbuf;
int level = cbuf->u.tex.level;
unsigned first_layer = cbuf->u.tex.first_layer;
int level = psurf->u.tex.level;
unsigned first_layer = psurf->u.tex.first_layer;
uint32_t va;
void *cpu = lima_job_create_stream_bo(