nir: move nir_copy_var from anv_nir_builder to nir_builder
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 18 Dec 2015 19:45:59 +0000 (11:45 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 23 Dec 2015 21:49:56 +0000 (13:49 -0800)
src/glsl/nir/nir_builder.h
src/vulkan/anv_nir_builder.h

index cb7787f10066f599c161822851cf184fdadeb367..cbbc26d1cc62c22dadbb28206d90c2d4227d412c 100644 (file)
@@ -353,6 +353,16 @@ nir_store_var(nir_builder *build, nir_variable *var, nir_ssa_def *value)
    nir_builder_instr_insert(build, &store->instr);
 }
 
+static inline void
+nir_copy_var(nir_builder *build, nir_variable *dest, nir_variable *src)
+{
+   nir_intrinsic_instr *copy =
+      nir_intrinsic_instr_create(build->shader, nir_intrinsic_copy_var);
+   copy->variables[0] = nir_deref_var_create(copy, dest);
+   copy->variables[1] = nir_deref_var_create(copy, src);
+   nir_builder_instr_insert(build, &copy->instr);
+}
+
 static inline nir_ssa_def *
 nir_load_system_value(nir_builder *build, nir_intrinsic_op op, int index)
 {
index f26cb046a6b6a6e37af3f800b84cdf4b85fc39f4..74637579ad4a6e4dcd2815a71bb2bb4b5dcc8374 100644 (file)
@@ -44,13 +44,3 @@ nir_builder_init_simple_shader(nir_builder *b, gl_shader_stage stage)
    b->impl = nir_function_impl_create(overload);
    b->cursor = nir_after_cf_list(&b->impl->body);
 }
-
-static inline void
-nir_copy_var(nir_builder *build, nir_variable *dest, nir_variable *src)
-{
-   nir_intrinsic_instr *copy =
-      nir_intrinsic_instr_create(build->shader, nir_intrinsic_copy_var);
-   copy->variables[0] = nir_deref_var_create(copy, dest);
-   copy->variables[1] = nir_deref_var_create(copy, src);
-   nir_builder_instr_insert(build, &copy->instr);
-}