Transient CB only, validation fixes
This commit is contained in:
@@ -120,7 +120,7 @@ pub fn load(filename: []const u8, engine: *Engine, cube_size: u32, global_unifor
|
||||
|
||||
// --- TRANSITION TO TRANSFER_DST_OPTIMAL AND COPY -------------------------
|
||||
|
||||
var transfer_command_buffer = try CommandBuffer.init(engine, .transfer, .transient);
|
||||
var transfer_command_buffer = try CommandBuffer.init(engine, .transfer);
|
||||
defer transfer_command_buffer.deinit(engine);
|
||||
|
||||
try transfer_command_buffer.beginCommandBuffer();
|
||||
@@ -174,7 +174,7 @@ pub fn load(filename: []const u8, engine: *Engine, cube_size: u32, global_unifor
|
||||
|
||||
// --- TRANSITION TO SHADER_READ_ONLY_OPTIMAL ------------------------------
|
||||
|
||||
var transition1_command_buffer = try CommandBuffer.init(engine, .graphics, .transient);
|
||||
var transition1_command_buffer = try CommandBuffer.init(engine, .graphics);
|
||||
defer transition1_command_buffer.deinit(engine);
|
||||
|
||||
try transition1_command_buffer.beginCommandBuffer();
|
||||
@@ -386,7 +386,7 @@ pub fn load(filename: []const u8, engine: *Engine, cube_size: u32, global_unifor
|
||||
|
||||
// 1. Run compute shader
|
||||
|
||||
var compute_command_buffer = try CommandBuffer.init(engine, .compute, .transient);
|
||||
var compute_command_buffer = try CommandBuffer.init(engine, .compute);
|
||||
defer compute_command_buffer.deinit(engine);
|
||||
|
||||
try compute_command_buffer.beginCommandBuffer();
|
||||
@@ -394,22 +394,6 @@ pub fn load(filename: []const u8, engine: *Engine, cube_size: u32, global_unifor
|
||||
.src_stage_mask = .{ .top_of_pipe_bit = true },
|
||||
.dst_stage_mask = .{ .compute_shader_bit = true },
|
||||
.image_memory_barriers = &.{
|
||||
.{
|
||||
.src_access_mask = .{},
|
||||
.dst_access_mask = .{ .shader_read_bit = true },
|
||||
.old_layout = .preinitialized,
|
||||
.new_layout = .shader_read_only_optimal,
|
||||
.src_queue_family_index = vk.QUEUE_FAMILY_IGNORED,
|
||||
.dst_queue_family_index = vk.QUEUE_FAMILY_IGNORED,
|
||||
.image = equirect_image,
|
||||
.subresource_range = .{
|
||||
.aspect_mask = .{ .color_bit = true },
|
||||
.base_mip_level = 0,
|
||||
.level_count = 1,
|
||||
.base_array_layer = 0,
|
||||
.layer_count = 1,
|
||||
},
|
||||
},
|
||||
.{
|
||||
.src_access_mask = .{},
|
||||
.dst_access_mask = .{ .shader_write_bit = true },
|
||||
@@ -445,13 +429,13 @@ pub fn load(filename: []const u8, engine: *Engine, cube_size: u32, global_unifor
|
||||
|
||||
// 2. Transition cubemap
|
||||
|
||||
var transition2_command_buffer = try CommandBuffer.init(engine, .graphics, .transient);
|
||||
var transition2_command_buffer = try CommandBuffer.init(engine, .graphics);
|
||||
defer transition2_command_buffer.deinit(engine);
|
||||
|
||||
try transition2_command_buffer.beginCommandBuffer();
|
||||
transition2_command_buffer.pipelineBarrier(.{
|
||||
.src_stage_mask = .{ .compute_shader_bit = true },
|
||||
.dst_stage_mask = .{ .top_of_pipe_bit = true },
|
||||
.dst_stage_mask = .{ .fragment_shader_bit = true },
|
||||
.image_memory_barriers = &.{
|
||||
.{
|
||||
.src_access_mask = .{ .shader_write_bit = true },
|
||||
@@ -700,8 +684,24 @@ pub fn load(filename: []const u8, engine: *Engine, cube_size: u32, global_unifor
|
||||
.depth_compare_op = .equal,
|
||||
.depth_bounds_test_enable = .false,
|
||||
.stencil_test_enable = .false,
|
||||
.front = undefined,
|
||||
.back = undefined,
|
||||
.front = .{
|
||||
.fail_op = .keep,
|
||||
.pass_op = .keep,
|
||||
.depth_fail_op = .keep,
|
||||
.compare_op = .never,
|
||||
.compare_mask = 0,
|
||||
.write_mask = 0,
|
||||
.reference = 0,
|
||||
},
|
||||
.back = .{
|
||||
.fail_op = .keep,
|
||||
.pass_op = .keep,
|
||||
.depth_fail_op = .keep,
|
||||
.compare_op = .never,
|
||||
.compare_mask = 0,
|
||||
.write_mask = 0,
|
||||
.reference = 0,
|
||||
},
|
||||
.min_depth_bounds = 0,
|
||||
.max_depth_bounds = 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user