6 Replies Latest reply on Sep 12, 2018 3:47 AM by xhuang

    ARB_sparse_texture issue

    lucasz

      Gday,

       

      I'm encountering an issue with the ARB_sparse_texture extension where my application's memory usage is jumping 120mb when committing any tile from the mipmap tail.

      The minimum code I've got to reproduce this is:

           GLuint page_texture;

       

           glGenTextures(1, &page_texture);

           glBindTexture(GL_TEXTURE_2D, page_texture);

           glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SPARSE_ARB, GL_TRUE);

           glTexStorage2D(GL_TEXTURE_2D, 15, GL_RGBA32F, 16384, 16384);

       

           // Commit a level 0 page.

           glTexPageCommitmentARB(GL_TEXTURE_2D, 0, 0, 0, 0, 64, 64, 0, GL_TRUE);

           // 4kb increase here.

       

           // Commit level 10 (first tail level).

           glTexPageCommitmentARB(GL_TEXTURE_2D, 10, 0, 0, 0, 16, 16, 0, GL_TRUE);

           // 120mb increase here.

       

      It may be important to note that the 120mb increase is constant across sparse texture sizes. Creating a 256x256 sparse texture and committing the first tail level still results in a 120mb memory increase. For convenience, that code is also:

           GLuint page_texture;

           glGenTextures(1, &page_texture);

           glBindTexture(GL_TEXTURE_2D, page_texture);

           glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SPARSE_ARB, GL_TRUE);

           glTexStorage2D(GL_TEXTURE_2D, 9, GL_RGBA32F, 256, 256);

           glTexPageCommitmentARB(GL_TEXTURE_2D, 0, 0, 0, 0, 64, 64, 0, GL_TRUE);

           glTexPageCommitmentARB(GL_TEXTURE_2D, 4, 0, 0, 0, 16, 16, 0, GL_TRUE);

           // 120mb increase here.

       

      My system is running the 18.5.2 drivers with the RX480. Has anyone else seen this problem?

       

      Thanks,

      -Lucas