Gpu cleanup (unstable)
This commit is contained in:
@@ -34,7 +34,7 @@ function inpaint_node_init() {
|
||||
inpaint_node_mask = gpu_create_render_target(config_get_texture_res_x(), config_get_texture_res_y(), tex_format_t.R8);
|
||||
sys_notify_on_next_frame(function () {
|
||||
_gpu_begin(inpaint_node_mask, null, clear_flag_t.COLOR, color_from_floats(1.0, 1.0, 1.0, 1.0));
|
||||
_gpu_end();
|
||||
iron_gpu_end();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -87,13 +87,13 @@ function inpaint_node_get_cached_image(self: inpaint_node_t): iron_gpu_texture_t
|
||||
sys_notify_on_next_frame(function (self: inpaint_node_t) {
|
||||
let source: iron_gpu_texture_t = logic_node_input_get_as_image(self.base.inputs[0]);
|
||||
_gpu_begin(inpaint_node_image);
|
||||
gpu_set_pipeline(pipes_inpaint_preview);
|
||||
gpu_set_texture(pipes_tex0_inpaint_preview, source);
|
||||
gpu_set_texture(pipes_texa_inpaint_preview, inpaint_node_mask);
|
||||
gpu_set_vertex_buffer(const_data_screen_aligned_vb);
|
||||
gpu_set_index_buffer(const_data_screen_aligned_ib);
|
||||
iron_gpu_set_pipeline(pipes_inpaint_preview);
|
||||
iron_gpu_set_texture(pipes_tex0_inpaint_preview, source);
|
||||
iron_gpu_set_texture(pipes_texa_inpaint_preview, inpaint_node_mask);
|
||||
iron_gpu_set_vertex_buffer(const_data_screen_aligned_vb);
|
||||
iron_gpu_set_index_buffer(const_data_screen_aligned_ib);
|
||||
gpu_draw();
|
||||
_gpu_end();
|
||||
iron_gpu_end();
|
||||
}, self);
|
||||
return inpaint_node_image;
|
||||
}
|
||||
|
||||
@@ -176,9 +176,9 @@ function render_path_paint_draw_cursor(mx: f32, my: f32, radius: f32, tint_r: f3
|
||||
let geom: mesh_data_t = plane.data;
|
||||
|
||||
render_path_set_target("");
|
||||
gpu_set_pipeline(pipes_cursor);
|
||||
iron_gpu_set_pipeline(pipes_cursor);
|
||||
let gbuffer0: render_target_t = map_get(render_path_render_targets, "gbuffer0");
|
||||
gpu_set_texture_depth(pipes_cursor_gbufferd, gbuffer0._image);
|
||||
iron_gpu_set_texture_depth(pipes_cursor_gbufferd, gbuffer0._image);
|
||||
gpu_set_float2(pipes_cursor_mouse, mx, my);
|
||||
gpu_set_float2(pipes_cursor_tex_step, 1 / gbuffer0._image.width, 1 / gbuffer0._image.height);
|
||||
gpu_set_float(pipes_cursor_radius, radius);
|
||||
@@ -188,11 +188,11 @@ function render_path_paint_draw_cursor(mx: f32, my: f32, radius: f32, tint_r: f3
|
||||
gpu_set_matrix4(pipes_cursor_vp, scene_camera.vp);
|
||||
let inv_vp: mat4_t = mat4_inv(scene_camera.vp);
|
||||
gpu_set_matrix4(pipes_cursor_inv_vp, inv_vp);
|
||||
gpu_set_vertex_buffer(geom._.vertex_buffer);
|
||||
gpu_set_index_buffer(geom._.index_buffers[0]);
|
||||
iron_gpu_set_vertex_buffer(geom._.vertex_buffer);
|
||||
iron_gpu_set_index_buffer(geom._.index_buffers[0]);
|
||||
gpu_draw();
|
||||
|
||||
gpu_disable_scissor();
|
||||
iron_gpu_disable_scissor();
|
||||
render_path_end();
|
||||
}
|
||||
|
||||
|
||||
@@ -79,12 +79,12 @@ function ui_nodes_ext_run() {
|
||||
|
||||
if (texheight != null) {
|
||||
_gpu_begin(texpaint_pack._image);
|
||||
gpu_set_pipeline(pipes_copy_a);
|
||||
gpu_set_texture(pipes_copy_a_tex, texheight);
|
||||
gpu_set_vertex_buffer(const_data_screen_aligned_vb);
|
||||
gpu_set_index_buffer(const_data_screen_aligned_ib);
|
||||
iron_gpu_set_pipeline(pipes_copy_a);
|
||||
iron_gpu_set_texture(pipes_copy_a_tex, texheight);
|
||||
iron_gpu_set_vertex_buffer(const_data_screen_aligned_vb);
|
||||
iron_gpu_set_index_buffer(const_data_screen_aligned_ib);
|
||||
gpu_draw();
|
||||
_gpu_end();
|
||||
iron_gpu_end();
|
||||
|
||||
let is_float_node: bool = context_raw.brush_output_node_inst.base.inputs[channel_type_t.HEIGHT].node.base.get == float_node_get;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user