Eric Anholt
eda3e4e055
nir/builder: Add a name format arg to nir_builder_init_simple_shader().
...
This cleans up a bunch of gross sprintfs and keeps the caller from needing
to remember to ralloc_strdup. I added a couple of '"%s", name ? name :
""' to radv where I didn't fully trace through whether a non-null name was
being passed in.
I also took the liberty of adding a basic name to a few shaders (pan_blit,
unit tests)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323 >
2020-11-11 08:50:29 -08:00
Eric Anholt
5f992802f5
nir/builder: Drop the mem_ctx arg from nir_builder_init_simple_shader().
...
This looks a lot more simple now!
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323 >
2020-11-11 08:50:29 -08:00
Eric Anholt
2f372572a1
nir/tests: Simplify the mem_ctx setup in our unit tests.
...
These all make a simple shader and free it at the end, that can be our
mem_ctx.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323 >
2020-11-11 08:49:58 -08:00
Eric Anholt
4e9328e3b6
nir_builder: Return a new builder from nir_builder_init_simple_shader().
...
It's a little inline function, so we can just RAII it for better
ergonomics.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323 >
2020-11-11 08:49:49 -08:00
Karol Herbst
0bafde717d
nir/tests: MSVC build fix
...
Fixes: 11f736a6f9 "nir/tests: add serializer tests"
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com >
2019-12-11 17:12:48 +00:00
Karol Herbst
11f736a6f9
nir/tests: add serializer tests
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Connor Abbott <cwabbott0@gmail.com >
2019-12-11 13:00:44 +01:00