amd/surface: provide firstMipIdInTail for metadata surface calculations
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 9 Jan 2019 11:42:28 +0000 (12:42 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 26 Mar 2019 09:00:55 +0000 (10:00 +0100)
This field was added in a recent addrlib update, and while there
currently seems to be no issue with skipping it, we will have to
set it correctly in the future.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_surface.c

index 91004e032a392435d4ebefc79ae6242289ebf8b3..27e63c318e6ca85ec3d56d2089b1ad52d67322e0 100644 (file)
@@ -1142,6 +1142,7 @@ static int gfx9_compute_miptree(ADDR_HANDLE addrlib,
                hin.unalignedHeight = in->height;
                hin.numSlices = in->numSlices;
                hin.numMipLevels = in->numMipLevels;
+               hin.firstMipIdInTail = out.firstMipIdInTail;
 
                ret = Addr2ComputeHtileInfo(addrlib, &hin, &hout);
                if (ret != ADDR_OK)
@@ -1208,6 +1209,7 @@ static int gfx9_compute_miptree(ADDR_HANDLE addrlib,
                        din.numFrags = in->numFrags;
                        din.numMipLevels = in->numMipLevels;
                        din.dataSurfaceSize = out.surfSize;
+                       din.firstMipIdInTail = out.firstMipIdInTail;
 
                        ret = Addr2ComputeDccInfo(addrlib, &din, &dout);
                        if (ret != ADDR_OK)