Vulkan fixes
This commit is contained in:
Binary file not shown.
@@ -1222,8 +1222,6 @@ void gpu_flush() {
|
||||
.pNext = NULL,
|
||||
.commandBufferCount = 1,
|
||||
.pCommandBuffers = &command_buffer,
|
||||
.signalSemaphoreCount = 1,
|
||||
.pSignalSemaphores = &rendering_finished_semaphore,
|
||||
};
|
||||
|
||||
vkQueueSubmit(queue, 1, &submit_info, fence);
|
||||
@@ -1373,7 +1371,7 @@ void gpu_get_render_target_pixels(gpu_texture_t *render_target, uint8_t *data) {
|
||||
render_target->impl.readback_buffer_created = true;
|
||||
}
|
||||
|
||||
set_image_layout(render_target->impl.image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
|
||||
set_image_layout(render_target->impl.image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
|
||||
|
||||
VkBufferImageCopy region;
|
||||
region.bufferOffset = 0;
|
||||
@@ -1391,7 +1389,7 @@ void gpu_get_render_target_pixels(gpu_texture_t *render_target, uint8_t *data) {
|
||||
region.imageExtent.depth = 1;
|
||||
vkCmdCopyImageToBuffer(command_buffer, render_target->impl.image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, render_target->impl.readback_buffer, 1, ®ion);
|
||||
|
||||
set_image_layout(render_target->impl.image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
|
||||
set_image_layout(render_target->impl.image, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
|
||||
|
||||
gpu_flush();
|
||||
|
||||
|
||||
@@ -181,12 +181,6 @@ function export_arm_run_project() {
|
||||
draw_scaled_image(tex, -(256 * r - 256) / 2, 0, 256 * r, 256);
|
||||
draw_end();
|
||||
|
||||
///if arm_metal
|
||||
// Flush command list
|
||||
draw_begin(mesh_icon);
|
||||
draw_end();
|
||||
///end
|
||||
|
||||
let mesh_icon_pixels: buffer_t = gpu_get_texture_pixels(mesh_icon);
|
||||
let u8a: u8_array_t = mesh_icon_pixels;
|
||||
for (let i: i32 = 0; i < 256 * 256 * 4; ++i) {
|
||||
|
||||
@@ -119,7 +119,7 @@ function render_path_base_is_cached(): bool {
|
||||
render_path_set_target("");
|
||||
render_path_bind_target("last", "tex");
|
||||
if (render_path_base_ssaa4()) {
|
||||
render_path_draw_shader("shader_datas/supersample_resolve/supersample_resolve");
|
||||
render_path_draw_shader("shader_datas/supersample_resolve/supersample_resolveRGBA64");
|
||||
}
|
||||
else {
|
||||
render_path_draw_shader("shader_datas/copy_pass/copy_pass");
|
||||
@@ -329,7 +329,7 @@ function render_path_base_draw_taa(bufa: string, bufb: string) {
|
||||
render_path_bind_target(bufb, "tex");
|
||||
|
||||
if (render_path_base_ssaa4()) {
|
||||
render_path_draw_shader("shader_datas/supersample_resolve/supersample_resolve");
|
||||
render_path_draw_shader("shader_datas/supersample_resolve/supersample_resolveRGBA64");
|
||||
}
|
||||
else {
|
||||
render_path_draw_shader("shader_datas/copy_pass/copy_pass");
|
||||
|
||||
@@ -113,6 +113,7 @@ function render_path_deferred_init() {
|
||||
render_path_load_shader("shader_datas/copy_pass/copyR8_pass");
|
||||
render_path_load_shader("shader_datas/taa_pass/taa_pass");
|
||||
render_path_load_shader("shader_datas/supersample_resolve/supersample_resolve");
|
||||
render_path_load_shader("shader_datas/supersample_resolve/supersample_resolveRGBA64");
|
||||
|
||||
render_path_paint_init();
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ function render_path_preview_commands_preview() {
|
||||
|
||||
render_path_set_target("texpreview_icon");
|
||||
render_path_bind_target("texpreview", "tex");
|
||||
render_path_draw_shader("shader_datas/supersample_resolve/supersample_resolve");
|
||||
render_path_draw_shader("shader_datas/supersample_resolve/supersample_resolveRGBA64");
|
||||
}
|
||||
|
||||
function render_path_preview_commands_decal() {
|
||||
|
||||
@@ -370,7 +370,7 @@ function util_render_make_brush_preview() {
|
||||
draw_set_pipeline(null);
|
||||
draw_end();
|
||||
|
||||
// Scale image preview down to to icon
|
||||
// Scale image preview down to icon
|
||||
let texpreview: render_target_t = map_get(render_path_render_targets, "texpreview");
|
||||
texpreview._image = context_raw.brush.image;
|
||||
let texpreview_icon: render_target_t = map_get(render_path_render_targets, "texpreview_icon");
|
||||
@@ -424,10 +424,7 @@ function util_render_pick_pos_nor_tex() {
|
||||
render_path_paint_set_plane_mesh();
|
||||
}
|
||||
render_path_paint_commands_paint(false);
|
||||
///if arm_metal
|
||||
// Flush command list
|
||||
render_path_paint_commands_paint(false);
|
||||
///end
|
||||
|
||||
if (context_raw.paint2d) {
|
||||
render_path_paint_restore_plane_mesh();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user