mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 16:00:09 +01:00
nir: Add nir_builder_create returning nir_builder
More ergonomic. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23860>
This commit is contained in:
parent
ddb7cf7a25
commit
e5410f9b00
1 changed files with 8 additions and 0 deletions
|
|
@ -50,6 +50,14 @@ typedef struct nir_builder {
|
|||
|
||||
void nir_builder_init(nir_builder *build, nir_function_impl *impl);
|
||||
|
||||
static inline nir_builder
|
||||
nir_builder_create(nir_function_impl *impl)
|
||||
{
|
||||
nir_builder b;
|
||||
nir_builder_init(&b, impl);
|
||||
return b;
|
||||
}
|
||||
|
||||
nir_builder MUST_CHECK PRINTFLIKE(3, 4)
|
||||
nir_builder_init_simple_shader(gl_shader_stage stage,
|
||||
const nir_shader_compiler_options *options,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue