@@ -395,6 +395,8 @@ namespace dxvk {
395395 if (counterView == nullptr )
396396 return ;
397397
398+ AddCost (GpuCostEstimate::Transfer);
399+
398400 EmitCs ([
399401 cDstSlice = buf->GetBufferSlice (DstAlignedByteOffset),
400402 cSrcSlice = DxvkBufferSlice (counterView)
@@ -423,6 +425,8 @@ namespace dxvk {
423425 if (!rtv)
424426 return ;
425427
428+ AddCost (GpuCostEstimate::Transfer);
429+
426430 auto view = rtv->GetImageView ();
427431 auto color = ConvertColorValue (ColorRGBA, view->formatInfo ());
428432
@@ -451,6 +455,8 @@ namespace dxvk {
451455 if (FAILED (pUnorderedAccessView->QueryInterface (IID_PPV_ARGS (&qiUav))))
452456 return ;
453457
458+ AddCost (GpuCostEstimate::Transfer);
459+
454460 auto uav = static_cast <D3D11UnorderedAccessView*>(qiUav.ptr ());
455461
456462 // Gather UAV format info. We'll use this to determine
@@ -598,6 +604,8 @@ namespace dxvk {
598604 if (!info || info->flags .any (DxvkFormatFlag::SampledSInt, DxvkFormatFlag::SampledUInt))
599605 return ;
600606
607+ AddCost (GpuCostEstimate::Transfer);
608+
601609 VkClearValue clearValue;
602610 clearValue.color .float32 [0 ] = Values[0 ];
603611 clearValue.color .float32 [1 ] = Values[1 ];
@@ -657,6 +665,8 @@ namespace dxvk {
657665 if (!aspectMask)
658666 return ;
659667
668+ AddCost (GpuCostEstimate::Transfer);
669+
660670 VkClearValue clearValue;
661671 clearValue.depthStencil .depth = Depth;
662672 clearValue.depthStencil .stencil = Stencil;
@@ -683,6 +693,8 @@ namespace dxvk {
683693 if (NumRects && !pRect)
684694 return ;
685695
696+ AddCost (GpuCostEstimate::Transfer);
697+
686698 // ID3D11View has no methods to query the exact type of
687699 // the view, so we'll have to check each possible class
688700 auto dsv = dynamic_cast <D3D11DepthStencilView*>(pView);
@@ -768,6 +780,8 @@ namespace dxvk {
768780 if (!(resourceDesc.MiscFlags & D3D11_RESOURCE_MISC_GENERATE_MIPS))
769781 return ;
770782
783+ AddCost (GpuCostEstimate::Transfer);
784+
771785 EmitCs ([cDstImageView = view->GetImageView ()]
772786 (DxvkContext* ctx) {
773787 ctx->generateMipmaps (cDstImageView, VK_FILTER_LINEAR);
@@ -825,6 +839,8 @@ namespace dxvk {
825839 || SrcSubresource >= srcTextureInfo->CountSubresources ())
826840 return ;
827841
842+ AddCost (GpuCostEstimate::Transfer);
843+
828844 const VkImageSubresource dstSubresource =
829845 dstTextureInfo->GetSubresourceFromIndex (
830846 dstVulkanFormatInfo->aspectMask , DstSubresource);
@@ -1148,6 +1164,8 @@ namespace dxvk {
11481164 if (unlikely (!ThreadGroupCountX || !ThreadGroupCountY || !ThreadGroupCountZ))
11491165 return ;
11501166
1167+ AddCost (GpuCostEstimate::Dispatch);
1168+
11511169 if (unlikely (HasDirtyComputeBindings ()))
11521170 ApplyDirtyComputeBindings ();
11531171
@@ -1170,6 +1188,8 @@ namespace dxvk {
11701188 if (!ValidateDrawBufferSize (pBufferForArgs, AlignedByteOffsetForArgs, sizeof (VkDispatchIndirectCommand)))
11711189 return ;
11721190
1191+ AddCost (GpuCostEstimate::DispatchIndirect);
1192+
11731193 if (unlikely (HasDirtyComputeBindings ()))
11741194 ApplyDirtyComputeBindings ();
11751195
@@ -4151,6 +4171,8 @@ namespace dxvk {
41514171 if (SrcOffset >= srcLength || DstOffset >= dstLength || !ByteCount)
41524172 return ;
41534173
4174+ AddCost (GpuCostEstimate::Transfer);
4175+
41544176 ByteCount = std::min (dstLength - DstOffset, ByteCount);
41554177 ByteCount = std::min (srcLength - SrcOffset, ByteCount);
41564178
@@ -4234,6 +4256,8 @@ namespace dxvk {
42344256 if (!SrcExtent.width || !SrcExtent.height || !SrcExtent.depth )
42354257 return ;
42364258
4259+ AddCost (GpuCostEstimate::Transfer);
4260+
42374261 // While copying between 2D and 3D images is allowed in CopySubresourceRegion,
42384262 // copying more than one slice at a time is not suppoted. Layer counts are 1.
42394263 if ((pDstTexture->GetVkImageType () == VK_IMAGE_TYPE_3D)
@@ -4461,6 +4485,8 @@ namespace dxvk {
44614485 tiles[i] = tile;
44624486 }
44634487
4488+ AddCost (GpuCostEstimate::Transfer);
4489+
44644490 // If D3D12 is anything to go by, not passing this flag will trigger
44654491 // the other code path, regardless of whether TO_LINEAR_BUFFER is set.
44664492 if (Flags & D3D11_TILE_COPY_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE) {
@@ -5372,6 +5398,7 @@ namespace dxvk {
53725398 }
53735399
53745400 if (needsUpdate) {
5401+ AddCost (GpuCostEstimate::RenderPass);
53755402 BindFramebuffer ();
53765403
53775404 if constexpr (!IsDeferred)
0 commit comments