[Bug 89436] New: Add NIR functions for copying instructions, blocks, functions, and whole shaders

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Mar 4 20:03:29 PST 2015


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

            Bug ID: 89436
           Summary: Add NIR functions for copying instructions, blocks,
                    functions, and whole shaders
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: medium
         Component: glsl-compiler
          Assignee: idr at freedesktop.org
          Reporter: jason at jlekstrand.net
        QA Contact: intel-3d-bugs at lists.freedesktop.org

The idea here is two write the C equivalent of "copy constructors" for NIR
datatypes.  Not everything needs a copy constructor but, at the very least, we
at least need to be able to do a deep copy nir_function_impl's and everything
they contain.  Most of this should be straightforward as it's simply a matter
of recursing into data structures and copying everything.

There is a little complication when it comes to variables, registers, and SSA
values, however.  When we copy functions we will need some sort of a "remap
table" so that the copied functions can use the copied variables/registers/SSA
values rather than the originals.

Also, we have to be a bit careful with nir_phi_instr's as the SSA definitions
they use in their sources may not come before they do in the shader.  For
these, we have to create the actual instructions first and then fill out their
sources as a seperate pass after the rest of the instructions have been
created.  In fact, it may be easier (for the sake of correctness) to use this
sort of two-step copying procedure for all instructions.

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


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