[Bug 98840] nir clone test fails

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Nov 29 05:30:15 UTC 2016


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

Jason Ekstrand <jason at jlekstrand.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|jason at jlekstrand.net        |t_arceri at yahoo.com.au

--- Comment #1 from Jason Ekstrand <jason at jlekstrand.net> ---
This is really Tim's bug.  The problem occurred when he moved us to using
nir_gather_info.  When we start off, the nir_shader::info field points to
gl_program::info.  However, when the shader gets cloned, we ralloc a copy of
the shader_info and copy the data into that and nir_shader::info no longer
points to gl_program::info but points to a copy of the shader_info.  With
NIR_TEST_CLONE=1, nir_shader_gather_info gets run after some cloning has been
done and so the copied shader_info is what gets filled out and gl_program::info
gets left alone.  One hack solution is to just do "prog->info = *nir->info"
after we run nir_shader_gather_info, but I don't think this is a long-term
solution.

After going around in circles a bit, I think the answer is probably to make
nir_shader::info an embedded struct again and not a pointer.  Now that we use
the same shader_info struct in gl_program as we do in nir_shader, we can easily
pre-populate the one in nir_shader and, after we're done with our early NIR
optimization and we've run nir_shader_gather_info, we copy it back.

-- 
You are receiving this mail because:
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/20161129/c4523b71/attachment.html>


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