diff --git a/src/glyph_cache/glyph_cache.c b/src/glyph_cache/glyph_cache.c index f2fb0c69..f0de7b5d 100644 --- a/src/glyph_cache/glyph_cache.c +++ b/src/glyph_cache/glyph_cache.c @@ -316,7 +316,7 @@ void GC_TickAsync(WaveLaneCtx *lane, AsyncFrameLaneCtx *base_async_lane_frame) gpu_perm, cl, G_Format_R8G8B8A8_Unorm_Srgb, atlas->dims, - G_Layout_Simultaneous, // Simultaneous because atlas will be written asynchronously during regular reads + G_Layout_Simultaneous, .name = Lit("Glyph atlas") ); atlas->tex = G_PushTexture2DRef(gpu_perm, atlas->tex_res); diff --git a/src/gpu/gpu_dx12/gpu_dx12_core.c b/src/gpu/gpu_dx12/gpu_dx12_core.c index 09ecaefa..d02a0a41 100644 --- a/src/gpu/gpu_dx12/gpu_dx12_core.c +++ b/src/gpu/gpu_dx12/gpu_dx12_core.c @@ -2079,12 +2079,7 @@ G_D12_StagingRegionNode *G_D12_PushStagingRegion(G_D12_CmdList *cl, u64 size) void G_D12_UpdateTrackedUsage(Arena *arena, G_D12_CmdBatch *batch, G_D12_Resource *resource, RngI32 mips, G_D12_TrackedUsageKind usage_kind) { - // b32 should_track = !AnyBit(resource->d3d_desc.Flags, D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS) && ( - // usage_kind == G_D12_TrackedUsageKind_ToCommon || - // usage_kind == G_D12_TrackedUsageKind_ToExclusive || - // ); b32 should_track = !AnyBit(resource->d3d_desc.Flags, D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS); - if (should_track) { u64 hash = MixU64(resource->uid); @@ -2477,13 +2472,15 @@ i64 G_CommitCommandList(G_CommandListHandle cl_handle) b32 is_transition_batch = batch->cmds_count == 0; if (batch == first_batch) { + is_transition_batch = 1; sync_before = D3D12_BARRIER_SYNC_NONE; access_before = D3D12_BARRIER_ACCESS_NO_ACCESS; } if (batch == last_batch) { - sync_before = D3D12_BARRIER_SYNC_NONE; - access_before = D3D12_BARRIER_ACCESS_NO_ACCESS; + is_transition_batch = 1; + sync_after = D3D12_BARRIER_SYNC_NONE; + access_after = D3D12_BARRIER_ACCESS_NO_ACCESS; } D3D12_GLOBAL_BARRIER global_barrier = Zi; diff --git a/src/gpu/gpu_dx12/gpu_dx12_core.h b/src/gpu/gpu_dx12/gpu_dx12_core.h index a77026c2..b58471bc 100644 --- a/src/gpu/gpu_dx12/gpu_dx12_core.h +++ b/src/gpu/gpu_dx12/gpu_dx12_core.h @@ -458,6 +458,7 @@ Struct(G_D12_BatchedCmdNode) Struct(G_D12_CmdBatch) { G_D12_CmdBatch *next; + G_D12_CmdBatch *prev; u64 tracked_resources_count; G_D12_TrackedResourceNode *first_tracked_resource; @@ -473,7 +474,6 @@ Struct(G_D12_CmdBatch) G_D12_BatchedCmdNode *last_cmd; b32 contains_hazard; - b32 contains_compute_shader; b32 contains_draw_shader; b32 contains_rtv; diff --git a/src/pp/pp_vis/pp_vis_core.c b/src/pp/pp_vis/pp_vis_core.c index cd2b8fae..7deb9b34 100644 --- a/src/pp/pp_vis/pp_vis_core.c +++ b/src/pp/pp_vis/pp_vis_core.c @@ -5411,7 +5411,7 @@ void V_TickForever(WaveLaneCtx *lane) G_Compute2D(cl, V_BloomUpCS, up_dims); G_Sync(cl); - } + } } ////////////////////////////// diff --git a/src/sprite/sprite.c b/src/sprite/sprite.c index e770dff7..74ed7b25 100644 --- a/src/sprite/sprite.c +++ b/src/sprite/sprite.c @@ -475,7 +475,7 @@ void SPR_TickAsync(WaveLaneCtx *lane, AsyncFrameLaneCtx *base_async_lane_frame) gpu_perm, cl, G_Format_R8G8B8A8_Unorm_Srgb, atlas->dims, - G_Layout_Simultaneous, // Simultaneous because atlas will be written asynchronously during regular reads + G_Layout_Simultaneous, .name = StringF(perm, "Sprite atlas #%F", FmtSint(SPR.atlases_count)) ); atlas->tex = G_PushTexture2DRef(gpu_perm, atlas->tex_res);