|
@@ -57,7 +57,7 @@ function _pipes_make_merge(red: bool, green: bool, blue: bool, alpha: bool): gpu
|
|
|
let pipe: gpu_pipeline_t = gpu_create_pipeline();
|
|
|
pipe.vertex_shader = sys_get_shader("layer_merge.vert");
|
|
|
pipe.fragment_shader = sys_get_shader("layer_merge.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipe.input_layout = vs;
|
|
|
ARRAY_ACCESS(pipe.color_write_mask_red, 0) = red;
|
|
@@ -88,7 +88,7 @@ function pipes_init() {
|
|
|
pipes_copy = gpu_create_pipeline();
|
|
|
pipes_copy.vertex_shader = sys_get_shader("layer_copy.vert");
|
|
|
pipes_copy.fragment_shader = sys_get_shader("layer_copy.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_copy.input_layout = vs;
|
|
|
gpu_pipeline_compile(pipes_copy);
|
|
@@ -98,7 +98,7 @@ function pipes_init() {
|
|
|
pipes_copy_bgra = gpu_create_pipeline();
|
|
|
pipes_copy_bgra.vertex_shader = sys_get_shader("layer_copy_bgra.vert");
|
|
|
pipes_copy_bgra.fragment_shader = sys_get_shader("layer_copy_bgra.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_copy_bgra.input_layout = vs;
|
|
|
gpu_pipeline_compile(pipes_copy_bgra);
|
|
@@ -108,7 +108,7 @@ function pipes_init() {
|
|
|
pipes_copy8 = gpu_create_pipeline();
|
|
|
pipes_copy8.vertex_shader = sys_get_shader("layer_copy.vert");
|
|
|
pipes_copy8.fragment_shader = sys_get_shader("layer_copy.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_copy8.input_layout = vs;
|
|
|
pipes_copy8.color_attachment_count = 1;
|
|
@@ -120,7 +120,7 @@ function pipes_init() {
|
|
|
pipes_copy64 = gpu_create_pipeline();
|
|
|
pipes_copy64.vertex_shader = sys_get_shader("layer_copy.vert");
|
|
|
pipes_copy64.fragment_shader = sys_get_shader("layer_copy.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_copy64.input_layout = vs;
|
|
|
pipes_copy64.color_attachment_count = 1;
|
|
@@ -132,7 +132,7 @@ function pipes_init() {
|
|
|
pipes_copy128 = gpu_create_pipeline();
|
|
|
pipes_copy128.vertex_shader = sys_get_shader("layer_copy.vert");
|
|
|
pipes_copy128.fragment_shader = sys_get_shader("layer_copy.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_copy128.input_layout = vs;
|
|
|
pipes_copy128.color_attachment_count = 1;
|
|
@@ -145,7 +145,7 @@ function pipes_init() {
|
|
|
pipes_invert8 = gpu_create_pipeline();
|
|
|
pipes_invert8.vertex_shader = sys_get_shader("layer_invert.vert");
|
|
|
pipes_invert8.fragment_shader = sys_get_shader("layer_invert.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_invert8.input_layout = vs;
|
|
|
pipes_invert8.color_attachment_count = 1;
|
|
@@ -157,7 +157,7 @@ function pipes_init() {
|
|
|
pipes_apply_mask = gpu_create_pipeline();
|
|
|
pipes_apply_mask.vertex_shader = sys_get_shader("mask_apply.vert");
|
|
|
pipes_apply_mask.fragment_shader = sys_get_shader("mask_apply.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_apply_mask.input_layout = vs;
|
|
|
gpu_pipeline_compile(pipes_apply_mask);
|
|
@@ -169,7 +169,7 @@ function pipes_init() {
|
|
|
pipes_merge_mask = gpu_create_pipeline();
|
|
|
pipes_merge_mask.vertex_shader = sys_get_shader("mask_merge.vert");
|
|
|
pipes_merge_mask.fragment_shader = sys_get_shader("mask_merge.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_merge_mask.input_layout = vs;
|
|
|
gpu_pipeline_compile(pipes_merge_mask);
|
|
@@ -184,7 +184,7 @@ function pipes_init() {
|
|
|
pipes_colorid_to_mask = gpu_create_pipeline();
|
|
|
pipes_colorid_to_mask.vertex_shader = sys_get_shader("mask_colorid.vert");
|
|
|
pipes_colorid_to_mask.fragment_shader = sys_get_shader("mask_colorid.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_colorid_to_mask.input_layout = vs;
|
|
|
gpu_pipeline_compile(pipes_colorid_to_mask);
|
|
@@ -198,7 +198,7 @@ function pipes_init() {
|
|
|
pipes_copy_r = gpu_create_pipeline();
|
|
|
pipes_copy_r.vertex_shader = sys_get_shader("layer_copy.vert");
|
|
|
pipes_copy_r.fragment_shader = sys_get_shader("layer_copy.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_copy_r.input_layout = vs;
|
|
|
ARRAY_ACCESS(pipes_copy_r.color_write_mask_green, 0) = false;
|
|
@@ -211,7 +211,7 @@ function pipes_init() {
|
|
|
pipes_copy_g = gpu_create_pipeline();
|
|
|
pipes_copy_g.vertex_shader = sys_get_shader("layer_copy.vert");
|
|
|
pipes_copy_g.fragment_shader = sys_get_shader("layer_copy.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_copy_g.input_layout = vs;
|
|
|
ARRAY_ACCESS(pipes_copy_g.color_write_mask_red, 0) = false;
|
|
@@ -224,7 +224,7 @@ function pipes_init() {
|
|
|
pipes_inpaint_preview = gpu_create_pipeline();
|
|
|
pipes_inpaint_preview.vertex_shader = sys_get_shader("inpaint_preview.vert");
|
|
|
pipes_inpaint_preview.fragment_shader = sys_get_shader("inpaint_preview.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_inpaint_preview.input_layout = vs;
|
|
|
gpu_pipeline_compile(pipes_inpaint_preview);
|
|
@@ -236,7 +236,7 @@ function pipes_init() {
|
|
|
pipes_copy_a = gpu_create_pipeline();
|
|
|
pipes_copy_a.vertex_shader = sys_get_shader("layer_copy_rrrr.vert");
|
|
|
pipes_copy_a.fragment_shader = sys_get_shader("layer_copy_rrrr.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_copy_a.input_layout = vs;
|
|
|
ARRAY_ACCESS(pipes_copy_a.color_write_mask_red, 0) = false;
|
|
@@ -251,7 +251,7 @@ function pipes_init() {
|
|
|
pipes_copy_rgb = gpu_create_pipeline();
|
|
|
pipes_copy_rgb.vertex_shader = sys_get_shader("layer_copy.vert");
|
|
|
pipes_copy_rgb.fragment_shader = sys_get_shader("layer_copy.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.F32_2X);
|
|
|
pipes_copy_rgb.input_layout = vs;
|
|
|
ARRAY_ACCESS(pipes_copy_rgb.color_write_mask_alpha, 0) = false;
|
|
@@ -262,7 +262,7 @@ function pipes_init() {
|
|
|
pipes_cursor = gpu_create_pipeline();
|
|
|
pipes_cursor.vertex_shader = sys_get_shader("cursor.vert");
|
|
|
pipes_cursor.fragment_shader = sys_get_shader("cursor.frag");
|
|
|
- let vs: gpu_vertex_structure_t = gpu_vertex_struct_create();
|
|
|
+ let vs: gpu_vertex_structure_t = {};
|
|
|
gpu_vertex_struct_add(vs, "pos", vertex_data_t.I16_4X_NORM);
|
|
|
gpu_vertex_struct_add(vs, "nor", vertex_data_t.I16_2X_NORM);
|
|
|
gpu_vertex_struct_add(vs, "tex", vertex_data_t.I16_2X_NORM);
|