[Mesa-dev] [Bug 107276] radv: OpBitfieldUExtract returns incorrect result when count is zero

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jul 18 13:30:47 UTC 2018


            Bug ID: 107276
           Summary: radv: OpBitfieldUExtract returns incorrect result when
                    count is zero
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Vulkan/radeon
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: philip.rebohle at tu-dortmund.de
        QA Contact: mesa-dev at lists.freedesktop.org

Created attachment 140691
  --> https://bugs.freedesktop.org/attachment.cgi?id=140691&action=edit
One of the affected shaders (GLSL version)


when building Mesa with LLVM 7.0-svn, OpBitfieldUExtract sometimes returns the
original source operand instead of zero when the bit count is zero. With LLVM
6.0.1, it works as expected.

This causes the following bug in DXVK:

Here's a renderdoc capture (recorded on Polaris) showing the issue:

The attached shader is a GLSL version of the vertex shader used in the
bookmarked draw call. I added some comments around like 220 for observed vs.
expected behaviour of the shader code.

I tried to reproduce the problem outside of DXVK, but had no luck so far: A
small demo app testing the GLSL bitfieldExtract function in a compute shader
always returns the correct values.

Handling the count = 0 case explicitly in the NIR->LLVM translation fixes the
issue in Far Cry 5.

- Philip

You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180718/9e4ca9c7/attachment.html>

More information about the mesa-dev mailing list