[Bug 98840] nir clone test fails
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Nov 29 06:04:33 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=98840
--- Comment #2 from Timothy Arceri <t_arceri at yahoo.com.au> ---
(In reply to Jason Ekstrand from comment #1)
> 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.
Wouldn't that just mean we would end up with:
"prog->info = nir->info"
rather than
"prog->info = *nir->info"
How is that any better?
I'll need to take a look at what NIR_TEST_CLONE=true is meant to do this is the
first time I've heard of it.
--
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/e23c21b6/attachment-0001.html>
More information about the intel-3d-bugs
mailing list