Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,884
    • Issues 2,884
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 921
    • Merge requests 921
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Issues
  • #674

Closed
Open
Created Sep 18, 2019 by Bugzilla Migration User@bugzilla-migration

i945 support for compressed cubemaps is completely broken

Submitted by Steinar H. Gunderson

Assigned to Eric Anholt @anholt

Link to original bug (#21693)

Description

Created attachment 25761 Test case source code

i945 hardware supports compressed cube maps. However, it seems like the texture memory layout completely forgets to handle the fact that they take up less memory.

I've made a small test program (attached; basically the same as in bugs 21691 and 21692, only with DXT1 instead of uncompressed textures) that creates a 64x64 cubemap and renders all faces at all mip levels. reference-cubemap.png is what it looks like on ATI and nVidia (well, actually, that's a white lie; in reality the colors are slightly wrong since DXT1 is 565 instead of 888, but you get the general idea). i945-compressed-cubemap.png is what it looks like on my i945 with unmodified Mesa 7.4.1. i945-compressed-cubemap-with-hack.png is what it looks like if I change the call to intel_miptree_set_image_offset() in i945_miptree_layout_cube() from

       intel_miptree_set_image_offset(mt, level, face, x, y);

to

       intel_miptree_set_image_offset(mt, level, face, x, y/4);

Of course, it's a hack, and it still doesn't work properly for the lower mip levels (probably related to bugs 21690 and/or 21691), but at least it shows that the layout has to be adjusted for lower memory use.

Attachment 25761, "Test case source code":
cmct.c

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking