Summary: | [Regression, bisected] TotalWar: Warhammer corrupted graphics | ||
---|---|---|---|
Product: | Mesa | Reporter: | Gregor Münch <gr.muench> |
Component: | Mesa core | Assignee: | Kenneth Graunke <kenneth> |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | kenneth |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
notice the red squares, which shouldnt be there
Proposed patch (git am) Patch to drop format-based completeness checks Minor glitches |
Description
Gregor Münch
2017-04-15 14:41:39 UTC
I am also having this problem latest mesa-git & llvm-svn rx480 Thank you for finding and reporting this! The game appears to be calling glCopyImageSubData() on a RGBA_UINT32 texture, with only one miplevel, with min/mag filters set to GL_NEAREST_MIPMAP_LINEAR and GL_LINEAR. Mipmap completeness isn't the problem - it's that we started paying attention to the min/mag filters and noticed that linear-filtering + integer formats = incomplete textures. See GL 4.5 Section 8.17: "A texture is complete unless any of the following conditions hold true: * Any of: – The internal format of the texture is integer (see table 8.12). – The internal format is STENCIL_INDEX. – The internal format is DEPTH_STENCIL, and the value of DEPTH_STENCIL_TEXTURE_MODE for the texture is STENCIL_INDEX. and either the magnification filter is not NEAREST, or the minification filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST." Arguably, this could be considered an application bug. However, the GL 4.5 conformance suite mandated that this very case should work until about a week before you reported this bug. So, all the major drivers allowed this case. I'm reopening the discussion at Khronos (internal bugzilla 16224) based on this information. I strongly suspect that they'll say this should be allowed (at which point my patch is wrong), but I'm not certain exactly what cases will be allowed yet. In the meantime, I'm happy to have my patch reverted in Mesa. Created attachment 131008 [details] [review] Proposed patch (git am) I suggested two options at Khronos: ignore min/mag filters (it makes no sense to consider them), or...more likely...ignore format-based completeness rules. Here's a patch that implements the latter. If you're able to test it, could you see if it fixes "Total War: WARHAMMER" rendering for you? Thanks! Created attachment 131012 [details] [review] Patch to drop format-based completeness checks Whoops, sorry...failed to git commit --amend before uploading the patch, so that patch wouldn't compile. Here's the one I actually tested. Thanks for the patch. I cant test it before Friday. Will let you know, in the meantime maybe someone else can test? Im quite confident that Feral is willing to fix their games if its a bug against the spec. Cheers for the report Gregor. Kenneth: if the verdict from Khronos suggests we're out of spec then we'll be happy to patch and fix. I'll keep an eye on this thread. Thanks :) I'm just concerned that since no drivers have been enforcing this rule, there might be a lot of apps that get hit by this issue. (In reply to Kenneth Graunke from comment #4) > Created attachment 131012 [details] [review] [review] > Patch to drop format-based completeness checks > > Whoops, sorry...failed to git commit --amend before uploading the patch, so > that patch wouldn't compile. Here's the one I actually tested. i will test this tonight, thanks for the patch Just tested the patch ... while not fixing the problem completely it has fixed the graphic glitches replacing the red and green squares with minor graphic glitches on the campaign map and on the battle map it has completely resolved my issue of large red blocks on the grass, i will post screenshots soon to better explain what i mean I just tested it too, for me the world map is fixed. But Im waiting for your screenshots to see what you see. ;) Created attachment 131153 [details]
Minor glitches
while no weird colouring you can still that there is a problem. the game is perfectly playable now at least
I saw something like that before. Sometimes the red squares appeared, sometimes it was like on your picture and sometimes it was just very dark when you zoomed out. I played now different factions but after the patch I dont see anything wrong on the worldmap. Could you try if reverting commit c5bf7cb52942cb7df9f5d73746ffbf3c102d12cc and see if the problem persists? We should fix this bug before 17.1 final appears. Maybe we should simply revert the patch for the 17.1 branch. I sent a revert today. Thx! Patch appeared in master and stable. So I think this is fixed. just updated mesa-git today and also have no problems, thank you for the patch and hard work. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.