don't submit global barrier during command list begin/end
This commit is contained in:
parent
3197f18495
commit
338cbceb63
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user