[Bug 101560] SPIR-V OpSwitch with int64 not supported even though shaderInt64 is true

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jun 23 00:22:25 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=101560

            Bug ID: 101560
           Summary: SPIR-V OpSwitch with int64 not supported even though
                    shaderInt64 is true
           Product: Mesa
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Vulkan/intel
          Assignee: intel-3d-bugs at lists.freedesktop.org
          Reporter: programmerjake at gmail.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org
                CC: jason at jlekstrand.net

Created attachment 132150
  --> https://bugs.freedesktop.org/attachment.cgi?id=132150&action=edit
SPIR-V vertex shader that uses OpSwitch on a uint64_t (may be incorrect)

I noticed that even though shaderInt64 is true on gen 8 and above, the SPIR-V
to NIR translator code doesn't support OpSwitch on 64-bit integers.

Supporting 64-bit integers in OpSwitch requires parsing 2 for each switch
value, with the target block id, it requires 3 words for each switch case.

The latest commit on master when I checked is
e558a7a9888ee56863f11e7ede387689626f6ea9.

see OpSwitch translation code:
https://github.com/mesa3d/mesa/blob/master/src/compiler/spirv/vtn_cfg.c#L400

code that enables shaderInt64:
https://github.com/mesa3d/mesa/blob/master/src/intel/vulkan/anv_device.c#L720

Note: from what I can tell, glslang doesn't currently allow creating OpSwitch
on a int64, so programs that use OpSwitch this way are probably non-existant.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20170623/d5d4fc7b/attachment.html>


More information about the intel-3d-bugs mailing list